[MacPorts] #22168: gdc-0.24 fails to build on Snow Leopard
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- The following command: {{{ sudo port -v install gdc }}} fails with this output: {{{ cc1: error: unrecognized command line option "-arch" }}} Find attached the rest of the command's output as a text file compressed with bzip2. This is some information about my system: {{{ $ sw_vers ProductName: Mac OS X ProductVersion: 10.6.1 BuildVersion: 10B504 $ uname -a Darwin MacBookPro.local 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386 $ port version Version: 1.8.1 About XCode: Version 3.2 64-bit Component versions Xcode IDE: 1610.0 Xcode Core: 1608.0 ToolSupport: 1591.0 }}} -- Ticket URL: <http://trac.macports.org/ticket/22168> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => mww@… -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Comment(by afb@…): When building a non-Apple GCC (as in FSF GCC), you can't use the -arch flags (like in the default archflags). So you need to do some workaround like the http://trac.macports.org/browser/trunk/dports/lang/gcc41 port does: {{{ # the generated compiler doesn't accept -arch if {[info exists build_arch] && ${os.platform} == "darwin"} { configure.cc_archflags configure.cxx_archflags configure.objc_archflags configure.pre_args-append --build=${build_arch}-apple- darwin${os.major} } }}} -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Comment(by afb@…): Alternatively someone could do a `apple-gdc40` port, that would accept the -arch flags and similar... Or even better make GDC run with gcc-4.2 as well as gcc-4.0, by updating the upstream code for it. -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Comment(by afalquina@…): Replying to [comment:2 afb@…]:
When building a non-Apple GCC (as in FSF GCC), you can't use the -arch flags (like in the default archflags).
So you need to do some workaround like the http://trac.macports.org/browser/trunk/dports/lang/gcc41 port does:
I have added those lines to the Portfile and after a while I get the following error: {{{ gnumake[2]: i386-apple-darwin10.0.0-ar: No such file or directory }}} I guess I have missed something, since it is the first time I have ever touched a Portfile... -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Comment(by afb@…): Sounds like #21388, probably it needs a AR=ar somewhere like in the configure.env. -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Comment(by afb@…): The reason it is needed is that the workaround above sets it up for a GNU- style cross-compilation (--build being different from OS) but then it lacks some matching links for the various compiler/linker commands. It also leads to other things like adding a prefix to all the generated commands (like seen in #22163). The "easiest" would have been to not add that -arch everywhere, but the workaround is to use `--program-prefix=""` in the configure. -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build on Snow Leopard -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Comment(by afalquina@…): I added `--program-prefix=""` to configure.args, but the build still failed. Afterwards, I added `AR=ar` to configure.env, then `AS=as`, `NM=nm`, `LD=ld` as different programs were reported to be missing. Finally it complains about `i386-apple-darwin10.0.0-cc`. I have not found a way around this. -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build with MacPorts 1.8 -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Changes (by ryandesign@…): * cc: ryandesign@… (added) Comment: Markus, can you fix this, please? This prevents gdc from being installed at all on MacPorts 1.8 and later. -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build with MacPorts 1.8 -------------------------------+-------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Keywords: | Port: gdc -------------------------------+-------------------------------------------- Comment(by ryandesign@…): Has duplicate #26442. -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#22168: gdc-0.24 fails to build with MacPorts 1.8 --------------------------------+------------------------------------------- Reporter: afalquina@… | Owner: mww@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.1 Resolution: fixed | Keywords: Port: gdc | --------------------------------+------------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed Comment: r71393 -- Ticket URL: <http://trac.macports.org/ticket/22168#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts