[MacPorts] #52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix -------------------------------------+-------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: opencsg -------------------------------------+-------------------------------- openCSG is a component of OpenSCAD. By default, it does not honour -stdlib=libc++, and links against libstdc++. {{{ $ otool -L libopencsg.1.4.0.dylib libopencsg.1.4.0.dylib: /opt/local/lib/libopencsg.1.dylib (compatibility version 1.4.0, current version 1.4.0) /opt/local/lib/libGLEW.2.0.0.dylib (compatibility version 2.0.0, current version 2.0.0) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) }}} there is no configure script to send arguments to, so the attached patch modifies the Portfile to reinplace the Makefile directly to make it link to the correct libc++. See also [ticket:51840} After patch: {{{ $ otool -L libopencsg.1.4.0.dylib libopencsg.1.4.0.dylib: /opt/local/lib/libopencsg.1.dylib (compatibility version 1.4.0, current version 1.4.0) /opt/local/lib/libGLEW.2.0.0.dylib (compatibility version 2.0.0, current version 2.0.0) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 3.7.1) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) /usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 3.7.0) }}} -- Ticket URL: <https://trac.macports.org/ticket/52442> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix --------------------------------------+------------------------ Reporter: ken.cunningham.webuse@… | Owner: dstrubbe@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencsg | --------------------------------------+------------------------ Changes (by dstrubbe@…): * owner: macports-tickets@… => dstrubbe@… -- Ticket URL: <https://trac.macports.org/ticket/52442#comment:1> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix --------------------------------------+------------------------ Reporter: ken.cunningham.webuse@… | Owner: dstrubbe@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencsg | --------------------------------------+------------------------ Comment (by dstrubbe@…): Do we really need to add "-std=c++11" for these purposes? For the record, yes the configure options are used by the qmake portgroup. -- Ticket URL: <https://trac.macports.org/ticket/52442#comment:2> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix --------------------------------------+------------------------ Reporter: ken.cunningham.webuse@… | Owner: dstrubbe@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencsg | --------------------------------------+------------------------ Comment (by larryv@…): That seems like an overreach to me. Don’t force C++11 if the source code doesn’t require it. Also: The test is too weak. You should also be testing that the platform is Darwin and the compiler is Clang. -- Ticket URL: <https://trac.macports.org/ticket/52442#comment:3> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix --------------------------------------+------------------------ Reporter: ken.cunningham.webuse@… | Owner: dstrubbe@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencsg | --------------------------------------+------------------------ Comment (by ken.cunningham.webuse@…): Wasn't 100% sure of the c++11 part for opencsg, but openscad uses c++11 so I I added it here too. It works, but maybe isn't needed. I didn't deeply dig into that part of it. After configuring, I couldn't find the optflag in the Makefile.... and I know the cmake portgroup ignores them, so I thought the qmake portgroup might as well. {{{ configure.optflags -O3 }}} -- Ticket URL: <https://trac.macports.org/ticket/52442#comment:4> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix --------------------------------------+------------------------ Reporter: ken.cunningham.webuse@… | Owner: dstrubbe@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencsg | --------------------------------------+------------------------ Comment (by dstrubbe@…): Do me a favor, try this more general patch and see if it puts the right thing into CXXFLAGS in your Makefiles. {{{ Index: ../../_resources/port1.0/group/qmake-1.0.tcl =================================================================== --- ../../_resources/port1.0/group/qmake-1.0.tcl (revision 153298) +++ ../../_resources/port1.0/group/qmake-1.0.tcl (working copy) @@ -44,8 +44,9 @@ configure.pre_args-append PREFIX=${prefix} \ "QMAKE_CC=${configure.cc}" \ "QMAKE_CXX=${configure.cxx}" \ - "QMAKE_OBJC=${configure.objc}" - configure.args-append "CFLAGS=\"${configure.cflags} [get_canonical_archflags cc]\"" + "QMAKE_OBJC=${configure.objc}" \ + "QMAKE_CFLAGS=\"${configure.cflags} [get_canonical_archflags cc]\"" \ + "QMAKE_CXXFLAGS=\"${configure.cxxflags} [get_canonical_archflags cxx]\"" configure.universal_args-delete --disable-dependency-tracking if {[variant_exists universal] && [variant_isset universal]} { }}} -- Ticket URL: <https://trac.macports.org/ticket/52442#comment:5> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix --------------------------------------+------------------------ Reporter: ken.cunningham.webuse@… | Owner: dstrubbe@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: opencsg | --------------------------------------+------------------------ Comment (by ken.cunningham.webuse@…): That works beautifully on this 10.6 / LibCxx machine. That looks like the elegant solution I suspected must exist, but didn't know where to put or how to do. Thanks! OpenCSG and openSCAD build through to completion now without touching a thing. I thought the hard-coded 10.7 deployment target in the openscad makefile might mess things up, but it did not seem to affect anything. Complete success. -- Ticket URL: <https://trac.macports.org/ticket/52442#comment:6> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52442: opencsg @1.4.0 does not honor -stdlib=libc++ and patch to fix --------------------------------------+------------------------ Reporter: ken.cunningham.webuse@… | Owner: dstrubbe@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: Port: opencsg | --------------------------------------+------------------------ Changes (by dstrubbe@…): * status: new => closed * resolution: => fixed Comment: qmake portgroup change committed in r153331. -- Ticket URL: <https://trac.macports.org/ticket/52442#comment:7> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
participants (1)
-
MacPorts