Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Aug 2016 02:18:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 212166] graphics/opencsg links to qt4
Message-ID:  <bug-212166-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212166

            Bug ID: 212166
           Summary: graphics/opencsg links to qt4
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: mr@FreeBSD.org
          Reporter: hmbright@fastmail.com
          Assignee: mr@FreeBSD.org
             Flags: maintainer-feedback?(mr@FreeBSD.org)

opencsg is linked to Qt4 libraries which can cause problems with programs u=
sing
qt5.=20

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 open=
csg
and qt5=20


[root@freebsd-32gb-nyc3-01 /usr/local/lib]# ldd libopencsg.so
libopencsg.so:
        libGL.so.1 =3D> /usr/local/lib/libGL.so.1 (0x80161d000)
        libQtGui.so.4 =3D> /usr/local/lib/qt4/libQtGui.so.4 (0x801a00000)
        libQtCore.so.4 =3D> /usr/local/lib/qt4/libQtCore.so.4 (0x802800000)
 . . . .=20


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.=20

For example the link line of the make goes like this:


donb@gcc1-power7:~/openscad_deps/src/OpenCSG-1.3.2/src$ make VERBOSE=3D1
...
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=20

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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212166-13>