#43978 closed defect (fixed)
libgcc: error: unknown value '10.10' of -mmacosx-version-min
Reported by: | AP1010 | Owned by: | larryv (Lawrence Velázquez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.0 |
Keywords: | yosemite | Cc: | jeremyhu (Jeremy Huddleston Sequoia), skymoo (Adam Mercer), pturing@…, platipodium (Carsten Lemmen), borodiychuk (Andriy Borodiychuk), ryandesign (Ryan Carsten Schmidt), cooljeanius (Eric Gallager), davidchambers (David Chambers), eirnym (Eir Nym), arthurprat@…, jbgoette (Jörg Götte), tristancollins (Tristan Collins), enxbw3@…, rubendibattista (Ruben Di Battista), mww@…, anddam (Andrea D'Amore), klmarkey@…, lzkelley (Luke) |
Port: | libgcc gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 |
Description
Ateempt to build libgcc on Yosemite fails with the following error:
configure: error: cannot compute suffix of object files: cannot compile
In the config.log (attached) the following message:
conftest.c:1:0: error: unknown value '10.10' of -mmacosx-version-min
suggests that the Yosemite OS X version (10.10) may not be handled correctly
Attachments (4)
Change History (80)
Changed 10 years ago by AP1010
Changed 10 years ago by AP1010
Attachment: | config.log added |
---|
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | Libgcc removed |
---|---|
Owner: | changed from macports-tickets@… to mww@… |
Port: | libgcc added |
Priority: | Low → Normal |
Summary: | libgcc not building on Yosemite → libgcc: error: unknown value '10.10' of -mmacosx-version-min |
comment:7 Changed 10 years ago by borodiychuk (Andriy Borodiychuk)
As far as I can understand, this file (at least) has to be patched:
gcc-4.8.2/gcc/config/darwin-c.c, around lines 573-597:
/* Return the value of darwin_macosx_version_min suitable for the __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro, so '10.4.2' becomes 1040. The lowest digit is always zero. Print a warning if the version number can't be understood. */ static const char * version_as_macro (void) { static char result[] = "1000"; if (strncmp (darwin_macosx_version_min, "10.", 3) != 0) goto fail; if (! ISDIGIT (darwin_macosx_version_min[3])) goto fail; result[2] = darwin_macosx_version_min[3]; if (darwin_macosx_version_min[4] != '\0' // <--- This is the problem. The code does not expect minor version to be 2-chars, rather only one-char. && darwin_macosx_version_min[4] != '.') // <--- So for 10.X it works, bit for 10.XX it gives an error goto fail; return result; fail: error ("unknown value %qs of -mmacosx-version-min", darwin_macosx_version_min); return "1000"; }
comment:8 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
I'll put together a patch for apple-gcc42, and you guys can take care of merging it into the GPL3 ports.
comment:11 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… dave@… egall@… added |
---|
comment:13 follow-up: 14 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
gcc48, gcc49 and gcc410 have a fix for this as of r123168. I'll work on earlier gcc versions next.
Changed 10 years ago by borodiychuk (Andriy Borodiychuk)
Attachment: | main.gcc49.log added |
---|
Yosemite, 10.10, libgcc 4.9.1
comment:14 follow-up: 16 Changed 10 years ago by borodiychuk (Andriy Borodiychuk)
Replying to ryandesign@…:
gcc48, gcc49 and gcc410 have a fix for this as of r123168. I'll work on earlier gcc versions next.
Tried to build it again Yosemite, after upgrading ports. Now it tries to build libgcc 4.9.1, but also fails with an error. I have attached a logfile in the previous comment.
comment:15 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
All that I'm planning on dealing with in this ticket is the handling of the 10.10 version number.
comment:16 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
comment:20 Changed 10 years ago by larryv (Lawrence Velázquez)
Here’s the official upstream fix on the GCC 4.9 branch.
comment:22 follow-up: 27 Changed 10 years ago by macports_org@…
Am finding I cannot install octave because the same issue is occurring for gcc47.
comment:23 follow-up: 26 Changed 10 years ago by arthurprat@…
Hello, I needed gcc47 so I manually applied the patch from r123168 (which was designed for gcc48, gcc49 and gcc410) to the gcc47 files. It seems to work, but is there anything I should worry about? A reason this patch was not applied to gcc47 too in the first place?
comment:25 follow-up: 44 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
AFAIK, upstream is not supporting gcc 4.7 and older any more. What do you need it for?
comment:26 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to arthurprat@…:
A reason this patch was not applied to gcc47 too in the first place?
Because I haven't gotten around to it.
comment:27 follow-up: 29 Changed 10 years ago by jbgoette (Jörg Götte)
Replying to macports_org@…:
Am finding I cannot install octave because the same issue is occurring for gcc47.
The default variant of octave is +atlas which in turn has +gcc47 as default, but can be installed with +gcc48 or +gcc49. This should remove the necessity for gcc47 in the octave installation.
comment:29 Changed 10 years ago by mf2k (Frank Schima)
Replying to jbgoette@…:
The default variant of octave is +atlas which in turn has +gcc47 as default, but can be installed with +gcc48 or +gcc49. This should remove the necessity for gcc47 in the octave installation.
While that is unfortunate and probably should be changed in the atlas port, there is nothing "necessary" about using gcc47 and installing octave. Simple manually install atlas with +gcc48
and then you no longer need it for installing octave.
comment:31 follow-up: 32 Changed 10 years ago by larryv (Lawrence Velázquez)
Cc: | enxbw3@… added |
---|
Has duplicate #45549.
comment:32 Changed 10 years ago by enxbw3@…
comment:33 follow-up: 34 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
gcc48, gcc49 and gcc5 have already been fixed to work on Yosemite. gcc47 and earlier have not yet.
comment:34 Changed 10 years ago by enxbw3@…
Replying to ryandesign@…:
gcc48, gcc49 and gcc5 have already been fixed to work on Yosemite. gcc47 and earlier have not yet.
So that means I have to wait for the fixing of gcc46 as far as I can understand. Anyway, thanks for all your work. : )
comment:35 follow-ups: 36 37 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Why can't use use gcc48 or newer?
comment:36 Changed 10 years ago by enxbw3@…
Replying to ryandesign@…:
Why can't use use gcc48 or newer?
Of course I can if that can replace gcc46! Sorry for the misunderstanding. I thought it can't.
comment:37 follow-up: 38 Changed 10 years ago by enxbw3@…
Replying to ryandesign@…:
Why can't use use gcc48 or newer?
Sorry sir, but while I am try to install my software with gcc48, following error showed up:
/bin/sh: g++-mp-4.6: command not found
Is this because I used gcc48 instead of gcc46?
comment:38 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to enxbw3@…:
/bin/sh: g++-mp-4.6: command not found
If you are manually runing g++-mp-4.6
, then run g++-mp-4.8
instead. If this is happening because of some other script you're running, figure out where in that script it's referencing g++-mp-4.6
and change it to g++-mp-4.8
.
comment:41 Changed 10 years ago by larryv (Lawrence Velázquez)
Cc: | rubendibattista@… added |
---|
Replying to rubendibattista@…:
Cc me please!
You need to click the “Cc” button next to the Cc list above to actually be Cc’d. I’ve added you.
comment:42 follow-up: 45 Changed 10 years ago by rubendibattista (Ruben Di Battista)
Thanks! Sorry I'm new here...
Anyway I'm trying to compile OpenFOAM with Gcc48 and I'm getting segmentation fault: 11 when running the executables. Can this be connected to this issue?
comment:43 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Doesn't sound like it. Please file a new ticket or ask on the mailing list.
comment:44 Changed 10 years ago by arthurprat@…
Replying to jeremyhu@…:
AFAIK, upstream is not supporting gcc 4.7 and older any more. What do you need it for?
I may have been a bit quick actually, I thought I needed it because of some things that would not compile with 4.8 but actually everything works fine, thanks
comment:45 Changed 10 years ago by arthurprat@…
Replying to rubendibattista@…:
Thanks! Sorry I'm new here...
Anyway I'm trying to compile OpenFOAM with Gcc48 and I'm getting segmentation fault: 11 when running the executables. Can this be connected to this issue?
Make sure you got the last version of the gcc48 port : 4.8.3_1. That _1 is specifically there to get rid of segmentation faults on Yosemite
comment:47 follow-up: 48 Changed 10 years ago by eirnym (Eir Nym)
Good news.
Upstream fixes: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=215251
Homebrew has been closed issue: https://github.com/Homebrew/homebrew-versions/issues/450
comment:48 Changed 10 years ago by larryv (Lawrence Velázquez)
Replying to eirnym@…:
Upstream fixes
We’re aware. It’s been fixed on upstream trunk and the 4.9 branch for over a month.
Homebrew has been closed issue
Homebrew only provides GCC 4.9. Our gcc48
, gcc49
, and gcc5
ports have been fixed for a while.
comment:49 Changed 10 years ago by larryv (Lawrence Velázquez)
Cc: | mww@… added; larryv@… removed |
---|---|
Owner: | changed from mww@… to larryv@… |
Port: | gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 gcc5 added |
Status: | new → assigned |
comment:52 Changed 10 years ago by larryv (Lawrence Velázquez)
Cc: | klmarkey@… added |
---|
Has duplicate #45632.
comment:53 follow-ups: 54 55 Changed 10 years ago by eirnym (Eir Nym)
Homebrew only provides GCC 4.9. Our gcc48, gcc49, and gcc5 ports have been fixed for a while.
I haven't seen messages where told they've been fixed.
I need any version of fortran compiler, not GCC itself. I need any available compiler I can use for scipy. I really need it.
comment:54 follow-up: 57 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
comment:55 Changed 10 years ago by larryv (Lawrence Velázquez)
Have you actually tried to install any of them? They compile and install fine. Run sudo port selfupdate
first to make sure you have the latest ports.
comment:56 follow-up: 62 Changed 10 years ago by larryv (Lawrence Velázquez)
gcc46
fixed in r127393.
comment:57 follow-up: 58 Changed 10 years ago by eirnym (Eir Nym)
Replying to ryandesign@…:
See comment:13 above.
comment:14 has stopped me think this is final fix.
Replying to larryv@…:
Have you actually tried to install any of them?
Yes, before comment:13.
I need alternate Fortran compiler. I don't want install gcc with bugs every year. Do you know good compiler to port (or to use)?
comment:58 follow-up: 59 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to eirnym@…:
Replying to ryandesign@…:
See comment:13 above.
comment:14 has stopped me think this is final fix.
That was a separate problem, which was separately fixed. See comment:16.
I need alternate Fortran compiler. I don't want install gcc with bugs every year. Do you know good compiler to port (or to use)?
Try the gcc49 port. It is the latest stable version of gcc.
comment:59 Changed 10 years ago by eirnym (Eir Nym)
Replying to ryandesign@…:
That was a separate problem, which was separately fixed. See comment:16.
I see
Replying to ryandesign@…:
I need alternate Fortran compiler. I don't want install gcc with bugs every year. Do you know good compiler to port (or to use)?
Try the gcc49 port. It is the latest stable version of gcc.
I've tied to have delay in developing for 3-5 months every year. I need alternate fortran compiler codebase.
comment:60 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
This ticket is about fixing a specific problem with the gcc ports on Yosemite, so let's keep the comments relevant to that. For suggestions of other fortran compilers, you could ask on the macports-users mailing list.
comment:61 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
I think I may have accidentally seen the source changes for this change when I looked at Jack's patch attached to #45449
If the changes being made to the gccXY ports are the same as the patch Jack attached to #45449, then this is an incorrect change.
Please look at the change I referenced in this ticket three months ago (r122725) as the correct solution and inform upstream if they are doing it wrong.
comment:62 follow-ups: 64 73 Changed 10 years ago by elfprince13 (Thomas Dickerson)
comment:63 follow-up: 65 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Why do you want such a dated compiler? IMO, we should mark gcc 4.6 and earlier as unavailable on OS X 10.10 like I've been doing for dated llvm.
comment:64 Changed 10 years ago by larryv (Lawrence Velázquez)
Replying to elfprince13@…:
Any idea if that will work with gcc45, or how much work might be needed to backport the fix to gcc45?
I haven’t looked at gcc45
yet. Even after applying this fix, there’s no guarantee that it’ll function correctly on Yosemite without further work.
comment:65 Changed 10 years ago by larryv (Lawrence Velázquez)
Replying to jeremyhu@…:
Why do you want such a dated compiler? IMO, we should mark gcc 4.6 and earlier as unavailable on OS X 10.10 like I've been doing for dated llvm.
I’m inclined to agree.
comment:67 follow-up: 68 Changed 10 years ago by lzkelley (Luke)
Is there any workaround for this? almost everything needs libgcc.
comment:68 follow-up: 69 Changed 10 years ago by larryv (Lawrence Velázquez)
Not sure what you mean.
- This has already been fixed for
libgcc
andgcc46
throughgcc5
. Are you still having problems installing any of those ports? Have you runsudo port selfupdate
lately to retrieve the latest ports? - Nearly nothing requires
libgcc
, except a few ports that use GCC for specific things.
comment:69 follow-up: 70 Changed 10 years ago by lzkelley (Luke)
Replying to larryv@…:
Not sure what you mean.
- This has already been fixed for
libgcc
andgcc46
throughgcc5
. Are you still having problems installing any of those ports? Have you runsudo port selfupdate
lately to retrieve the latest ports?- Nearly nothing requires
libgcc
, except a few ports that use GCC for specific things.
I just reinstalled macports yesterday (after installing 10.10), so it should all be up to date. I can't install gcc48 (e.g.) because it fails on libgcc dependency. There are a bunch of python ports which seem to depend on it, and a couple of other science-specific ports.
comment:70 follow-up: 71 Changed 10 years ago by lzkelley (Luke)
Replying to lkelley@…:
Replying to larryv@…:
Not sure what you mean.
- This has already been fixed for
libgcc
andgcc46
throughgcc5
. Are you still having problems installing any of those ports? Have you runsudo port selfupdate
lately to retrieve the latest ports?- Nearly nothing requires
libgcc
, except a few ports that use GCC for specific things.I just reinstalled macports yesterday (after installing 10.10), so it should all be up to date. I can't install gcc48 (e.g.) because it fails on libgcc dependency. There are a bunch of python ports which seem to depend on it, and a couple of other science-specific ports.
Yeah... it still fails, same error as #44510 which was removed as duplicate of this ticket.
comment:71 follow-up: 72 Changed 10 years ago by larryv (Lawrence Velázquez)
Doesn’t look the same to me. The error in #44510 was the same as in this ticket (“cannot compute suffix of object files”, etc.). This is the error you’re seeing:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/gcc-4.9.1/gcc/fortran/module.c:113:1: error: conflicting declaration 'typedef enum pointer_t pointer_t' :info:build pointer_t; :info:build ^ :info:build In file included from /usr/include/mach/memory_object_types.h:77:0, :info:build from /usr/include/mach/mach_types.h:85, :info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-gcc/include-fixed/malloc.h:37, :info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/gcc-4.9.1/gcc/system.h:466, :info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/gcc-4.9.1/gcc/fortran/module.c:68: :info:build /usr/include/mach/vm_types.h:40:26: note: previous declaration as 'typedef vm_offset_t pointer_t' :info:build typedef vm_offset_t pointer_t; :info:build ^ :info:build make[3]: *** [fortran/module.o] Error 1
Could you open a new ticket for this?
comment:72 Changed 10 years ago by lzkelley (Luke)
Replying to larryv@…:
Doesn’t look the same to me. The error in #44510 was the same as in this ticket (“cannot compute suffix of object files”, etc.). This is the error you’re seeing:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/gcc-4.9.1/gcc/fortran/module.c:113:1: error: conflicting declaration 'typedef enum pointer_t pointer_t' :info:build pointer_t; :info:build ^ :info:build In file included from /usr/include/mach/memory_object_types.h:77:0, :info:build from /usr/include/mach/mach_types.h:85, :info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/build/prev-gcc/include-fixed/malloc.h:37, :info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/gcc-4.9.1/gcc/system.h:466, :info:build from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/libgcc/work/gcc-4.9.1/gcc/fortran/module.c:68: :info:build /usr/include/mach/vm_types.h:40:26: note: previous declaration as 'typedef vm_offset_t pointer_t' :info:build typedef vm_offset_t pointer_t; :info:build ^ :info:build make[3]: *** [fortran/module.o] Error 1Could you open a new ticket for this?
Opened ticket #45758, sorry for the missplacement!
comment:75 Changed 10 years ago by larryv (Lawrence Velázquez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Jeremy had pointed this out by private mail on the 4th: