New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #31604 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

gcc44, gcc45, gcc46: build hangs on lion, due to mpfr built with clang

Reported by: guygurari@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: lion Cc: fnog@…, lfelipe.sanchez@…, contact@…, leo@…, macsforever2000@…, morriz@…, nutrik@…, kerriganw@…, macports.org@…, richardsjohnt@…, dangers@…, norbert.vieten@…, sygnet@…, pavel.kaygorodov@…, jwest@…, chyan26@…, fclaire@…, _b_b_@…, thrabe@…, ralph@…, Torsten.Maehne@…, larry.velazquez@…, miranda.henrique@…, m.thon@…, jryan2002de@…, evilspaam@…, AlonzoQuixote@…, zach.pezzementi@…, spolitov@…, v.favrenicolin@…, david.brockley@…, antonin.portelli@…, roger.cappallo@…, gamperl@…, daq0101@…, alexmo@…, garnier@…, ryandesign@…, vinc17@…
Port: gcc44, gcc45, gcc46, mpfr

Description

When trying to install gcc45 on Lion (10.7.2), the build launches a process 'f951' which grows to 4 GB RAM, uses only 5% CPU, and does not finish after hours of work.

I would attach a log file but I don't know where logs for on-going builds are stored.

Attachments

main.log (56.0 KB) - added by guygurari@… 3 years ago.
gcc45 log file
gcc44.main.log.1 (2.8 MB) - added by alexmo@… 2 years ago.
Log file for "sudo port install gcc44 configure.compiler=llvm-gcc-4.2 build.jobs=1"; process grows huge in memory and stalls out.
gcc44.main.log.2 (5.5 MB) - added by alexmo@… 2 years ago.
After removing fortran from the port file, "sudo port install gcc44 configure.compiler=llvm-gcc-4.2 build.jobs=1"; seems to stall out somewhere in building java and its libraries
gcc44.main.log.4.nofortran.nojava (4.0 MB) - added by alexmo@… 2 years ago.
Trying to install without fortran or java: "sudo port install gcc44 configure.compiler=llvm-gcc-4.2 build.jobs=1"
gcc44.main.log.3.using.apple-gcc-4.2 (19.8 KB) - added by alexmo@… 2 years ago.
Apple gcc 4.2 compiler: "port install gcc44 configure.compiler=apple-gcc-4.2 build.jobs=1"
main.2.log (18.4 MB) - added by fnog@… 2 years ago.
log of failed gcc46 compilation after compiling mpfr with llvm
Portfile.diff (959 bytes) - added by howarth@… 2 years ago.
Portfile diff to pass --disable-thread-safe and enable clang builds

Change History

comment:1 Changed 3 years ago by ryandesign@…

  • Owner changed from macports-tickets@… to mww@…
  • Cc mww@… removed

The command "port logfile gcc45" will show you where the log file is.

Changed 3 years ago by guygurari@…

gcc45 log file

comment:2 Changed 3 years ago by guygurari@…

Thanks, I attached the log. You will notice it seems to be truncated, but this is after letting the build run for 10 minutes without any change to the log file.

comment:3 Changed 3 years ago by ryandesign@…

  • Cc fnog@…, lfelipe.sanchez@…, contact@… added
  • Port changed from gcc45 to gcc44, gcc45, gcc46
  • Summary changed from gcc45 build hangs on lion to gcc44, gcc45, gcc46: build hangs on lion

Duplicate #31628 has more information.

comment:4 in reply to: ↑ description Changed 3 years ago by leo@…

Replying to guygurari@…:

When trying to install gcc45 on Lion (10.7.2), the build launches a process 'f951' which grows to 4 GB RAM, uses only 5% CPU, and does not finish after hours of work.

Workaround: disable build fortran compiler, for example:

$ sudo port edit gcc45
/configure.args
<remove ",fortran">

comment:5 Changed 3 years ago by leo@…

  • Cc leo@… added

Cc Me!

comment:6 Changed 3 years ago by macsforever2000@…

  • Cc macsforever2000@… added

Cc Me!

comment:7 Changed 3 years ago by morriz@…

  • Cc morriz@… added

Cc Me!

comment:8 Changed 3 years ago by lfelipe.sanchez@…

Running that gives the following:

$ sudo port edit gcc45 ,/configure.args <remove ",fortran">
-bash: syntax error near unexpected token `newline'

comment:9 Changed 3 years ago by lfelipe.sanchez@…

Well, I did first sudo port edit gcc45 and then I look for configure.args and I removed fortran. Saved and quit like in vim and now it is compiling. I'll post something if there is a problem.

comment:10 Changed 3 years ago by macports.org@…

I did the same (sudo port edit gcc44, remove ,fortran from the configure.args line), did a port clean gcc44, then port install gcc44. Now it only starts one memory eating f951 process, instead of two before.

comment:11 Changed 3 years ago by nutrik@…

  • Cc nutrik@… added

Cc Me!

comment:12 Changed 3 years ago by nutrik@…

Disabling fortran is not a solution. There are many ports like py27-scipy or R ... which are built by gcc fortran as well. So it means no one can built any port which has fortran sources. It also happened to me after Xcode 4.2 installation (update) and further macports update from ver. 2.0.2 to 2.0.3. Hope it will be fixed ASAP because it is pretty taught. Thanks in advance!

comment:13 Changed 3 years ago by kerriganw@…

  • Cc kerriganw@… added

Cc Me!

comment:14 Changed 3 years ago by macports.org@…

  • Cc macports.org@… added

Cc Me!

comment:15 Changed 3 years ago by richardsjohnt@…

  • Cc richardsjohnt@… added

Cc Me!

comment:16 Changed 3 years ago by dangers@…

  • Cc dangers@… added

Cc Me!

comment:17 Changed 3 years ago by norbert.vieten@…

  • Cc norbert.vieten@… added

Cc Me!

comment:18 Changed 3 years ago by ralph@…

See also problem #31660, which seems like a similar issue for port cdf

comment:19 Changed 3 years ago by sygnet@…

  • Cc sygnet@… added

Cc Me!

comment:20 Changed 2 years ago by browntroutstream@…

Ticket #31171 also appears to have similarities

comment:21 Changed 2 years ago by pavel.kaygorodov@…

  • Cc pavel.kaygorodov@… added

Cc Me!

comment:22 Changed 2 years ago by ryandesign@…

  • Cc jwest@… added

Has duplicate #31684.

comment:23 Changed 2 years ago by chyan26@…

  • Cc chyan26@… added

Cc Me!

comment:24 Changed 2 years ago by fclaire@…

  • Cc fclaire@… added

Cc Me!

comment:25 Changed 2 years ago by _b_b_@…

  • Cc _b_b_@… added

Cc Me!

comment:26 Changed 2 years ago by browntroutstream@…

This seems to be a more concise statement of the problem: #31691 ...and high priority

comment:27 Changed 2 years ago by ryandesign@…

  • Cc thrabe@… added

I've closed #31691 as a duplicate of this one.

comment:28 Changed 2 years ago by thrabe@…

  • Cc thrabe@… removed

Cc Me!

comment:29 Changed 2 years ago by thrabe@…

  • Cc thrabe@… added

Cc Me!

comment:30 Changed 2 years ago by ralph@…

  • Cc ralph@… added

Cc Me!

comment:31 Changed 2 years ago by Torsten.Maehne@…

  • Cc Torsten.Maehne@… added

Cc Me!

comment:32 Changed 2 years ago by larry.velazquez@…

  • Cc larry.velazquez@… added

Cc Me!

comment:33 Changed 2 years ago by miranda.henrique@…

  • Cc miranda.henrique@… added

Cc Me!

comment:34 Changed 2 years ago by m.thon@…

  • Cc m.thon@… added

Cc Me!

comment:35 Changed 2 years ago by jryan2002de@…

  • Cc jryan2002de@… added

Cc Me!

comment:36 Changed 2 years ago by evilspaam@…

  • Cc evilspaam@… added

Cc Me!

comment:37 follow-up: ↓ 38 Changed 2 years ago by evilspaam@…

A temporary fix is to downgrade xcode to version 4.1. I just did that and gcc44 compiles nicely without eating all my memory.

comment:38 in reply to: ↑ 37 Changed 2 years ago by evilspaam@…

Replying to evilspaam@…:

A temporary fix is to downgrade xcode to version 4.1. I just did that and gcc44 compiles nicely without eating all my memory.

Guess I was a bit too fast. It seemed to compile nicely, but after a few hours the compile process seems to have stalled, using ~ 5 % cpu, but the two f951 processes "only" use between 500 MB - 1.5 GB of memory. However my machine has not crashed yet, which was the result with xcode 4.2.

Anyway, sorry if anyone spend time going down this path.

comment:39 follow-up: ↓ 43 Changed 2 years ago by ryandesign@…

How much memory is in your computer? If you have two processes using 1.5GB of real memory each, and you only have, say, 4GB of physical RAM (some RAM is needed for the OS and your other apps), your machine will grind to a halt as it uses swap instead of RAM. You might mitigate that somewhat by interrupting the build (^C) and then retrying it without parallel building:

sudo port install gcc44 build.jobs=1

comment:40 follow-ups: ↓ 41 ↓ 42 ↓ 50 Changed 2 years ago by ryandesign@…

The default compiler on Xcode 4.2 is clang. On Xcode 4.0 and 4.1 it's llvm-gcc-4.2. And on Xcode 3.2 it's gcc-4.2. So, has anybody just tried using a different compiler? Try:

sudo port clean gcc44
sudo port install gcc44 configure.compiler=llvm-gcc-4.2

If that works, great; if not, try apple-gcc-4.2:

sudo port clean gcc44
sudo port install apple-gcc42
sudo port install gcc44 configure.complier=apple-gcc-4.2

#31736 mentions in passing that this last suggestion worked, however if llvm-gcc-4.2 works too, we would prefer to use that.

comment:41 in reply to: ↑ 40 Changed 2 years ago by larry.velazquez@…

Replying to ryandesign@…:

Does setting configure.compiler=llvm-gcc-4.2 require installing the llvm-gcc42 port? I just tried without it, and the build failed.

comment:42 in reply to: ↑ 40 Changed 2 years ago by chyan26@…

Replying to ryandesign@…:

I tried to install gcc-44 with following commands on my 2011 17" MBP/OS Lion/Xcode 4.2. It still eat up all memory.

If that works, great; if not, try apple-gcc-4.2:

sudo port clean gcc44
sudo port install apple-gcc42

sudo port install gcc44 configure.complier=apple-gcc-4.2 }}} #31736 mentions in passing that this last suggestion worked, however if llvm-gcc-4.2 works too, we would prefer to use that.

comment:43 in reply to: ↑ 39 Changed 2 years ago by evilspaam@…

Replying to ryandesign@…:

How much memory is in your computer? If you have two processes using 1.5GB of real memory each, and you only have, say, 4GB of physical RAM (some RAM is needed for the OS and your other apps), your machine will grind to a halt as it uses swap instead of RAM. You might mitigate that somewhat by interrupting the build (C) and then retrying it without parallel building:

sudo port install gcc44 build.jobs=1

My machine has 8 GB of memory, but even though the f951 processes only use the stated 500 MB - 1.5 GB each, my memory usage still ends up being 99 % and ~ 5 % cpu usage.

I will try using only one process and a different compiler. But as I downgraded to xcode 4.1 I guess I have already tried llvm-gcc-4.2 and that still does not work.

Thanks for your advices :)

comment:44 Changed 2 years ago by ralph@…

I have 16GB RAM in my Mac. It still runs out of memory.

comment:45 Changed 2 years ago by ralph@…

Tried:

sudo port install gcc46 configure.compiler=apple-gcc-4.2

Failed:

:info:configure checking for C compiler default output file name... 
:info:configure configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc46/gcc46/work/build':
:info:configure configure: error: C compiler cannot create executables
:info:configure See `config.log' for more details.
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc46/gcc46/work/build" && ../gcc-4.6.1/configure --prefix=/opt/local --build=x86_64-apple-darwin11 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc46 --includedir=/opt/local/include/gcc46 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.6 --with-local-prefix=/opt/local --with-libiconv-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.6 --with-gxx-include-dir=/opt/local/include/gcc46/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --enable-stage1-checking --disable-multilib --enable-fully-dynamic-string " returned error 77
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
    while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for gcc46): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Log for gcc46 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc46/gcc46/main.log

comment:46 Changed 2 years ago by ralph@…

Tried:

sudo port install gcc46 configure.compiler=llvm-gcc-4.2

Failed:

Runs out of memory as per default choice of compiler.

comment:47 Changed 2 years ago by lane_mike@…

  • Cc lane_mike@… added

Cc Me!

comment:48 Changed 2 years ago by vaccari@…

I'm trying to install gcc45. No success with either default compiler or configure.compiler=llvm-gcc-4.2 or configure.compiler=apple-gcc-4.2

As soon as the process f951 pops up, memory starts paging as crazy, and I have to kill the process before the machine freezes.

On the very same machine, installation of gcc45 was successful before I updated to 10.7.2 (from 10.7.1) and to Xcode 4.2 (from 4.1 IIRC) and selfupdated MacPorts. Can't say who's the assassin though (well, actually it's myself for choosing to update everything, but it's not a production machine...;-)

comment:49 Changed 2 years ago by lars@…

  • Cc lars@… added

Cc Me!

comment:50 in reply to: ↑ 40 Changed 2 years ago by larry.velazquez@…

Building gcc45 failed for me with both llvm-gcc42 and apple-gcc42. Both seem to fail with the same message:

: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_gcc45/gcc45/work/build/x86_64-apple-darwin11/libgfortran/config.log

I won't attach logs since this isn't directly relevant to the ticket, but I can produce them if asked.

comment:51 Changed 2 years ago by AlonzoQuixote@…

  • Cc AlonzoQuixote@… added

Cc Me!

comment:52 follow-up: ↓ 84 Changed 2 years ago by alexmo@…

Mac OS 10.7.2 with XCode 4.2 Build 4D199. After trying various combinations of mentioned suggestions I have had no success.

"llvm-gcc42" stalls out for me on what looks like both the gcc44 fortran and java; by commenting out fortran as a build target has it move on to java and have the same problem. It starts to use more and more memory and swap space, so presumably has some sort of memory leak.

"apple-gcc-4.2" completely fails.

Since I can get gfortran binaries (http://gcc.gnu.org/wiki/GFortranBinaries), I figured I could remove it from the portfile along with the java, which were causing problems.

If I do "sudo port edit gcc44" and remove all mentions of java and fortran, including configure.args it fails near the end:

:debug:destroot Executing proc-post-org.macports.destroot-destroot-1
:error:destroot Target org.macports.destroot returned: error renaming "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc44/gcc44/work/destroot/opt/local/share/python/aotcompile.py": no such file or directory
:debug:destroot Backtrace: error renaming "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc44/gcc44/work/destroot/opt/local/share/python/aotcompile.py": no such file or directory
    while executing
"$post $targetname"
:info:destroot Warning: the following items did not execute

Changed 2 years ago by alexmo@…

Log file for "sudo port install gcc44 configure.compiler=llvm-gcc-4.2 build.jobs=1"; process grows huge in memory and stalls out.

Changed 2 years ago by alexmo@…

After removing fortran from the port file, "sudo port install gcc44 configure.compiler=llvm-gcc-4.2 build.jobs=1"; seems to stall out somewhere in building java and its libraries

Changed 2 years ago by alexmo@…

Trying to install without fortran or java: "sudo port install gcc44 configure.compiler=llvm-gcc-4.2 build.jobs=1"

Changed 2 years ago by alexmo@…

Apple gcc 4.2 compiler: "port install gcc44 configure.compiler=apple-gcc-4.2 build.jobs=1"

comment:53 Changed 2 years ago by alexmo@…

Commenting out these when editing portfile "sudo port edit gcc44":

  #file rename ${destroot}${prefix}/share/python/aotcompile.py \
        #       ${destroot}${prefix}/share/python/aotcompile-44.py
        #file rename ${destroot}${prefix}/share/python/classfile.py \
        #       ${destroot}${prefix}/share/python/classfile-44.py

#configure.args --enable-languages=c,c++,objc,obj-c++,java,fortran \
configure.args  --enable-languages=c,c++,objc,obj-c++ \
                --libdir=${prefix}/lib/${name} \
#set dfort              gcc-fortran-${version}.tar.bz2
set dcxx                gcc-g++-${version}.tar.bz2
#set djava              gcc-java-${version}.tar.bz2
set dobjc               gcc-objc-${version}.tar.bz2
#distfiles              ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
distfiles               ${dcore}  ${dcxx}  ${dobjc}

Along with commenting out fortran and java, it at least finishes installation. I don't know if this will ruin anything in the future; however it seems I can get other things to install by pointing them to the fortran I got directly from the Mac binaries:

sudo port install openmpi configure.f77=/usr/local/bin/gfortran configure.fc=/usr/local/bin/gfortran 

comment:54 follow-ups: ↓ 56 ↓ 77 Changed 2 years ago by spolitov@…

As I mentioned here: #31736, gcc44 successfully installs with apple-gcc-4.2

As seen from your build log, you have all dependencies installed. It is possible that problem with one of them.

You could try to uninstall them, then installing gcc44 with apple-gcc-4.2, which will build all dependencies with this compiler.

They are: gmp, mpfr, xz, libiconv, gperf, gettext, ncurses, ncursesw, expat, gcc_select

comment:55 Changed 2 years ago by zach.pezzementi@…

  • Cc zach.pezzementi@… added

Cc Me!

comment:56 in reply to: ↑ 54 Changed 2 years ago by larry.velazquez@…

Replying to spolitov@…:

You could try to uninstall them, then installing gcc44 with apple-gcc-4.2, which will build all dependencies with this compiler.

This worked for me.

comment:57 Changed 2 years ago by spolitov@…

  • Cc spolitov@… added

Cc Me!

comment:58 Changed 2 years ago by v.favrenicolin@…

  • Cc v.favrenicolin@… added

Cc Me!

comment:59 follow-ups: ↓ 61 ↓ 63 ↓ 83 Changed 2 years ago by v.favrenicolin@…

Indeed, this worked for me (brand new mac mini with Lion & Xcode 4.2):

sudo port -fp uninstall --follow-dependents installed # uninstall everything to make sure
sudo port install apple-gcc42
sudo port install gcc44 configure.compiler=apple-gcc-4.2

comment:60 follow-up: ↓ 62 Changed 2 years ago by ralph@…

sudo port install apple-gcc42
sudo port install gcc46  configure.compiler=apple-gcc-4.2

does not work for me. So it seems the problem probably lies with one of the dependencies (Note I was trying to build gcc46 though).

comment:61 in reply to: ↑ 59 Changed 2 years ago by chyan26@…

This method also works on My 2011 17" MBP upgraded from 10.6.

Replying to v.favrenicolin@…:

Indeed, this worked for me (brand new mac mini with Lion & Xcode 4.2):

sudo port -fp uninstall --follow-dependents installed # uninstall everything to make sure
sudo port install apple-gcc42
sudo port install gcc44 configure.compiler=apple-gcc-4.2

comment:62 in reply to: ↑ 60 Changed 2 years ago by larry.velazquez@…

Replying to ralph@…:

sudo port install apple-gcc42
sudo port install gcc46  configure.compiler=apple-gcc-4.2

does not work for me. So it seems the problem probably lies with one of the dependencies (Note I was trying to build gcc46 though).

Maybe try

sudo port -f uninstall rdepof:gcc46

first?

comment:63 in reply to: ↑ 59 Changed 2 years ago by alexmo@…

sudo port -fp uninstall --follow-dependents installed # uninstall everything to make sure
sudo port install apple-gcc42
sudo port install gcc44 configure.compiler=apple-gcc-4.2

This worked for me too. Uninstalling everything is clearly not ideal, but it worked.

comment:64 Changed 2 years ago by ralph@…

This is just going from bad to worse.

Doing

sudo port -f uninstall rdepof:gcc46
sudo port clean gcc46
sudo port install apple-gcc42
sudo port install gcc46

has now resulted in an error in trying to reinstall gmp:

:info:configure checking for flex... flex
:info:configure checking lex output file root... configure: error: cannot find output from flex; giving up
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/gmp/work/gmp-5.0.2" && ./configure --prefix=/opt/local --infodir=/opt/local/share/info --enable-cxx " returned error 1
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
    while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for gmp): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:error:configure Failed to install gmp
:debug:configure couldn't open "/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex": no such file or directory
    while executing
"open [file join $dir tclIndex]"
:notice:configure Log for gmp is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/gmp/main.log

I now have a broken macports installation missing many essential items.

comment:65 Changed 2 years ago by ralph@…

Oops, I meant to say

sudo port install gcc46 configure.compiler=apple-gcc-4.2

above.

comment:66 follow-up: ↓ 69 Changed 2 years ago by ralph@…

Output from flex doesn't exist as it needs ncurses, which was removed. Trying to install ncurses gives

:info:build 	}
:info:build }
:info:build END	{
:info:build print "#endif /* NC_DEFINE_H */"
:info:build 	}
:info:build ' < $DEFS
:info:build make[1]: *** [ncurses_def.h] Error 133
:info:build ./MKparametrized.sh: line 61: 66679 Trace/BPT trap: 5       ${AWK-awk} '
:info:build $3 != "str"	{next;}
:info:build $1 ~ /^acs_/	{print "-1,\t/* ", $2, " */"; count++; next;}
:info:build $0 ~ /#[0-9]/	{print "1,\t/* ", $2, " */"; count++; next;}
:info:build 		{print "0,\t/* ", $2, " */"; count++;}
:info:build END		{printf("} /* %d entries */;\n\n", count);}
:info:build ' < $CAPS
:info:build make[1]: *** [parametrized.h] Error 133
:info:build dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
:info:build   Referenced from: /opt/local/bin/gawk
:info:build   Reason: image not found
:info:build Trace/BPT trap: 5
:info:build dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
:info:build   Referenced from: /opt/local/bin/gawk
:info:build   Reason: image not found
:info:build Trace/BPT trap: 5
:info:build dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
:info:build   Referenced from: /opt/local/bin/gawk
:info:build   Reason: image not found
:info:build Trace/BPT trap: 5
:info:build dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
:info:build   Referenced from: /opt/local/bin/gawk
:info:build   Reason: image not found
:info:build Trace/BPT trap: 5
:info:build sh -c 'if test "cchar_t" = "cchar_t" ; then cat ./curses.wide >>curses.h ; fi'
:info:build cat ./curses.tail >>curses.h
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/ncurses/work/ncurses-5.9/include'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/ncurses/work/ncurses-5.9'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/ncurses/work/ncurses-5.9" && /usr/bin/make -j16 -w all " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for ncurses): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:error:build Failed to install ncurses
:debug:build couldn't open "/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex": no such file or directory
    while executing
"open [file join $dir tclIndex]"
:notice:build Log for ncurses is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ncurses/ncurses/main.log

Any ideas on how to fix my macports?

comment:67 Changed 2 years ago by lane_mike@…

  • Cc lane_mike@… removed

Cc Me!

comment:68 Changed 2 years ago by philip.fowler@…

Cc Me!

MacPro with 10.7.2 and Xcode 4.2 always results in a frozen system. Tried specifying the other two compliers as suggested and both were again using large (6 GB+) of memory. I had not so long ago setup another machine, also with Lion, and installing gcc44 was fine. Turns out that was using Xcode 4.1 and I install had the "Install Xcode" image from the App store for 4.1. So I removed my current Xcode 4.2 using

sudo /Developer/Library/uninstall-devtools –mode=all

and then installed Xcode 4.1. Then I did a complete clean of MacPorts

sudo port -fp uninstall --follow-dependents installed
sudo port clean all

and then tried again and gcc44 compiled (on my way to installing py26-scipy).

comment:69 in reply to: ↑ 66 ; follow-up: ↓ 70 Changed 2 years ago by larry.velazquez@…

Replying to ralph@…:

Any ideas on how to fix my macports?

I would try cleaning gcc46 and its dependencies before installing:

sudo port clean --all gcc46 rdepof:gcc46

comment:70 in reply to: ↑ 69 ; follow-up: ↓ 71 Changed 2 years ago by ralph@…

Replying to larry.velazquez@…:

Replying to ralph@…:

Any ideas on how to fix my macports?

I would try cleaning gcc46 and its dependencies before installing:

sudo port clean --all gcc46 rdepof:gcc46

Please read my messages above carefully. That is exactly what BROKE my macports in the first place. I strongly suggest to others that they DO NOT do this.

I have had to restore my entire /opt directory from a backup after doing that.

comment:71 in reply to: ↑ 70 Changed 2 years ago by larry.velazquez@…

Replying to ralph@…:

Please read my messages above carefully. That is exactly what BROKE my macports in the first place. I strongly suggest to others that they DO NOT do this.

Did you clean the dependencies as well as gcc46? It does not appear so.

comment:72 Changed 2 years ago by ralph@…

Yes, in fact I did.

The end result was I couldn't install install ncurses as it needed gettext, which wouldn't install as it needed ncurses, basically.

comment:73 Changed 2 years ago by calvin@…

Cc me

comment:74 Changed 2 years ago by david.brockley@…

  • Cc david.brockley@… added

Cc Me!

comment:75 Changed 2 years ago by antonin.portelli@…

  • Cc antonin.portelli@… added

Cc Me!

comment:76 Changed 2 years ago by roger.cappallo@…

  • Cc roger.cappallo@… added

Cc Me!

comment:77 in reply to: ↑ 54 ; follow-up: ↓ 78 Changed 2 years ago by garnier@…

Replying to spolitov@…:

You could try to uninstall them, then installing gcc44 with apple-gcc-4.2, which will build all dependencies with this compiler.

They are: gmp, mpfr, xz, libiconv, gperf, gettext, ncurses, ncursesw, expat, gcc_select

This worked for me... I had also tried to install gcc46 so I had a few more to uninstall. In all I got rid of:

gmp, mpfr, xz, openmpi, glpk, ppl, gperf, libmpc, gcc_select

I don't know which is the bad guy, but I'm thinking its gmp, mpfr, or gperf.

Then I installed with configure.compiler=apple-gcc-4.2

and it didn't hang on f951 with either 4.4 or 4.6.

comment:78 in reply to: ↑ 77 Changed 2 years ago by david.brockley@…

Replying to garnier@…:

Then I installed with configure.compiler=apple-gcc-4.2

Doing a 'port -f remove' followed by a 'port clean' of expat, gcc43, gcc_select, gmp, gperf, gettext, libiconv, mpfr, ncurses, ncursesw and xz, followed by an install of gcc44 with this option lead to another hang for me. However, I'd upgraded to XCode 4.2 since installing MacPorts.

Blowing away the whole of /opt/local, reinstalling and then installing apple-gcc42 and then gcc44 using that compiler, worked as for you. This is on a MacPro with 10.7.2.

comment:79 Changed 2 years ago by gamperl@…

  • Cc gamperl@… added

Cc Me!

comment:80 Changed 2 years ago by daq0101@…

  • Cc daq0101@… added

Cc Me!

comment:81 in reply to: ↑ description Changed 2 years ago by daq0101@…

Brand new MBP 13 Lion 10.7 with a fresh install of Xcode 4.2 I was able to install gcc44 with

remove the following packages with sudo port uninstall "Blah"

expat, gcc_select, gettext, libiconv, mpfr, ncurses, ncursesw and xz, gmp, openmpi, glpk, ppl, gperf, libmpc

Then,

sudo port install apple-gcc42
sudo port install gcc44 configure.compiler=apple-gcc-4.2

