gcc42 fails to build

Christoph Ludwig ludwig at fh-worms.de
Tue Jun 5 00:11:22 PDT 2007


Hi Maun Suang,

On Tue, Jun 05, 2007 at 12:22:52PM +1000, Boey Maun Suang wrote:
> >the make option '-j 2' is set by the port file, not by me:
> >
> >  castellio:~/tmp cludwig$ port cat gcc42 | grep '^build.args'
> >  build.args              -j 2
> 
> <slaps forehead />
> 
> How silly of me not to check the Portfile; sorry about that.  It  
> built fine for me on an Intel Core Duo Macbook Pro, and apparently  
> for others as well, which is why I assumed the problem was elsewhere.
> 
> >I therefore cannot unset it, short of modifying the port myself.
> 
> One is supposed to be able to set at least some arguments on the  
> command line like this:
> 
> port install gcc42 build.args="-j 1"

ah, I did not know that.
 
> If that doesn't work, it actually shouldn't be that painful to edit  
> the Portfile in your local tree; it should be in ${prefix}/var/db/ 
> dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/lang/gcc42/ 
> Portfile, in which case you can just delete the build.args line.   
> Note that it will be overwritten when you next run "port selfupdate"  
> or "port sync", but it should be fine for testing whether or not  
> removing the -j flag fixes the problem for you -- provided you have  
> the time an patience to wait for it to build :-)

The time it needs to build does not matter. I certainly have enough tasks on
my stack to keep me busy while gcc42 is being built. :-)
  
> Now that I think about it further, there might be something else to  
> try: without modifying build.args on the commandline or in the port  
> file, try installing it, wait for it to fail, and then try it again  
> straight away (make will try to pick up from where it left off). 

