gcc won't compile

I did perform an upgrade on FreeBSD-9.2 Release to 10.0-Release. In this process I need to recompile all installed programs. This means that few of the installed programs pull in gcc. For some reason all versions of gcc stop compiling at this location. I have tested gcc-4.6.4 and gcc-4.8.3.

Code:
libtool: compile:  /usr/ports/lang/gcc48/work/build/./gcc/gcj -B/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/ -B/usr/ports/lang/gcc48/work/build/./gcc/ -B/usr/local/i386-portbld-freebsd10.0/bin/ -B/usr/local/i386-portbld-freebsd10.0/lib/ -isystem /usr/local/i386-portbld-freebsd10.0/include -isystem /usr/local/i386-portbld-freebsd10.0/sys-include -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././../gcc-4.8-20140220/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -fsource-filename=/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/classpath/lib/classes -MT gnu/java/security/x509.lo -MD -MP -MF gnu/java/security/x509.deps @gnu/java/security/x509.list  -fPIC -o gnu/java/security/.libs/x509.o
/bin/sh ./libtool --tag=GCJ   --mode=compile /usr/ports/lang/gcc48/work/build/./gcc/gcj -B/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/ -B/usr/ports/lang/gcc48/work/build/./gcc/ -B/usr/local/i386-portbld-freebsd10.0/bin/ -B/usr/local/i386-portbld-freebsd10.0/lib/ -isystem /usr/local/i386-portbld-freebsd10.0/include -isystem /usr/local/i386-portbld-freebsd10.0/sys-include    -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././../gcc-4.8-20140220/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2  -c -o gnu/java/security/x509/ext.lo -fsource-filename=/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/classpath/lib/classes -MT gnu/java/security/x509/ext.lo -MD -MP -MF gnu/java/security/x509/ext.deps @gnu/java/security/x509/ext.list
libtool: compile:  /usr/ports/lang/gcc48/work/build/./gcc/gcj -B/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/ -B/usr/ports/lang/gcc48/work/build/./gcc/ -B/usr/local/i386-portbld-freebsd10.0/bin/ -B/usr/local/i386-portbld-freebsd10.0/lib/ -isystem /usr/local/i386-portbld-freebsd10.0/include -isystem /usr/local/i386-portbld-freebsd10.0/sys-include -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././../gcc-4.8-20140220/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -fsource-filename=/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/classpath/lib/classes -MT gnu/java/security/x509/ext.lo -MD -MP -MF gnu/java/security/x509/ext.deps @gnu/java/security/x509/ext.list  -fPIC -o gnu/java/security/x509/.libs/ext.o
/bin/sh ./libtool --tag=GCJ   --mode=compile /usr/ports/lang/gcc48/work/build/./gcc/gcj -B/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/ -B/usr/ports/lang/gcc48/work/build/./gcc/ -B/usr/local/i386-portbld-freebsd10.0/bin/ -B/usr/local/i386-portbld-freebsd10.0/lib/ -isystem /usr/local/i386-portbld-freebsd10.0/include -isystem /usr/local/i386-portbld-freebsd10.0/sys-include    -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././../gcc-4.8-20140220/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2  -c -o gnu/java/text.lo -fsource-filename=/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/classpath/lib/classes -MT gnu/java/text.lo -MD -MP -MF gnu/java/text.deps @gnu/java/text.list
libtool: compile:  /usr/ports/lang/gcc48/work/build/./gcc/gcj -B/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/ -B/usr/ports/lang/gcc48/work/build/./gcc/ -B/usr/local/i386-portbld-freebsd10.0/bin/ -B/usr/local/i386-portbld-freebsd10.0/lib/ -isystem /usr/local/i386-portbld-freebsd10.0/include -isystem /usr/local/i386-portbld-freebsd10.0/sys-include -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././../gcc-4.8-20140220/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -fsource-filename=/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava/classpath/lib/classes -MT gnu/java/text.lo -MD -MP -MF gnu/java/text.deps @gnu/java/text.list  -fPIC -o gnu/java/.libs/text.o
gcj: internal compiler error: Killed (program jc1)
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake[5]: *** [gnu/java/nio/charset.lo] Error 1
gmake[5]: *** Waiting for unfinished jobs....
gmake[5]: Leaving directory `/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory `/usr/ports/lang/gcc48/work/build/i386-portbld-freebsd10.0/libjava'
gmake[3]: *** [all-target-libjava] Error 2
gmake[3]: Leaving directory `/usr/ports/lang/gcc48/work/build'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/lang/gcc48/work/build'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/gcc48
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/gcc48

I don't know how to solve this issue since I am not sure what the problem is. When I did do this same thing on my FreeBSD computer there was no such issue.

Thanks for the help.
 
It's just a thought, so I'm not sure if I can help you. The only compiler that is able to compile gcc is gcc itself. Maybe you are trying to compile gcc with clang?

Indeed this should not happen since gcc is able to bootstrap.
 
meadow said:
It's just a thought, so I'm not sure if I can help you. The only compiler that is able to compile gcc is gcc itself.
I don't think that's the case.

This weekend I did some testing / playing with FreeBSD 10 (i386) and as you know Clang is now the default compiler; executing cc executes Clang. However, there are still several ports which require the use of GCC and I also came across one of those. Well; during the lang/gcc build it became quite obvious that Clang was being used. And the whole thing build like a charm. This is easily reproducible: run # make -C /usr/ports/lang/gcc build on FreeBSD 10 and pay close attention to the output. You'll notice something in the lines of "Checking for gcc... cc", but that's not GCC :)

And to my knowledge (but I could be off here) it also doesn't use any bootstrapping process. The reason why I come to such a conclusion is because the default setting for the "bootstrap" setting is off. And well, although I haven't kept track of the entire build process I did notice the specific Clang warnings which went on for a long time into the build process.

Ergo my conclusion is that GCC can be perfectly build with Clang.

Even so, bottom line; GCC should build just fine on FreeBSD 10, even when you only got Clang around.
 
jonfr said:
This means that few of the installed programs pull in gcc. For some reason all versions of gcc stop compiling at this location.
Could you show us the output of: # make -C /usr/ports/lang/gcc showconfig?

The error seems to be Java specific, which leads up to the next question: which version of OpenJDK are you using?
 
That gives me this.

Code:
make -C /usr/ports/lang/gcc showconfig
===> The following configuration options are available for gcc-4.6.4:
     BOOTSTRAP=off: Build using a full bootstrap
     JAVA=off: Java platform support
===> Use 'make config' to modify these settings

I did not solve this issue, but I did work around it so I can continue the rebuild.
 
Back
Top