This happens with gcc 4.1.1 too. Linux 2.6.19 (pure x86_64 system without 32bit libraries) glibc 2.5 gcc 4.1.1 /usr/include/asm contains the correct kernel x86_64 headers
make[5]: Entering directory `/home/fraga/src/b/x86_64-unknown-linux-gnu/32/libjava' depbase=`echo prims.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \ if /bin/sh ./libtool --mode=compile /home/fraga/src/b/./gcc/xgcc -shared-libgcc -B/home/fraga/src/b/./gcc -nostdinc++ -L/home/fraga/src/b/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/home/fraga/src/b/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -m32 -DHAVE_CONFIG_H -I. -I../../../../gcc-4.2-20070124/libjava -I./include -I./gcj -I../../../../gcc-4.2-20070124/libjava -Iinclude -I../../../../gcc-4.2-20070124/libjava/include -I../../../../gcc-4.2-20070124/libjava/classpath/include -Iclasspath/include -I../../../../gcc-4.2-20070124/libjava/classpath/native/fdlibm -I../../../../gcc-4.2-20070124/libjava/../boehm-gc/include -I../boehm-gc/include -I../../../../gcc-4.2-20070124/libjava/libltdl -I../../../../gcc-4.2-20070124/libjava/libltdl -I../../../../gcc-4.2-20070124/libjava/.././libjava/../gcc -I../../../../gcc-4.2-20070124/libjava/../zlib -I../../../../gcc-4.2-20070124/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Wextra -Wall -D_GNU_SOURCE -DPREFIX="\"/usr/local\"" -DTOOLEXECLIBDIR="\"/usr/local/lib/../lib\"" -DJAVA_HOME="\"/usr/local\"" -DBOOT_CLASS_PATH="\"/usr/local/share/java/libgcj-4.2.0.jar\"" -DJAVA_EXT_DIRS="\"/usr/local/share/java/ext\"" -DGCJ_ENDORSED_DIRS="\"/usr/local/share/java/gcj-endorsed\"" -DGCJ_VERSIONED_LIBDIR="\"/usr/local/lib/../lib/gcj-4.2.0\"" -DPATH_SEPARATOR="\":\"" -DLIBGCJ_DEFAULT_DATABASE="\"/usr/local/lib/../lib/gcj-4.2.0/classmap.db\"" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"gcj-4.2.0/classmap.db\"" -O2 -march=athlon64 -msse3 -pipe -ftree-vectorize -D_GNU_SOURCE -m32 -MT prims.lo -MD -MP -MF "$depbase.Tpo" -c -o prims.lo ../../../../gcc-4.2-20070124/libjava/prims.cc; \ then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi /home/fraga/src/b/./gcc/xgcc -shared-libgcc -B/home/fraga/src/b/./gcc -nostdinc++ -L/home/fraga/src/b/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/home/fraga/src/b/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -m32 -DHAVE_CONFIG_H -I. -I../../../../gcc-4.2-20070124/libjava -I./include -I./gcj -I../../../../gcc-4.2-20070124/libjava -Iinclude -I../../../../gcc-4.2-20070124/libjava/include -I../../../../gcc-4.2-20070124/libjava/classpath/include -Iclasspath/include -I../../../../gcc-4.2-20070124/libjava/classpath/native/fdlibm -I../../../../gcc-4.2-20070124/libjava/../boehm-gc/include -I../boehm-gc/include -I../../../../gcc-4.2-20070124/libjava/libltdl -I../../../../gcc-4.2-20070124/libjava/libltdl -I../../../../gcc-4.2-20070124/libjava/.././libjava/../gcc -I../../../../gcc-4.2-20070124/libjava/../zlib -I../../../../gcc-4.2-20070124/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/usr/local\" -DTOOLEXECLIBDIR=\"/usr/local/lib/../lib\" -DJAVA_HOME=\"/usr/local\" -DBOOT_CLASS_PATH=\"/usr/local/share/java/libgcj-4.2.0.jar\" -DJAVA_EXT_DIRS=\"/usr/local/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/usr/local/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/usr/local/lib/../lib/gcj-4.2.0\" -DPATH_SEPARATOR=\":\" -DLIBGCJ_DEFAULT_DATABASE=\"/usr/local/lib/../lib/gcj-4.2.0/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.2.0/classmap.db\" -O2 -march=athlon64 -msse3 -pipe -ftree-vectorize -D_GNU_SOURCE -m32 -MT prims.lo -MD -MP -MF .deps/prims.Tpo -c ../../../../gcc-4.2-20070124/libjava/prims.cc -fPIC -DPIC -o .libs/prims.o ../../../../gcc-4.2-20070124/libjava/prims.cc:107: warning: deprecated conversion from string constant to 'char*' ../../../../gcc-4.2-20070124/libjava/prims.cc: In function 'void catch_fpe(int)': ../../../../gcc-4.2-20070124/libjava/prims.cc:173: warning: dereferencing type-punned pointer will break strict-aliasing rules ../../../../gcc-4.2-20070124/libjava/prims.cc: In function 'jint _Jv_CreateJavaVM(JvVMInitArgs*)': ../../../../gcc-4.2-20070124/libjava/prims.cc:1442: error: 'SYS_sigaction' was not declared in this scope ../../../../gcc-4.2-20070124/libjava/prims.cc:1446: error: 'SYS_sigaction' was not declared in this scope ./include/java-signal-aux.h: At global scope: ./include/java-signal-aux.h:112: warning: 'void restore()' declared 'static' but never defined {standard input}: Assembler messages: {standard input}:5: Error: junk at end of line, first unrecognized character is `*' {standard input}:6: Error: junk at end of line, first unrecognized character is `*' {standard input}:7: Error: expected comma after "_ZGAN8__JArrayC1Ev" make[5]: *** [prims.lo] Error 1 make[5]: Leaving directory `/home/fraga/src/b/x86_64-unknown-linux-gnu/32/libjava' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/fraga/src/b/x86_64-unknown-linux-gnu/32/libjava' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/home/fraga/src/b/x86_64-unknown-linux-gnu/libjava' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/home/fraga/src/b/x86_64-unknown-linux-gnu/libjava' make[1]: *** [all-target-libjava] Error 2 make[1]: Leaving directory `/home/fraga/src/b' make: *** [bootstrap] Error 2 I googled and found that SYS_sigaction is only defined on 32 bit arch... so why is it looking for it? I don't pretend to compile 32 bit programs, so I don't need it right? Thanks -- Summary: Can't compile java frontend on Linux x86_64 (SYS_sigaction undeclared) Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fragabr at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30639