SoQt on macOS 10.14 Mojave?

99 views
Skip to first unread message

R.M. Bianchi

unread,
Dec 8, 2018, 1:38:55 AM12/8/18
to coin3d-discuss

Hi everyone,

I was trying to use SoQt on the latest macOS (10.14 Mojave), but I get errors like this:

Must construct a QApplication before a QWidget

I get this error from a simple test program that compiled fine on macOS 10.12 Sierra, so it must be related to the latest changes in the OS. (You can find the code here, if you want to test it: https://github.com/ric-bianchi/Coin3D-SoQt-Examples - the instructions in the README need to be updated, sorry)


I looked on the web and it seems that this error can come for a quite different number of reasons.

Before digging into the problem, I wanted to ask you if someone else tested SoQt on Mojave successfully, and how.

Thanks for your help, and have a good day,

Riccardo.

v.r.en...@googlemail.com

unread,
Dec 8, 2018, 8:01:50 AM12/8/18
to coin3d-discuss
Hi Riccardo,

did you use the latest version of SoQt and Coin from the official repositories (as the documentation you provided references a roboticslibrary subrepo)?
If yes, did you also tried to run your tests with a minimal SoQtExaminerViewer instead of your customViewer class, to make sure the problems are not in the customViewer class?
I do not have a Mojave installation at hand but only a Sierra VM so unfortunately I cannot test.

Cheers Volker

R.M. Bianchi

unread,
May 23, 2019, 3:22:37 AM5/23/19
to coin3d-discuss

Hi Volker, all,

Sorry for my VERY late reply, very busy months last ones.
I'm now trying to get the official SoQt working on macOS Mojave again and I see some build issues.

(As I said in another message, we have an old private version of SoQt, but now we would like to try to switch our project to the latest official sources and try to contribute the them)

I'm using the Bitbucket HEAD version of both Coin and SoQt and I'm running macOS 10.14.4 with Xcode 10.2.1 (the latest).

The build of Coin is fine.
Then, when building SoQt I get this linking error:


Copying OS X content lib/SoQt.framework/Versions/A/Resources/materials/winter/winter8.h
Copying OS X content lib/SoQt.framework/Versions/A/Resources/materials/winter/winter9.h
[ 82%] Linking CXX shared library ../lib/SoQt.framework/SoQt
Undefined symbols for architecture x86_64:
 
"SoSFTime::setValue(SbTime)", referenced from:
     
SoGuiViewpointWrapper::sendBindEvents(SoNode*, int) in ViewpointWrapper.cpp.o
 
"SbPList::find(void*) const", referenced from:
     
SoQtComponent::removeVisibilityChangeCallback(void (*)(void*, int), void*) in SoQtComponent.cpp.o
     
SoQtFullViewer::removeAppPushButton(QWidget*) in FullViewer.cpp.o
     
SoQtFullViewer::findAppPushButton(QWidget*) const in FullViewer.cpp.o
     
SoQtRenderArea::registerDevice(SoQtDevice*) in SoQtRenderArea.cpp.o
     
SoQtRenderArea::~SoQtRenderArea() in SoQtRenderArea.cpp.o
     
SoQtRenderArea::unregisterDevice(SoQtDevice*) in SoQtRenderArea.cpp.o
     
SoGuiViewpointWrapper::set_bind_cb(void*, SoSensor*) in ViewpointWrapper.cpp.o
     
...
ld
: symbol(s) not found for architecture x86_64
clang
: error: linker command failed with exit code 1 (use -v to see invocation)
make
[2]: *** [lib/SoQt.framework/Versions/A/SoQt] Error 1
make
[1]: *** [src/CMakeFiles/SoQt.dir/all] Error 2
make
: *** [all] Error 2


Before trying to understand the CMake setup of the Bitbucket version (we compile our private version with a totally different CMake setup, to embed it in our framework), I would like to ask you if that error triggers an idea to you, and if you could point me in the right direction to debug it and get SoQt working on the latest macOS again.

Thanks a lot for your kind help and, most of all, for the time and work you devote to the Coin3D suite.

Regards,
    Riccardo.

R.M. Bianchi

unread,
May 23, 2019, 5:30:51 AM5/23/19
to coin3d-discuss

P.S.
The OpenGL examples from the same Qt release, 5.12.3, work well on the same machine. For example:


Thanks again,
   Riccardo.

R.M. Bianchi

unread,
May 24, 2019, 6:54:43 AM5/24/19
to coin3d-discuss

An update:

I succeeded in compiling the HEAD SoQt but only by linking to an OLDER version of Coin. In particular, used the Coin commit "e74da184f75b" from Nov 2018, which I had around.
I didn't have the time to check properly yet, but being able to successfully build SoQt with an older Coin revision, the problem must be in the CMake setup of Coin which must be changed recently, and not in SoQt.
I'll try to figure it out later. If you suggestions on where to look at, they are very welcome.

Anyway, I now face other problems, this time related to OpenGL and/or Qt.

As I said, the compilation is fine. But when I try to run one of the example applications, for example "tripleview", I only get blank black windows at the place of the 3D windows.

I am running macOS 10.14.4 with Xcode 10.2.1 and I tried several versions of Qt, with different results which I summarize here below.

Qt 5.8 and Qt 5.12.0 : only blank screens.
I made screencasts, which cab ve viewed here:
 - Qt 5.8: https://drive.google.com/file/d/11A5JIjcjm9gvCPxY7X9IrPIrXJInaRWw/view?usp=sharing
 - Qt 5.12.0: https://drive.google.com/file/d/1F0DmdSzymU4JcOQ_9rzaAr3MZHqJjYEO/view?usp=sharing

Qt 5.12.3 installed through "homebrew":  I CAN SEE the 3D objects for a brief moment ONLY while resizing the main window.
Screencast here:
- https://drive.google.com/file/d/1KlFTSiwHzat714SAWvtz4NZvTG2_6tCO/view?usp=sharing

So, apparently there's some hope with the latest Qt5... :-)

Also, here is another additional hint: I tested Quarter and I can open the "Example" test program, which shows a 3D cone in the OpenGL window, even if i a somehow "weird" way: the cone looks displaced. However, the program crash with segfault as soon as I click with the moouseon the 3D window. I didn't dig into that, but if Quarter and Qt can display OpenGL  content (more or less) properly, there's hope for SoQt as well...

Before digging into all that, I would like to ask you if some of the things I mentioned behavior triggers any known alarm to you. Do you have suggestions on how to fix that or at least on what I could try to get SoQt working on macOS again?


Once again, thanks a lot for your kind help and, most of all, for the time and work you devote to the Coin3D suite.

Regards,
    Riccardo.

Volker Enderlein

unread,
Jun 9, 2019, 11:31:05 AM6/9/19
to coin3d-discuss
Hi Riccardo,

I compiled current version of Coin and SoQt (Qt 5.12.1) on macOS 10.14.3 and displayed your example. Building with the framework option enabled required me to set an additional `set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAG} -F/Library/Frameworks")` option in your example and to add `find_package(Coin NAMES Inventor Coin REQUIRED)`.
Building without frameworks should work with some CMake options (you need to add `-DCOIN_BUILD_MAC_FRAMEWORK=OFF` and `-DSOQT_BUILD_MAC_FRAMEWORK=OFF`,  and `CMAKE_INSTALL_PREFIX=/Users/riccardo/CoinOnMacOSX/installed` as well as `CMAKE_PREFIX_PATH="/Users/riccardo/CoinOnMacOSX/installed;/usr/local/Cellar/qt/5.12.1"` to your CMake command lines for Coin and SoQt). 

In both cases I added SoQt::SoQt and Coin::Coin to the target_link_libraries call instead of the SOQT_LIBRARIES argument.

Hope that gets you somewhat further.

Cheers, Volker
Reply all
Reply to author
Forward
0 new messages