I am going to attach the output of 
´sudo port -v install gcc42 build.args='-j 1'´. It did in fact pick up where
the previous build failed, but failed again when the next archive was to be
built. :-(

You can see in the logs that configure decided to use the ´ar´ installed by
the binutils port. (The link in /opt/local/bin is named ´gar´ to avoid
conflicts with Appöe's ar, but the link in
/opt/local/i386-apple-darwin8.9.1/bin/ is named ´ar´.) Could this be the
cause? Do you have the binutils port installed?

Regards

Christoph

-- 
FH Worms - University of Applied Sciences
Fachbereich Informatik / Telekommunikation
Erenburgerstr. 19, 67549 Worms, Germany
-------------- next part --------------
--->  Building gcc42 with target bootstrap
echo stage3 > stage_final
rm -f stage_current
make[4]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
true "AR_FLAGS=rc" "CC_FOR_BUILD=/usr/bin/gcc-4.0" "CFLAGS=-g -fkeep-inline-functions" "CXXFLAGS=-O2" "CFLAGS_FOR_BUILD=-O2" "CFLAGS_FOR_TARGET=-O2 -O2 " "INSTALL=/opt/local/bin/ginstall -c" "INSTALL_DATA=/opt/local/bin/ginstall -c -m 644" "INSTALL_PROGRAM=/opt/local/bin/ginstall -c" "INSTALL_SCRIPT=/opt/local/bin/ginstall -c" "LDFLAGS=" "LIBCFLAGS=-g -fkeep-inline-functions" "LIBCFLAGS_FOR_TARGET=-O2 -O2 " "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/opt/local" "infodir=/opt/local/share/info" "libdir=/opt/local/lib/gcc42" "prefix=/opt/local" "tooldir=/opt/local/i386-apple-darwin8.9.1" "AR=ar" "AS=as" "CC=/usr/bin/gcc-4.0" "CXX=/usr/bin/g++-4.0" "LD=ld" "LIBCFLAGS=-g -fkeep-inline-functions" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
make \
  CFLAGS="-g -fkeep-inline-functions -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common " \
  CONFIG_H="config.h  auto-host.h ../../gcc-4.2.0/gcc/../include/ansidecl.h" \
  MAKEOVERRIDES= \
  -f libgcc.mk all
make GCC_FOR_TARGET="/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.macports.org_dpupdate_dports_lang_gcc42/work/build/./gcc/xgcc -B/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.macports.org_dpupdate_dports_lang_gcc42/work/build/./gcc/ -B/opt/local/i386-apple-darwin8.9.1/bin/ -B/opt/local/i386-apple-darwin8.9.1/lib/ -isystem /opt/local/i386-apple-darwin8.9.1/include -isystem /opt/local/i386-apple-darwin8.9.1/sys-include" \
  AR_FOR_TARGET="/opt/local/i386-apple-darwin8.9.1/bin/ar" \
  AR_CREATE_FOR_TARGET="/opt/local/i386-apple-darwin8.9.1/bin/ar  rc" \
  AR_EXTRACT_FOR_TARGET="/opt/local/i386-apple-darwin8.9.1/bin/ar  x" \
  AR_FLAGS_FOR_TARGET="" \
  CC="/usr/bin/gcc-4.0" CFLAGS="-g -fkeep-inline-functions -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common " \
  BUILD_PREFIX="" \
  BUILD_PREFIX_1="" \
  LANGUAGES="" \
  LIBGCC2_CFLAGS="-O2  -O2 -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  "  \
  MULTILIB_CFLAGS="" T= crt3.o
make[5]: `crt3.o' is up to date.
rm -f ./libgcc_eh.a
/opt/local/i386-apple-darwin8.9.1/bin/ar  rc ./libgcc_eh.a libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde-darwin.o libgcc/./unwind-sjlj.o libgcc/./unwind-c.o
/opt/local/i386-apple-darwin8.9.1/bin/ar: ./libgcc_eh.a: Invalid operation
make[4]: *** [libgcc_eh.a] Error 1
make[3]: *** [stmp-multilib] Error 2
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
Error: Target com.apple.build returned: shell command " cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.macports.org_dpupdate_dports_lang_gcc42/work/build" && make bootstrap -j 1 " returned error 2
Command output: make[4]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
true "AR_FLAGS=rc" "CC_FOR_BUILD=/usr/bin/gcc-4.0" "CFLAGS=-g -fkeep-inline-functions" "CXXFLAGS=-O2" "CFLAGS_FOR_BUILD=-O2" "CFLAGS_FOR_TARGET=-O2 -O2 " "INSTALL=/opt/local/bin/ginstall -c" "INSTALL_DATA=/opt/local/bin/ginstall -c -m 644" "INSTALL_PROGRAM=/opt/local/bin/ginstall -c" "INSTALL_SCRIPT=/opt/local/bin/ginstall -c" "LDFLAGS=" "LIBCFLAGS=-g -fkeep-inline-functions" "LIBCFLAGS_FOR_TARGET=-O2 -O2 " "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/opt/local" "infodir=/opt/local/share/info" "libdir=/opt/local/lib/gcc42" "prefix=/opt/local" "tooldir=/opt/local/i386-apple-darwin8.9.1" "AR=ar" "AS=as" "CC=/usr/bin/gcc-4.0" "CXX=/usr/bin/g++-4.0" "LD=ld" "LIBCFLAGS=-g -fkeep-inline-functions" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
make \
  CFLAGS="-g -fkeep-inline-functions -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common " \
  CONFIG_H="config.h  auto-host.h ../../gcc-4.2.0/gcc/../include/ansidecl.h" \
  MAKEOVERRIDES= \
  -f libgcc.mk all
make GCC_FOR_TARGET="/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.macports.org_dpupdate_dports_lang_gcc42/work/build/./gcc/xgcc -B/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.macports.org_dpupdate_dports_lang_gcc42/work/build/./gcc/ -B/opt/local/i386-apple-darwin8.9.1/bin/ -B/opt/local/i386-apple-darwin8.9.1/lib/ -isystem /opt/local/i386-apple-darwin8.9.1/include -isystem /opt/local/i386-apple-darwin8.9.1/sys-include" \
  AR_FOR_TARGET="/opt/local/i386-apple-darwin8.9.1/bin/ar" \
  AR_CREATE_FOR_TARGET="/opt/local/i386-apple-darwin8.9.1/bin/ar  rc" \
  AR_EXTRACT_FOR_TARGET="/opt/local/i386-apple-darwin8.9.1/bin/ar  x" \
  AR_FLAGS_FOR_TARGET="" \
  CC="/usr/bin/gcc-4.0" CFLAGS="-g -fkeep-inline-functions -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common " \
  BUILD_PREFIX="" \
  BUILD_PREFIX_1="" \
  LANGUAGES="" \
  LIBGCC2_CFLAGS="-O2  -O2 -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  "  \
  MULTILIB_CFLAGS="" T= crt3.o
make[5]: `crt3.o' is up to date.
rm -f ./libgcc_eh.a
/opt/local/i386-apple-darwin8.9.1/bin/ar  rc ./libgcc_eh.a libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde-darwin.o libgcc/./unwind-sjlj.o libgcc/./unwind-c.o
/opt/local/i386-apple-darwin8.9.1/bin/ar: ./libgcc_eh.a: Invalid operation
make[4]: *** [libgcc_eh.a] Error 1
make[3]: *** [stmp-multilib] Error 2
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2

Warning: the following items did not execute (for gcc42): com.apple.activate com.apple.build com.apple.destroot com.apple.install
Error: Status 1 encountered during processing.


More information about the macports-users mailing list