opencsg is linked to Qt4 libraries which can cause problems with programs using qt5. Specifically it links to /usr/local/lib/qt4/libQtGui.so.4 and libQtCore.so.4, which can cause a segfault if you build a program linking against both opencsg and qt5 [root@freebsd-32gb-nyc3-01 /usr/local/lib]# ldd libopencsg.so libopencsg.so: libGL.so.1 => /usr/local/lib/libGL.so.1 (0x80161d000) libQtGui.so.4 => /usr/local/lib/qt4/libQtGui.so.4 (0x801a00000) libQtCore.so.4 => /usr/local/lib/qt4/libQtCore.so.4 (0x802800000) . . . . To reproduce: build a program that links to both opencsg and qt5 Possible solution: hack the opencsg build system so it doesnt link to qt. the library doesn't actually use QT in any of it's code so there is no need to link. For example the link line of the make goes like this: donb@gcc1-power7:~/openscad_deps/src/OpenCSG-1.3.2/src$ make VERBOSE=1 ... g++ -m64 -Wl,-O1 -Wl,-rpath,/opt/cfarm/qt5.5.1/lib -shared -Wl,-soname,libopencsg.so.1 -o libopencsg.so.1.3.2 area.o batch.o context.o channelManager.o frameBufferObject.o frameBufferObjectExt.o occlusionQuery.o offscreenBuffer.o opencsgRender.o openglHelper.o pBufferTexture.o primitive.o primitiveHelper.o renderGoldfeather.o renderSCS.o scissorMemo.o settings.o stencilManager.o RenderTexture.o -L/usr/X11R6/lib64 -lGL -L/opt/cfarm/qt5.5.1/lib -lQt5Gui -lQt5Core -lpthread if you remove the QT stuff, like this, it works fine: donb@gcc1-power7:~/openscad_deps/src/OpenCSG-1.3.2/src$ g++ -m64 -Wl,-O1 -Wl,-rpath,/opt/cfarm/qt5.5.1/lib -shared -Wl,-soname,libopencsg.so.1 -o libopencsg.so.1.3.2 area.o batch.o context.o channelManager.o frameBufferObject.o frameBufferObjectExt.o occlusionQuery.o offscreenBuffer.o opencsgRender.o openglHelper.o pBufferTexture.o primitive.o primitiveHelper.o renderGoldfeather.o renderSCS.o scissorMemo.o settings.o stencilManager.o RenderTexture.o -L/usr/X11R6/lib64 -lGL -lpthread
Maintainer feedback?
A commit references this bug: Author: mr Date: Sun Jan 21 16:58:32 UTC 2018 New revision: 459619 URL: https://svnweb.freebsd.org/changeset/ports/459619 Log: Try to simplify the Makefile and avoid linking to the unneeded qt libs. PR: 212166 Changes: head/graphics/opencsg/Makefile
Hi, should be fixed now. Please test. Greetings --- Michael Reifenberger