I can explain why exactly this works ( I am no expert ) all I did was piece together what other people did. Thanks. Now one to getting octave working.

Replying to guygurari@…:

When trying to install gcc45 on Lion (10.7.2), the build launches a process 'f951' which grows to 4 GB RAM, uses only 5% CPU, and does not finish after hours of work.

I would attach a log file but I don't know where logs for on-going builds are stored.

comment:83 in reply to: ↑ 59 Changed 2 years ago by sanchez.guido@…

Replying to v.favrenicolin@…:

This worked for me too. Brand new Macbook Pro 8.2, Lion 10.7.2 and Xcode 4.2

Indeed, this worked for me (brand new mac mini with Lion & Xcode 4.2):

sudo port -fp uninstall --follow-dependents installed # uninstall everything to make sure
sudo port install apple-gcc42
sudo port install gcc44 configure.compiler=apple-gcc-4.2

comment:84 in reply to: ↑ 52 ; follow-up: ↓ 85 Changed 2 years ago by ryandesign@…

  • Cc alexmo@…, garnier@…, ryandesign@… added

Replying to alexmo@…:

"apple-gcc-4.2" completely fails.

Are you sure you already installed the apple-gcc42 port?

Replying to ralph@…:

:info:build dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
:info:build   Referenced from: /opt/local/bin/gawk
:info:build   Reason: image not found
:info:build Trace/BPT trap: 5

gawk isn't working anymore because you removed the gettext library it relies on. Uninstall the gawk port; it'll use the awk that comes with OS X instead.

Replying to ralph@…:

The end result was I couldn't install install ncurses as it needed gettext, which wouldn't install as it needed ncurses, basically.

gettext needs ncurses. ncurses does not need gettext. But ncurses does need some little utilities like awk and sed and grep which, if you have the MacPorts versions of those ports installed, use gettext. MacPorts doesn't support circular dependencies and therefore doesn't have any. But when you remove an essential library like gettext you can expect some fallout and need to know exactly what you're doing to recover.

Replying to garnier@…:

I don't know which is the bad guy, but I'm thinking its gmp, mpfr, or gperf.

Can someone please isolate which one(s) of these needs to be built with configure.compiler=apple-gcc-4.2, so that we can modify that port (those ports) to do that? We already know that just building gcc44 with apple-gcc42, after all the dependencies have been built with the default compiler, doesn't work. What if you rebuild just one of the above dependencies with apple-gcc42 (leaving the rest of the dependencies built by the default compiler), then build gcc44 with the default compiler? I'd start with gmp, since it already had a problem with llvm-gcc-4.2 which was fixed by using a different compiler (see r80732, r81117). Thanks.

comment:85 in reply to: ↑ 84 Changed 2 years ago by larry.velazquez@…

Replying to ryandesign@…:

Can someone please isolate which one(s) of these needs to be built with configure.compiler=apple-gcc-4.2, so that we can modify that port (those ports) to do that?

Isolating gmp failed to solve the f951 problem for me, but isolating mpfr worked:

sudo port -f uninstall gcc45 gawk       # Removed gawk just in case

# Begin gmp isolation
sudo port -f uninstall rdepof:gcc45
sudo port clean --all rdepof:gcc45 gcc45
sudo port install gcc_select xz         # Installing xz covered all gcc45 deps that don't need gmp
sudo port install gmp configure.compiler=apple-gcc-4.2
sudo port install gcc45                 # Installed mpfr and libmpc, stalled during gcc45

# Begin mpfr isolation
sudo port -f uninstall rdepof:gcc45     # Cleaned up, started over
sudo port clean --all rdepof:gcc45 gcc45
sudo port install gcc_select xz gmp
sudo port install mpfr configure.compiler=apple-gcc-4.2
sudo port install gcc45                 # Finished successfully

# Put gawk back ;)
sudo port clean --all gawk
sudo port install gawk

I have MacPorts 2.0.3 and Xcode 4.2 (4D199) on OS X 10.7.2 (11C74).

comment:86 follow-up: ↓ 87 Changed 2 years ago by ryandesign@…

Thanks for finding that. Can we try one more thing -- would compiling mpfr with llvm-gcc-4.2 also fix it? If so we'd rather do that than make people install apple-gcc42.

comment:87 in reply to: ↑ 86 ; follow-up: ↓ 88 Changed 2 years ago by fnog@…

Replying to ryandesign@…:

Thanks for finding that. Can we try one more thing -- would compiling mpfr with llvm-gcc-4.2 also fix it? If so we'd rather do that than make people install apple-gcc42.

It seems so. I have remove the entire macports tree and made a fresh install. Then

port selfupdate
port install gcc_select xz gmp
port install mpfr configure.compiler=llvm-gcc-4.2
port install gcc44
port install gcc45

All of them went OK ;-)

But gcc46 didn't compile, although the error is different from the pre-"llvm" error: instead of just filling all available RAM and starting swapping like crazy, it stopped with

--->  Building gcc46
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for gcc46 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc46/gcc46/main.log

I attach the log file. opendx and py27-matplotlib also stopped working with XCode 4.2, but I am not sure it is the same problem. I will retry to compile them and compare the logs...

Changed 2 years ago by fnog@…

log of failed gcc46 compilation after compiling mpfr with llvm

comment:88 in reply to: ↑ 87 ; follow-ups: ↓ 90 ↓ 92 Changed 2 years ago by ryandesign@…

Replying to fnog@…:

Replying to ryandesign@…:

would compiling mpfr with llvm-gcc-4.2 also fix it?

It seems so.

Thanks very much for testing that. I've made that fix in mpfr in r86599. Could anybody who hasn't been able to build gcc44 / gcc45 yet with Xcode 4.2 please try the following (substituting gcc45 for gcc44 as desired):

sudo port clean gcc44
sudo port selfupdate
sudo port upgrade outdated
sudo port install gcc44

But gcc46 didn't compile

The log you attached ends with:

:info:build collect2: ld terminated with signal 6 [Abort trap: 6]
:info:build ld(17181) malloc: *** error for object 0x10bc82860: pointer being freed was not allocated
:info:build *** set a breakpoint in malloc_error_break to debug

so this looks like it's already covered by #31171 and #31174.

opendx and py27-matplotlib also stopped working with XCode 4.2, but I am not sure it is the same problem. I will retry to compile them and compare the logs...

py27-matplotlib: see if #31046 or #31639 describe the problem you're seeing.

opendx: take a look at #30990.

comment:89 Changed 2 years ago by ralph@…

This fix for mpfr also fixes #31660.

comment:90 in reply to: ↑ 88 Changed 2 years ago by larry.velazquez@…

Replying to ryandesign@…:

Thanks very much for testing that. I've made that fix in mpfr in r86599. Could anybody who hasn't been able to build gcc44 / gcc45 yet with Xcode 4.2 please try the following (substituting gcc45 for gcc44 as desired)

gcc45 builds correctly for me after a port selfupdate.

comment:91 Changed 2 years ago by ryandesign@…

  • Status changed from new to closed
  • Cc vinc17@… added
  • Resolution set to fixed
  • Port changed from gcc44, gcc45, gcc46 to gcc44, gcc45, gcc46, mpfr
  • Summary changed from gcc44, gcc45, gcc46: build hangs on lion to gcc44, gcc45, gcc46: build hangs on lion, due to mpfr built with clang

Cool, we'll call this fixed. Thanks everyone for your help and patience.

comment:92 in reply to: ↑ 88 ; follow-up: ↓ 93 Changed 2 years ago by fnog@…

Replying to ryandesign@…:

py27-matplotlib: see if #31046 or #31639 describe the problem you're seeing.

#31046 is indeed the error I am seeing. The workaround of renaming llvm as clang fixes it.

opendx: take a look at #30990.

No, it's a different error, again related to clang in Xcode 4.2. In fact, the workaround of #31046 also fixes this problem. But this is a very awkward way of fixing a compilation problem...

comment:93 in reply to: ↑ 92 Changed 2 years ago by ryandesign@…

Replying to fnog@…:

Replying to ryandesign@…:

opendx: take a look at #30990.

No, it's a different error, again related to clang in Xcode 4.2.

#31858 then.

comment:94 Changed 2 years ago by howarth@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

This bug is due to radar://10291355, "Xcode 4.2 miscompiles tls support in MPFR 3.1.0"
where Xcode 4.2 introduced tis support in clang on Lion which had a codgen bug
http://llvm.org/bugs/show_bug.cgi?id=11111 This was fixed in llvm.org's clang 3.0 release and deployed by Apple in Xcode 4.2.1.
The easy fix, since this tis support in mpfr was never compiled prior to Xcode 4.2's introduction of tis in clang, is to append --disable-thread-safe
to the configure flags for mpfr. Please append that flag and start building with clang again.

Changed 2 years ago by howarth@…

Portfile diff to pass --disable-thread-safe and enable clang builds

comment:95 Changed 2 years ago by howarth@…

Attached Portfile diff which implements the use of --disable-thread-safe that allows clang to be used again.

comment:96 Changed 2 years ago by lars@…

  • Cc lars@… removed

Cc Me!

comment:96 Changed 2 years ago by cal@…

  • Status changed from reopened to closed
  • Resolution set to fixed

Please do not re-open already fixed bug, especially if you open another bug with the same patch attached. Closing this, further discussion should be in #33361.

Note: See TracTickets for help on using tickets.