[MacPorts] #23320: fail to install wxwidgets-devel on snow leopard
#23320: fail to install wxwidgets-devel on snow leopard ----------------------------------------+----------------------------------- Reporter: klebermagno@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: MacPorts 1.8.3 Component: ports | Version: 1.8.2 Keywords: build fail wxwidgets-devel | Port: wxwidgets-devel ----------------------------------------+----------------------------------- When I try install wxwidgets-devel on snow leopard I got this message. {{{ DEBUG: Executing org.macports.build (wxWidgets-devel) DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.6' DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/wxWidgets-2.9.0/build" && /usr/bin/make -j2' /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/wxWidgets-2.9.0/build/bk- make-pch ./.pch/wxprec_monodll/wx/wxprec.h.gch wx/wxprec.h /usr/bin/g++-4.2 -mmacosx-version-min=10.6 -I./.pch/wxprec_monodll -D__WXOSX_COCOA__ -DWXBUILDING -I../src/regex -DwxUSE_BASE=1 -DWXMAKINGDLL -I../src/stc/scintilla/include -I../src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -dynamic -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets- devel/work/wxWidgets-2.9.0/build/lib/wx/include/osx_cocoa-unicode- release-2.9 -I../include -I/opt/local/include -I/opt/local/include -DWX_PRECOMP -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -O2 -arch x86_64 -arch i386 -fno-common -fvisibility=hidden -fvisibility- inlines-hidden /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/wxWidgets-2.9.0/build/bk- make-pch ./.pch/wxprec_gldll/wx/wxprec.h.gch wx/wxprec.h /usr/bin/g++-4.2 -mmacosx-version-min=10.6 -I./.pch/wxprec_gldll -D__WXOSX_COCOA__ -DWXBUILDING -I../src/regex -DWXUSINGDLL -DWXMAKINGDLL_GL -dynamic -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets- devel/work/wxWidgets-2.9.0/build/lib/wx/include/osx_cocoa-unicode- release-2.9 -I../include -I/opt/local/include -I/opt/local/include -DWX_PRECOMP -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -O2 -arch x86_64 -arch i386 -fno-common -fvisibility=hidden -fvisibility- inlines-hidden g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags make: *** [.pch/wxprec_monodll/wx/wxprec.h.gch] Error 1 make: *** Waiting for unfinished jobs.... g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags make: *** [.pch/wxprec_gldll/wx/wxprec.h.gch] Error 1 Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/wxWidgets-2.9.0/build" && /usr/bin/make -j2 " returned error 2 DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/wxWidgets-2.9.0/build" && /usr/bin/make -j2 " returned error 2 while executing "command_exec build" (procedure "portbuild::build_main" line 9) invoked from within "$procedure $targetname" Warning: the following items did not execute (for wxWidgets-devel): org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets> }}} -- Ticket URL: <http://trac.macports.org/ticket/23320> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxwidgets-devel on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxwidgets-devel -----------------------------------+---------------------------------------- Changes (by macsforever2000@…): * cc: mww@… (added) * keywords: build fail wxwidgets-devel => * owner: macports-tickets@… => jwa@… * milestone: MacPorts 1.8.3 => -- Ticket URL: <http://trac.macports.org/ticket/23320#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxWidgets-devel -----------------------------------+---------------------------------------- Changes (by jmr@…): * port: wxwidgets-devel => wxWidgets-devel -- Ticket URL: <http://trac.macports.org/ticket/23320#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxWidgets-devel -----------------------------------+---------------------------------------- Comment(by domiman@…): see ticket #21530 for a proposed portfile that builds universal. I'm trying this now :) -- Ticket URL: <http://trac.macports.org/ticket/23320#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxWidgets-devel -----------------------------------+---------------------------------------- Comment(by ruud@…): Replying to [comment:4 domiman@…]:
see ticket #21530 for a proposed portfile that builds universal. I'm trying this now :) As stated in that ticket, this problem could/should be solved now.
-- Ticket URL: <https://trac.macports.org/ticket/23320#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxWidgets-devel -----------------------------------+---------------------------------------- Comment(by wpdster@…): Replying to [comment:6 ruud@…]:
Replying to [comment:4 domiman@…]:
see ticket #21530 for a proposed portfile that builds universal. I'm trying this now :) As stated in that ticket, this problem could/should be solved now. I just tried:
{{{$ sudo port install wxwidgets-devel +universal}}} and it failed. A pertinent portion of the log file appears to be: {{{ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/wxWidgets- 2.9.1/build/bk-make-pch ./.pch/wxprec_monodll/wx/wxprec.h.gch wx/wxprec.h /usr/bin/g++-4.2 -mmacosx-version- min=10.6 -I./.pch/wxprec_monodll -D__WXOSX_COCOA__ -DWXBUILDING -I../src/regex -DwxUSE_BASE=1 -DWXMAKINGDLL -I../src/stc/scintilla/include -I../src/stc/scintilla/src -D__WX__ -DSCI_LEXER -DLINK_LEXERS -dynamic -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor- privacy -Woverloaded-virtual -Wno-deprecated-declarations -D_FILE_OFFSET_BITS=64 -I/opt/local/var/macports/build /_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/wxWidgets- 2.9.1/build/lib/wx/include/osx_cocoa-unicode-2.9 -I../include -I/opt/local/include -I/opt/local/include -DWX_PRECOMP -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -O2 -arch x86_64 -arch i386 -fno-common -fvisibility=hidden -fvisibility-inlines-hidden :info:build g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags }}} -- Ticket URL: <https://trac.macports.org/ticket/23320#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxWidgets-devel -----------------------------------+---------------------------------------- Comment(by cdavis@…): All right, I've worked through this, and there are three distinct issues here: 1. Using dependency options and compiling PCH files You can't do either of those with multiple arch flags. Even if you remove the dependency options, when gcc tries to precompile a header into a PCH given multiple arch flags, it will instead try to compile a regular ol' program instead. (ld will complain that '_main' is undefined.) I fixed it locally by the port belong to the muniversal group. 2. OBJCXXFLAGS isn't set OK, you got past the first problem, and wxWidgets is building just fine. Suddenly, the build stops with an error message. Looking at the log file reveals a bunch of 'file is not of the architecture being linked' messages from ld. Inspecting the files that were compiled wrong reveals something telling: They're all Objective-C++ files! For some reason, wx's build system uses the OBJCXXFLAGS variable instead of the CXXFLAGS variable when compiling an Objective-C++ file. Since the Portfile didn't set OBJCXXFLAGS, no Objective-C++ sources get built for the right architecture. I fixed it by manually playing with the top-level makefile, but the right way to fix this is to set OBJCXXFLAGS in the Portfile during the configure stage. 3. Symlink merging madness Finally, you solved problems 1 and 2 and got the build to finish. Because we put wxWidgets-devel in the muniversal group, now MacPorts will install the two build trees into two destroots, then merge them together. Unfortunately, there's one small problem with that: MacPorts doesn't know how to merge symlink files. Here's a relevant snippet from the log: {{{ :debug:destroot universal: merge: /opt/local/lib/wx-devel/bin/wx-config only exists in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/destroot-x86_64 :debug:destroot universal: merge: /opt/local/lib/wx-devel/bin/wx-config only exists in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/destroot-i386 }}} So it knows that both symlinks are there, but it thinks they're distinct. So, it copies each one over to the merged destroot. Unfortunately, copying the second one fails because the file already exists: {{{ :error:destroot Target org.macports.destroot returned: error copying "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets- devel/work/destroot-i386//opt/local/lib/wx-devel/bin/wx-config" to "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets-devel/work/destroot- intel//opt/local/lib/wx-devel/bin/wx-config": file already exists }}} This is as far as I got. One possible solution is to forcibly copy the symlink over. However, I think the real solution is to teach MacPorts to recognize and handle symlinks properly when merging two destroots. -- Ticket URL: <https://trac.macports.org/ticket/23320#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxWidgets-devel -----------------------------------+---------------------------------------- Comment(by piotr1212@…): I get the wxwidgets-devel port installed, but when I try to run a program which is linked to wxwidgets I get the next error: $ ./bitcoin dyld: Library not loaded: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_ports_graphics_wxWidgets- devel/work/wxWidgets-2.9.1/build/lib/libwx_osx_carbonu-2.9.1.0.0.dylib Referenced from: /usr/local/src/bitcoin/trunk/./bitcoin Reason: image not found Trace/BPT trap Why does it try to load the library from that path? -- Ticket URL: <https://trac.macports.org/ticket/23320#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard -----------------------------------+---------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: wxWidgets-devel -----------------------------------+---------------------------------------- Comment(by jwa@…): Is this still a problem with 2.9.4? On Lion and ML wxWidgets-devel builds fine with universal (just checked) -- Ticket URL: <https://trac.macports.org/ticket/23320#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#23320: fail to install wxWidgets-devel +universal on snow leopard ------------------------------------+--------------------------------------- Reporter: klebermagno@… | Owner: jwa@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: Port: wxWidgets-devel | ------------------------------------+--------------------------------------- Changes (by jwa@…): * status: new => closed * resolution: => fixed Comment: getting no comments, this will be closed for now, can be reopened, if the problem persists -- Ticket URL: <https://trac.macports.org/ticket/23320#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts