Opened 15 years ago
Closed 14 years ago
#22168 closed defect (fixed)
gdc-0.24 fails to build with MacPorts 1.8
Reported by: | afalquina@… | Owned by: | mww@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | Cc: | t.kunishi@…, bgschaid@…, ryandesign (Ryan Carsten Schmidt), da.br.oz+gdcfail@… | |
Port: | gdc |
Description
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
Attachments (1)
Change History (14)
Changed 15 years ago by afalquina@…
Attachment: | port.txt.bz2 added |
---|
comment:1 Changed 15 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to mww@… |
---|
comment:2 follow-up: 4 Changed 15 years ago by afb@…
comment:3 Changed 15 years ago 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.
comment:4 Changed 15 years ago by afalquina@…
Replying to 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 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...
comment:5 Changed 15 years ago by afb@…
Sounds like #21388, probably it needs a AR=ar somewhere like in the configure.env.
comment:6 Changed 15 years ago 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.
comment:7 Changed 15 years ago 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.
comment:10 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Summary: | gdc-0.24 fails to build on Snow Leopard → gdc-0.24 fails to build with MacPorts 1.8 |
Markus, can you fix this, please? This prevents gdc from being installed at all on MacPorts 1.8 and later.
comment:13 Changed 14 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
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 gcc41 port does: