Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#40439 closed defect (invalid)

gfortran 4.8 SIGILL (build failure buidling libgcc et al)

Reported by: dlougach@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: mww@…, nilstec_inc@…, beany_kelly@…, grischa.toedt@…, alessanderbotti@…, essandess (Steve Smith), mr.mcox@…, kurtjaeke@…, nhpackard@…, someuser12, jiangdzh@…, urilabob@…, Polyergic (Shad Sterling), cooljeanius (Eric Gallager)
Port: libgcc

Description

I have attempted to install gcc48 package, which has a dependency from libgcc. Installation of libgcc failed though. I tried to reinstall macports completely but the problem still persists. There is the following line in the log:

:info:build configure: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build/x86_64-apple-darwin12/libgfortran/config.log

Attachments (16)

config.log (80.8 KB) - added by dlougach@… 11 years ago.
libgfortran config.log
main.log (18.9 MB) - added by dlougach@… 11 years ago.
libgcc installation log
my_profile.spx (287.9 KB) - added by dlougach@… 11 years ago.
System profile
gfortran_2013-09-10-104348_jacob-osx2.crash (7.8 KB) - added by dlougach@… 11 years ago.
gfortran crash log
f951_2013-09-10-104347_jacob-osx2.crash (9.7 KB) - added by dlougach@… 11 years ago.
f951 crash log
my.spx (565.5 KB) - added by leonardo.echeverria@… 11 years ago.
srm_config.log (80.7 KB) - added by srm.1708@… 11 years ago.
srm_main.log (16.1 MB) - added by srm.1708@… 11 years ago.
srm.spx (136.2 KB) - added by srm.1708@… 11 years ago.
srm_f951_2013-09-17-175431_localhost.crash (3.5 KB) - added by srm.1708@… 11 years ago.
srm_gfortran_2013-09-17-175431_localhost.crash (2.9 KB) - added by srm.1708@… 11 years ago.
jt_profile.xml.bz2 (11.3 KB) - added by jtcord@… 11 years ago.
jt_f951_2013-09-17-221815_localhost.crash (3.5 KB) - added by jtcord@… 11 years ago.
jt_gfortran_2013-09-17-221816_localhost.crash (2.9 KB) - added by jtcord@… 11 years ago.
main.2.log (18.9 MB) - added by leonardo.echeverria@… 11 years ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/main.log
libgcc_build_failure.log (13.0 MB) - added by nilstec_inc@… 11 years ago.
libgcc buid failure

Change History (59)

Changed 11 years ago by dlougach@…

Attachment: config.log added

libgfortran config.log

Changed 11 years ago by dlougach@…

Attachment: main.log added

libgcc installation log

comment:1 Changed 11 years ago by dlougach@…

Cc: dlougach@… added

Cc Me!

comment:2 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: openmaintainer@… dlougach@… removed
Owner: changed from macports-tickets@… to jeremyhu@…

You don’t have to Cc yourself, and openmaintainer is not a real email address.

comment:3 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build/./gcc/gfortran -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin12/bin/ -B/opt/local/x86_64-apple-darwin12/lib/ -isystem /opt/local/x86_64-apple-darwin12/include -isystem /opt/local/x86_64-apple-darwin12/sys-include    -c -g -O2  conftest.f >&5
f951: internal compiler error: Illegal instruction: 4

f951: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)

Looks like an upstream bug. Do you have the crash log?

Last edited 11 years ago by jeremyhu (Jeremy Huddleston Sequoia) (previous) (diff)

comment:4 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Also, a system profile would be useful.

comment:5 in reply to:  4 Changed 11 years ago by dlougach@…

Replying to jeremyhu@…:

Also, a system profile would be useful.

uname -a:

Darwin jacob-osx2.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013;
root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64

clang --version:

Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix

If by crash log you mean the stack trace from core dump, I had those disabled at that time. I'll try to force rebuild and see if I get it.

comment:6 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

A system profile can be obtained by running:

system_profiler -xml > ~/Desktop/my.spx

and attaching "my.spx" from your Desktop.

Please enable crash logging and provide that as well.

Changed 11 years ago by dlougach@…

Attachment: my_profile.spx added

System profile

Changed 11 years ago by dlougach@…

gfortran crash log

Changed 11 years ago by dlougach@…

f951 crash log

comment:7 Changed 11 years ago by dlougach@…

I have attached system profile and crash logs. Also I tried to install with "configure.compiler=llvm-gcc-4.2" but it didn't help.

Changed 11 years ago by leonardo.echeverria@…

Attachment: my.spx added

comment:8 Changed 11 years ago by leonardo.echeverria@…

I have a similar issue here after trying

%%sudo port install gcc49

Error: Unable to execute port: Can't install libgcc-devel because conflicting ports are installed: libgcc

Then,

%%sudo port uninstall gcc48 @4.8.1_0

%%sudo port uninstall gcc48 @4.8.1_2

Tried reinstalling gcc48

%%sudo port install gcc48

--->  Computing dependencies for libgcc

--->  Building libgcc

Error: org.macports.build for port libgcc returned: command execution failed

inside the log file:

:info:build checking whether the GNU Fortran compiler is working... no

reinstalled gfortran from Link: http://gcc.gnu.org/wiki/GFortranBinariesMacOS

Error persists

Last edited 11 years ago by leonardo.echeverria@… (previous) (diff)

comment:9 in reply to:  8 ; Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to leonardo.echeverria@…:

I have a similar issue here after trying

No that is different.

%%sudo port install gcc49

Error: Unable to execute port: Can't install libgcc-devel because conflicting ports are installed: libgcc

libgcc-devel cannot be installed because you have libgcc installed, so uninstall libgcc first...

comment:10 in reply to:  9 Changed 11 years ago by leonardo.echeverria@…

Replying to jeremyhu@…: You're right,
my problem now is that I can't reinstall gcc48

Replying to leonardo.echeverria@…:

I have a similar issue here after trying

No that is different.

%%sudo port install gcc49

Error: Unable to execute port: Can't install libgcc-devel because conflicting ports are installed: libgcc

libgcc-devel cannot be installed because you have libgcc installed, so uninstall libgcc first...

comment:11 in reply to:  3 Changed 11 years ago by srm.1708@…

Replying to jeremyhu@…:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build/./gcc/gfortran -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin12/bin/ -B/opt/local/x86_64-apple-darwin12/lib/ -isystem /opt/local/x86_64-apple-darwin12/include -isystem /opt/local/x86_64-apple-darwin12/sys-include    -c -g -O2  conftest.f >&5
f951: internal compiler error: Illegal instruction: 4

f951: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)

Looks like an upstream bug. Do you have the crash log?

I think I'm having exactly the same problem. I tried upgrading libgcc and it failed so I tried uninstalling and reinstalling. It failed again with the following error message

Error: org.macports.build for port libgcc returned: command execution failed
Please see the log file for port libgcc for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libgcc failed

So I looked through main.log and found the same error message that dlougach had.

I figured more info wouldn't hurt so I've attached my logs and crash reports.

Changed 11 years ago by srm.1708@…

Attachment: srm_config.log added

Changed 11 years ago by srm.1708@…

Attachment: srm_main.log added

Changed 11 years ago by srm.1708@…

Attachment: srm.spx added

Changed 11 years ago by srm.1708@…

Changed 11 years ago by srm.1708@…

comment:12 Changed 11 years ago by nilstec_inc@…

Cc: nilstec_inc@… added

Cc Me!

comment:13 Changed 11 years ago by jtcord@…

Can confirm as well. Both f951 and gfortran crashed while making libgcc. attached: profile & both crashlogs

Darwin xxx.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix

Changed 11 years ago by jtcord@…

Attachment: jt_profile.xml.bz2 added

Changed 11 years ago by jtcord@…

Changed 11 years ago by jtcord@…

comment:14 in reply to:  13 ; Changed 11 years ago by leonardo.echeverria@…

Replying to jtcord@…: I tried the following and it worked:

%%sudo port clean libgcc

%%sudo port -v install gcc48 +gfortran

But I still get the same issue when I tried

%%sudo port -v upgrade outdated

make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build'
make: *** [bootstrap] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/work/build" && /usr/bin/make -j2 -w bootstrap 
Exit code: 2
Error: org.macports.build for port libgcc returned: command execution failed
Warning: targets not executed for libgcc: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Failed to install libgcc
Please see the log file for port libgcc for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/main.log
Error: The following dependencies were not installed: libgcc
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Can confirm as well. Both f951 and gfortran crashed while making libgcc. attached: profile & both crashlogs

Darwin xxx.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix

Do you think that there may be a conflict with different versions?

  gcc47 @4.7.3_0
  gcc47 @4.7.3_0+universal
  gcc47 @4.7.3_2+universal (active)
  gcc48 @4.8.1_3 (active)
  libgcc @4.8.1_2+universal
  libgcc @4.8.1_3 (active)
Last edited 11 years ago by leonardo.echeverria@… (previous) (diff)

Changed 11 years ago by leonardo.echeverria@…

Attachment: main.2.log added

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/libgcc/main.log

comment:15 in reply to:  14 Changed 11 years ago by dlougach@…

Replying to leonardo.echeverria@…:

Replying to jtcord@…: I tried the following and it worked:

%%sudo port clean libgcc

%%sudo port -v install gcc48 +gfortran

This worked for me too. "upgrade outdated" worked without errors though. I personally tend to think that the fix of my issue could be related to recent XCode update.

comment:16 Changed 11 years ago by kjellpk (Kjell Konis)

Ticket #40689 perhaps related.

comment:17 Changed 11 years ago by nilstec_inc@…

Can confirm as well, libgcc can not be build. Attached output of sudo port -s install libgcc. My workaround at the moment is to use the prebuild binaries of libgcc. They allow me to install prebuild binaries of gcc and all the following ports I need, like openmpi and mpi4py. The setup then works as expected as long as nothing touches anything fortran. Unfortunately I have some fortran code as well, which is now unusable.

Last edited 11 years ago by nilstec_inc@… (previous) (diff)

Changed 11 years ago by nilstec_inc@…

Attachment: libgcc_build_failure.log added

libgcc buid failure

comment:18 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: libgcc @4.8.1_3 build failure - GNU Fortran is not workinggfortran 4.8 SIGILL (build failure buidling libgcc et al)

This and #40689 are likely the same issue and likely both upstream bugs.

comment:19 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Does the issue go away if you use -O2 instead of -Os ?

comment:20 in reply to:  19 Changed 11 years ago by srm.1708@…

Replying to jeremyhu@…:

Does the issue go away if you use -O2 instead of -Os ?

How do you specify the -O2 flag on macports? I can't find any mention of -O in the man pages.

comment:21 Changed 11 years ago by beany_kelly@…

Cc: beany_kelly@… added

Cc Me!

comment:22 Changed 11 years ago by grischa.toedt@…

Cc: grischa.toedt@… added

Cc Me!

comment:23 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

You can just run the failing command manually and try with -O2 instead of -Os. If you want to try rebuilding everything again, set 'configure.optflags -O2' in the failing port's Portfile.

comment:24 Changed 11 years ago by beany_kelly@…

Hi Jeremy. I tried adding that line --- 'configure.optflags -O2' --- in the file:

/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc48

It didn't seem to help when I ran

sudo port install libgcc +universal

... same failure as before. Perhaps it's the wrong Portfile? But then I don't know where to look ...

comment:25 Changed 11 years ago by alessanderbotti@…

Cc: alessanderbotti@… added

Cc Me!

comment:26 Changed 11 years ago by essandess (Steve Smith)

CC Me!

comment:27 in reply to:  26 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: s.t.smith@… added

You need to click the “CcMe!” button next to the “Cc” list to actually be Cc’d on the ticket.

comment:28 Changed 11 years ago by mr.mcox@…

Cc: mr.mcox@… added

Cc Me!

comment:29 Changed 11 years ago by kurtjaeke@…

Cc: kurtjaeke@… added

Cc Me!

comment:30 Changed 11 years ago by kurtjaeke@…

#40621 might be a duplicate of this issue.

comment:31 Changed 11 years ago by kurtjaeke@…

BTW, I see the same error when installing/upgrading py-scipy.

comment:32 Changed 11 years ago by nhpackard@…

Cc me!

comment:33 in reply to:  32 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: nhpackard@… added

You need to actually click the “CcMe!” button above to be Cc’d.

comment:34 Changed 11 years ago by kurtjaeke@…

Try:

port -f uninstall gmp
port install -s gmp

That worked for me. (I guess I asked for this kind of trouble, since I compiled on a stronger, newer machine.)

comment:35 in reply to:  34 Changed 11 years ago by moala@…

Replying to kurtjaeke@…:

Try:

port -f uninstall gmp
port install -s gmp

That worked for me. (I guess I asked for this kind of trouble, since I compiled on a stronger, newer machine.)

Thanks! That worked for me too (I just added +universal on port install, because that was my variant). I think you didn't ask for such troubles because that happened on my old machine.

Last edited 11 years ago by moala@… (previous) (diff)

comment:36 Changed 11 years ago by someuser12

Cc: macosx12345@… added

Cc Me!

comment:37 Changed 11 years ago by jiangdzh@…

Cc: jiangdzh@… added

Cc Me!

comment:38 in reply to:  30 Changed 11 years ago by urilabob@…

I'm not sure whether they are the same problem or not (reinstalling gmp didn't help for me). But in case there is some relation, I have given a minimal test case at #40621. It would be useful if people suffering from this bug (i.e. #40439) could try the test case and report.

Either way, I'm guessing this should be reported upstream... unfortunately I'm not clear where upstream is (since replacing gcc with clang/dragonegg doesn't seem to fix the problem, I'm not sure where it's coming from; it doesn't seem to be present in gfortran on fedora). Any gurus listening?

Replying to kurtjaeke@…:

#40621 might be a duplicate of this issue.

comment:39 Changed 11 years ago by urilabob@…

Cc: urilabob@… added

Cc Me!

comment:40 Changed 11 years ago by nilstec_inc@…

I had to do a complete reinstall of my system due to HD failure. I went with a fresh install of Mavericks, installing a fresh gcc48 environment. The problem has dissapeared now.

comment:41 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: invalid
Status: newclosed

Ok thanks. Closing as invalid. Sorry about your HD =(

comment:42 Changed 11 years ago by Polyergic (Shad Sterling)

Cc: me@… added

Cc Me!

comment:43 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.