No appropriate constructor found for QcWindow

Hello to all,

I’ve just build SuperCollider 3.14.0-dev on Ubuntu 24.04.1 LTS Noble Numbat by following these instructions:

I have to replace qt5-default by qtbase5-dev cause it was not found (has mentioned in the Note).
All looks good but when I tried to Show Server Meter by pressing ctrl-m, I got This error message:

ERROR: Qt: No appropriate constructor found for QcWindow (QString, QRectF, bool, bool)
ERROR: Primitive '_QObject_New' failed.
Failed.
RECEIVER:
Instance of TopView {    (0x61caf11695d8, gc=EC, fmt=00, flg=00, set=06)
  instance variables [35]
    qObject : nil
    finalizer : nil
    virtualSlots : nil
    wasRemoved : false
    font : nil
    resize : Integer 1
    alpha : Float 1.000000   00000000 3FF00000
    decorator : nil
    layout : nil
    userCanClose : true
    deleteOnClose : true
    action : nil
    mouseDownAction : nil
    mouseUpAction : nil
    mouseEnterAction : nil
    mouseLeaveAction : nil
    mouseMoveAction : nil
    mouseOverAction : nil
    mouseWheelAction : nil
    keyDownAction : nil
    keyUpAction : nil
    keyModifiersChangedAction : nil
    keyTyped : nil
    focusGainedAction : nil
    focusLostAction : nil
    dragLabel : nil
    beginDragAction : nil
    canReceiveDragHandler : nil
    receiveDragHandler : nil
    toFrontAction : nil
    endFrontAction : nil
    onClose : nil
    onResize : nil
    onMove : nil
    window : nil
}
CALL STACK:
	MethodError:reportError
		arg this = <instance of PrimitiveFailedError>
	Nil:handleError
		arg this = nil
		arg error = <instance of PrimitiveFailedError>
	Thread:handleError
		arg this = <instance of Thread>
		arg error = <instance of PrimitiveFailedError>
	Object:throw
		arg this = <instance of PrimitiveFailedError>
	Object:primitiveFailed
		arg this = <instance of TopView>
	QObject:initQObject
		arg this = <instance of TopView>
		arg className = 'QcWindow'
		arg argumentArray = [*4]
	Meta_View:newCustom
		arg this = <instance of Meta_TopView>
		arg customArgs = [*4]
	Meta_TopView:new
		arg this = <instance of Meta_TopView>
		arg win = <instance of Window>
		arg name = "localhost levels (dBFS)"
		arg bounds = <instance of Rect>
		arg resizable = false
		arg border = true
	Window:initWindow
		arg this = <instance of Window>
		arg name = "localhost levels (dBFS)"
		arg bounds = <instance of Rect>
		arg resize = false
		arg border = true
		arg scroll = false
	Meta_ServerMeter:new
		arg this = <instance of Meta_ServerMeter>
		arg server = <instance of Server>
		arg numIns = 2
		arg numOuts = 2
		var window = nil
		var meterView = nil
	Server:meter
		arg this = <instance of Server>
		arg numIns = nil
		arg numOuts = nil
	Interpreter:interpretCmdLine
		arg this = <instance of Interpreter>
	Process:interpretCmdLine
		arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Primitive '_QObject_New' failed.
Failed.
RECEIVER: a TopView

Same thing for Show Scope and Show Freqscope.
Can you help me to resolve this ?
Thank you in advance

Hi @kesey

Unfortunately information on that wiki is outdated. Please see supercollider/README_LINUX.md at develop · supercollider/supercollider · GitHub for current installation instructions.

In particular, we moved from Qt 5 to Qt 6.

At the same time, building against Qt 5.15 should still work. Maybe the issue is because you have both Qt 5 and 6 installed on your system?

Please try building again against qt6 and if it doesn’t work, please post your cmake configure output.

Best,
Marcin

1 Like

Hi @MarcinP ,
thank you for your answer.
I have Qt 5.15 on my system:

qmake --version
>> QMake version 3.1
Using Qt version 5.15.13 in usr/lib/x86_64-linux-gnu

How Can I check If Ihave Qt6 too ?

I try to uninstall SuperCollider to make a proper install by following your link.
From my supercollider/build folder, I run the following:

sudo make uninstall

but I got a lot of these:

-- Uninstalling \"${ENV{DESTDIR}}${file}\"
CMake Warning (dev) at cmake_uninstall.cmake:16 (if):
  Syntax error in cmake code at

    /home/fabien/son/supercollider/build/cmake_uninstall.cmake:16

  when parsing string

    ${ENV{DESTDIR}}${file}

  syntax error, unexpected {, expecting } (6)

  Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
  "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake_uninstall.cmake:29 (message):
  Syntax error in cmake code at

    /home/fabien/son/supercollider/build/cmake_uninstall.cmake:29

  when parsing string

    File \"${ENV{DESTDIR}}${file}\" does not exist.

  syntax error, unexpected {, expecting } (13)

  Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
  "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- File \"${ENV{DESTDIR}}${file}\" does not exist.
Built target uninstall

and SuperCollider is still present on my system (I can open it).
How Can I uninstall this build and totally remove SuperCollider from my system to start a new build ?

I always found manually compiled software on Linux cumbersome to remove. Unfortunately I don’t know what’s wrong here. Maybe other Linux users can chime in?

I think it should be fine to install the new version over the old one, but there’s always risk of something going wrong.

Alternatively, you can remove the classlibrary and extensions folders manually (you can check where they are from within SC) and then building/installing a new version over the old one should be fine, I think.

But again, I’m not an everyday Linux user so there might be a better way to go about this…

For the binaries, you don’t need to remove before updating (sudo make install will overwrite them). If you’d feel better clearing them manually, they’re in /usr/local/bin.

You can remove system-wide class library files, extensions, resources by rm -rf /usr/local/share/SuperCollider – I think this is the only location where SC installs resources.

Even those are probably not necessary to remove – the only reason to do so is in case there are some library files in the older version that were deleted or renamed in the new version. That’s highly unlikely.

hjh

2 Likes

Thank you very much for your answers.
I made another build on top of the precedent with only Qt6 installed and it works.