Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 226133 - sys-devel/gcc 3.3.6-r1 build fails for ppc targets with undefined reference to `rs6000_cpu_cpp_builtins'
Summary: sys-devel/gcc 3.3.6-r1 build fails for ppc targets with undefined reference t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-12 20:56 UTC by Christian Bayer
Modified: 2009-05-02 02:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Bayer 2008-06-12 20:56:26 UTC
Unfortunately I you libstdc++.so.5 for dev-java/ibm-jdk-bin on ppc.
Running java on the command line gives the following error:

powerbook ~ # java
dl failure on line 724Error: failed /opt/ibm-jdk-bin-1.6.0.1/jre/lib/ppc/j9vm/libjvm.so, because libstdc++.so.5: cannot open shared object file: No such file or directory

As libstdc++.so.5 is not a dependency for dev-java/ibm-jdk-bin there is no such library. At least on ppc this should be added to the ebuild, but this is not the bug i file here...

Compiling the most recent gcc with libstdc++.so.5 is gcc-3.3.6-r1 (I hope i found it out correctly). But the build of sys-devel/gcc 3.3.6-r1 build fails with the following error:

stage1/xgcc -Bstage1/ -B/usr/powerpc-unknown-linux-gnu/bin/ -o treelang/parse.o -c    -O2 -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wmissing-prototypes -Wmissing-declarations   -DHAVE_CONFIG_H -I. -Itreelang -I/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/gcc-3.3.6/gcc -I/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/gcc-3.3.6/gcc/treelang -I/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/gcc-3.3.6/gcc/config -I/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/gcc-3.3.6/gcc/../include /var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/gcc-3.3.6/gcc/treelang/parse.c
stage1/xgcc -Bstage1/ -B/usr/powerpc-unknown-linux-gnu/bin/    -O2 -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long   -DHAVE_CONFIG_H  -o tree1 \
        treelang/tree1.o treelang/treetree.o treelang/lex.o treelang/parse.o c-convert.o \
        c-typeck.o c-common.o c-decl.o attribs.o main.o libbackend.a ../libiberty/libiberty.a    ../libiberty/libiberty.a  ../libiberty/libiberty.a
c-common.o: In function `cb_register_builtins':
c-common.c:(.text+0x9ed4): undefined reference to `rs6000_cpu_cpp_builtins'
collect2: ld returned 1 exit status
make[2]: *** [tree1] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/build/gcc'
make: *** [bootstrap-lean] Error 2

Compiling earlier versions (e.g. gcc-3.2.2) of gcc fail with another error:
../../gcc-3.2.3/gcc/read-rtl.c: In function 'read_rtx':
../../gcc-3.2.3/gcc/read-rtl.c:662: error: lvalue required as increment operand
../../gcc-3.2.3/gcc/read-rtl.c:662:60: warning: C++ style comments are
not allowed in ISO C90
../../gcc-3.2.3/gcc/read-rtl.c:662:60: warning: (this will be reported
only once per input file)
make[1]: *** [read-rtl.o] Error 1
make[1]: Leaving directory `/root/gcc/obj/gcc'
make: *** [all-gcc] Error 2

As I found out this error seems to be due to compiling gcc-3.2.2 with a new gcc-4.2 or gcc-4.1 compiler. I did not find a solution to this either, so I think making gcc-3.3.6-r1 compile and adding it as a dependency to the ebuild of ibm-jdk should be the right thing here.

Reproducible: Always
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-12 23:50:16 UTC
The toolchain team doesn't support GCC 3.x anymore. For libstdc++.so.5 give sys-libs/libstdc++-v3 respective sys-libs/libstdc++-v3-bin a try.


@Java team: Seems the IBM JDK 1.6 ebuilds are missing =virtual/libstdc++-3.3 as dependency.
Comment 2 Christian Bayer 2008-06-14 07:06:36 UTC
Ok, emerging sys-libs/libstdc++-v3 did the trick. Sometimes the portage tree's completeness and sophistication still surprises me..
Thanks, Christian
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2008-06-14 09:13:37 UTC
(In reply to comment #1)
> The toolchain team doesn't support GCC 3.x anymore. For libstdc++.so.5 give
> sys-libs/libstdc++-v3 respective sys-libs/libstdc++-v3-bin a try.
> 
> 
> @Java team: Seems the IBM JDK 1.6 ebuilds are missing =virtual/libstdc++-3.3 as
> dependency.
> 

This wasn't catched because x86 does not need it. I will check other arches.

(In reply to comment #1)
> The toolchain team doesn't support GCC 3.x anymore. For libstdc++.so.5 give
> sys-libs/libstdc++-v3 respective sys-libs/libstdc++-v3-bin a try.
> 

Remove it from the virtual then.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2008-06-14 09:21:53 UTC
+  14 Jun 2008; Petteri Räty <betelgeuse@gentoo.org>
+  ibm-jdk-bin-1.6.0.1.ebuild:
+  Add dependency on virtual/libstdc++-3.3 on ppc and ppc64 for bug #226133.
+

Assigning back to base-system for possible virtual adjustement.
Comment 5 SpanKY gentoo-dev 2008-06-16 21:11:52 UTC
no idea what virtual adjustment you're talking about
Comment 6 Christian Bayer 2008-06-17 14:24:37 UTC
ibm-jdk-bin-1.6.0.1.ebuild definitely needs sys-libs/libstdc++-v3 on ppc, maybe on ppc64, too. so adding virtual/libstdc++ as a dependency to this ebuild would help.
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2008-06-17 15:12:23 UTC
(In reply to comment #5)
> no idea what virtual adjustment you're talking about
> 

If gcc-3.3 is not supported, it should not be in the virtual.

betelgeuse@pena /usr/portage/virtual/libstdc++ $ grep gcc libstdc++-3.3.ebuild
RDEPEND="|| ( =sys-libs/libstdc++-v3-bin-3.3* =sys-libs/libstdc++-v3-3.3* =sys-devel/gcc-3.3* )"
Comment 8 SpanKY gentoo-dev 2008-06-17 21:30:28 UTC
base-system isnt responsible for the toolchain

no one said gcc-3.3 isnt supported ... it just depends on what kind of support you're talking about
Comment 9 Mark Loeser (RETIRED) gentoo-dev 2008-07-06 00:21:37 UTC
I personally don't think its worth the headaches to keep this in the virtual.  We want most people to install libstdc++-v3 anyway, and not waste the time bootstrapping a full gcc install.

I'll remove this from the virtual in the next day or so unless someone has a good reason otherwise.
Comment 10 Christian Bayer 2008-07-10 09:44:12 UTC
What I want is a dependency of dev-java/ibm-jdk-bin for libstdc++-v3. I did not have it installed and so it did not work. As of this writing, I cannot see any ebuild with this dependency. So close this bug, but DO add any virtual or non-virtual dependency or whatever is needed to run ibm-jdk-bin.
Comment 11 Mark Loeser (RETIRED) gentoo-dev 2009-05-02 02:04:32 UTC
Remove gcc-3.3 from the virtual since no one is going to have it installed, and the libstdc++ ebuilds are better for them to use anyway.