Building gcc-4.3.6 on sparc-solaris with the following flags [ebuild U ] sys-devel/gcc-4.3.6 [4.3.2-r4] USE="fortran gcj gtk nls objc openmp (-altivec) -bootstrap -build -doc (-fixed-point) (-hardened) (-libffi) -mudflap (-multilib) -multislot -nocxx -nopie -nossp -nptl -objc++ -objc-gc -test -vanilla (-n32%) (-n64%)" 0 kB fails with this error: /tmp/chithanh/portage/sys-devel/gcc-4.3.6/work/build/./prev-gcc/xgcc -B/tmp/chithanh/portage/sys-devel/gcc-4.3.6/work/build/./prev-gcc/ -B/home/pub/lib/gentoo-prefix/usr/sparc-sun-solaris2.10/bin/ -O2 -pipe -mcpu=ultrasparc -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -o jc1 \ java/class.o java/decl.o java/expr.o java/constants.o java/lang.o java/typeck.o java/except.o java/verify-glue.o java/verify-impl.o java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o java/mangle_name.o java/builtins.o java/resource.o java/jcf-depend.o java/jcf-path.o java/boehm.o java/java-gimplify.o main.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a -lz /home/pub/lib/gentoo-prefix/usr/lib/libiconv.so -Wl,-rpath -Wl,/home/pub/lib/gentoo-prefix/usr/lib ../libcpp/libcpp.a /home/pub/lib/gentoo-prefix/usr/lib/libintl.so -L/home/pub/lib/gentoo-prefix/usr/lib /home/pub/lib/gentoo-prefix/usr/lib/libiconv.so -lc -Wl,-rpath -Wl,/home/pub/lib/gentoo-prefix/usr/lib /home/pub/lib/gentoo-prefix/usr/lib/libiconv.so -Wl,-rpath -Wl,/home/pub/lib/gentoo-prefix/usr/lib ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a attribs.o -lmpfr -lgmp build/genchecksum cc1obj-dummy > cc1obj-checksum.c c-opts.o: In function `add_prefixed_path': c-opts.c:(.text+0x21f4): undefined reference to `cpp_GCC_INCLUDE_DIR_len' c-opts.c:(.text+0x21f8): undefined reference to `cpp_GCC_INCLUDE_DIR' c-opts.c:(.text+0x21fc): undefined reference to `cpp_GCC_INCLUDE_DIR_len' c-opts.c:(.text+0x2204): undefined reference to `cpp_GCC_INCLUDE_DIR' c-incpath.o: In function `register_include_chains': c-incpath.c:(.text+0x734): undefined reference to `cpp_relocated' c-incpath.c:(.text+0x74c): undefined reference to `cpp_GCC_INCLUDE_DIR_len' c-incpath.c:(.text+0x750): undefined reference to `cpp_GCC_INCLUDE_DIR_len' c-incpath.c:(.text+0x75c): undefined reference to `cpp_include_defaults' c-incpath.c:(.text+0x760): undefined reference to `cpp_include_defaults' c-incpath.c:(.text+0x764): undefined reference to `cpp_include_defaults' c-incpath.c:(.text+0x770): undefined reference to `cpp_include_defaults' c-incpath.c:(.text+0x79c): undefined reference to `cpp_PREFIX_len' c-incpath.c:(.text+0x7a0): undefined reference to `cpp_PREFIX_len' c-incpath.c:(.text+0x7a4): undefined reference to `cpp_PREFIX' c-incpath.c:(.text+0x7b0): undefined reference to `cpp_PREFIX' c-incpath.c:(.text+0x7d8): undefined reference to `gcc_exec_prefix' c-incpath.c:(.text+0x970): undefined reference to `cpp_include_defaults' c-incpath.c:(.text+0x97c): undefined reference to `cpp_include_defaults' c-incpath.c:(.text+0x980): undefined reference to `cpp_GCC_INCLUDE_DIR' c-incpath.c:(.text+0x994): undefined reference to `cpp_GCC_INCLUDE_DIR' c-incpath.c:(.text+0xa94): undefined reference to `gcc_exec_prefix' c-incpath.c:(.text+0xaa8): undefined reference to `cpp_EXEC_PREFIX' c-incpath.c:(.text+0xab4): undefined reference to `cpp_EXEC_PREFIX' collect2: ld returned 1 exit status make[3]: *** [cc1plus-dummy] Error 1 As you can see, the old version 4.3.2-r4 built fine with the same flags.
Created attachment 283769 [details] build.log.xz
Same here, I think that version is just foobared. Do you need it? 4.5 builds on sparc now too.
No, I don't need that version anymore. I just used 4.3.2 because it was the only version that could build gcj (bug 238297). gcc-4.4 and 4.5 fail in gcj, but I have made a patch for them in the meantime. Will post shortly in a separate bug.
Ok, so probably best >4.3.2 <4.4 is masked on solaris, and gcj needs to be fixed. Is is the libtool problem by chance?
A sorry wrong bug. It is the binutils symbol versioning issue http://sourceware.org/bugzilla/show_bug.cgi?id=2524 that already caused bug 222625 and bug 308587. The workaround is to use THREADCXXFLAGS="-pthread" instead of THREADLIBS="-lpthread"
hmmm, telling gcc people that gcc really knows best seems somewhat odd
(In reply to comment #3) > No, I don't need that version anymore. I just used 4.3.2 because it was the > only version that could build gcj (bug 238297). > > gcc-4.4 and 4.5 fail in gcj, but I have made a patch for them in the meantime. > Will post shortly in a separate bug. Hmm, I built gcj on sparc-solaris yesterday without problems: [hathor:~] % qlist -IUv sys-devel/gcc sys-devel/gcc-4.2.4-r1 (fortran gcj nls objc) sys-devel/gcc-4.3.3-r2 (fortran gcj nls objc) sys-devel/gcc-4.4.1 (fortran gcj nls objc) sys-devel/gcc-4.5.2-r00.1 (fortran gcj nls objc) sys-devel/gcc-config-1.4.1-r00.2
this version is masked on Solaris now.