[Bug 123] New: Fail to build with static libstdc++
bugzilla-daemon at icedtea.classpath.org
bugzilla-daemon at icedtea.classpath.org
Wed Mar 19 13:51:41 PDT 2008
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=123
Summary: Fail to build with static libstdc++
Product: IcedTea
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: IcedTea
AssignedTo: unassigned at icedtea.classpath.org
ReportedBy: beuc at beuc.net
I compile icedtea6 from Debian Etch, with a manually installed GCJ and the
system's GCC (4.1.1). Compilation fails when openjdk tries to statically
compile libstdc++.
I used the following work-around:
find -name "Makefile" -o -name "*.gmk" -o -name "*.make" | xargs sed -i -e
's/STATIC_CXX \+= \+true/STATIC_CXX = false/'
How could this be done in a cleaner way?
Here's the build log:
Rebuilding
/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/corba/lib/i386/libioser12.so
because of /home/src/icedtea6/openjdk-ecj/\
control/build/linux-i586/corba/tmp/sun/com.sun.corba.se.internal.io/ioser12/obj/.files_compiled
mapfile-vers
/usr/bin/gcc -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused
-Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN -Di586 -\
DARCH='"i586"' -DLINUX -DRELEASE='"1.6.0-internal"' -D_LARGEFILE64_SOURCE
-D_GNU_SOURCE -D_REENTRANT -I. -I/home/src/icedtea6/openjdk-ecj/\
control/build/linux-i586/corba/tmp/sun/com.sun.corba.se.internal.io/ioser12/CClassHeaders
-I../../../../src/solaris/javavm/export -I../../\
../../src/share/javavm/export -I../../../../src/share/javavm/include
-I../../../../src/solaris/javavm/include -ICClassHeaders -I/usr/src/i\
cedtea6/bootstrap/jdk1.6.0/include
-I/usr/src/icedtea6/bootstrap/jdk1.6.0/include/linux
-I../../../../src/share/native/common -I../../../.\
./src/solaris/native/common
-I../../../../src/share/native/com/sun/corba/se/internal/io
-I../../../../src/solaris/native/com/sun/corba/se/\
internal/io -Xlinker -O1 -Xlinker -version-script=mapfile-vers -Xlinker -z
-Xlinker origin -Xlinker -rpath -Xlinker \$ORIGIN -Xlinker \
-z -Xlinker defs
-L/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/corba/lib/i386
-Wl,-soname=libioser12.so -shared -mimpure-tex\
t -o
/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/corba/lib/i386/libioser12.so
/home/src/icedtea6/openjdk-ecj/control/build/\
linux-i586/corba/tmp/sun/com.sun.corba.se.internal.io/ioser12/obj/ioser.o
-L/usr/src/icedtea6/bootstrap/jdk1.6.0/jre/lib/i386/ -ljvm -L\
/usr/src/icedtea6/bootstrap/jdk1.6.0/jre/lib/i386 -L -lgcj
-L/usr/src/icedtea6/bootstrap/jdk1.6.0/jre/lib/i386/ -ljvm -lc
/usr/bin/ld: cannot find -ljvm
collect2: ld returned 1 exit status
make[5]: ***
[/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/corba/lib/i386/libioser12.so]
Error 1
make[5]: Leaving directory
`/home/src/icedtea6/openjdk-ecj/corba/make/sun/corba/core'
make[4]: *** [build] Error 1
make[4]: Leaving directory
`/home/src/icedtea6/openjdk-ecj/corba/make/sun/corba'
make[3]: *** [build] Error 1
make[3]: Leaving directory `/home/src/icedtea6/openjdk-ecj/corba/make/sun'
make[2]: *** [build] Error 1
make[2]: Leaving directory `/home/src/icedtea6/openjdk-ecj/corba/make'
make[1]: *** [corba-build] Erreur 2
make[1]: quittant le répertoire « /home/src/icedtea6/openjdk-ecj/control/make
»
make: *** [stamps/icedtea-ecj.stamp] Erreur 2
In English:
LANG=C /usr/bin/gcc -O2 -DPRODUCT -fPIC -DCC_NOEX -W -Wall -Wno-unused
-Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN -g -DF\
ULL -DNO_ZLIB -DUNPACK_JNI -Di586 -DARCH='"i586"' -DLINUX -DRELEASE='"1.6.0"'
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -I. -I/hom\
e/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/sun/com.sun.java.util.jar.pack/unpack/CClassHeaders
-I/home/src/icedtea6/openjdk-e\
cj/jdk/src/solaris/javavm/export
-I/home/src/icedtea6/openjdk-ecj/jdk/src/share/javavm/export
-I/home/src/icedtea6/openjdk-ecj/jdk/src/sha\
re/javavm/include
-I/home/src/icedtea6/openjdk-ecj/jdk/src/solaris/javavm/include
-I/home/src/icedtea6/openjdk-ecj/jdk/src/share/native/co\
mmon -I/home/src/icedtea6/openjdk-ecj/jdk/src/solaris/native/common
-I/home/src/icedtea6/openjdk-ecj/jdk/src/share/native/com/sun/java/uti\
l/jar/pack
-I/home/src/icedtea6/openjdk-ecj/jdk/src/solaris/native/com/sun/java/util/jar/pack
-Xlinker -O1 -Xlinker -version-script=mapf\
ile-vers -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$ORIGIN
-Xlinker -z -Xlinker defs -L/home/src/icedtea6/openjdk-ecj/contro\
l/build/linux-i586/lib/i386 -Wl,-soname=libunpack.so -shared -mimpure-text -o
/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/li\
b/i386/libunpack.so
/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/sun/com.sun.java.util.jar.pack/unpack/obj/bands.o
/home\
/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/sun/com.sun.java.util.jar.pack/unpack/obj/bytes.o
/home/src/icedtea6/openjdk-ecj/c\
ontrol/build/linux-i586/tmp/sun/com.sun.java.util.jar.pack/unpack/obj/coding.o
/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tm\
p/sun/com.sun.java.util.jar.pack/unpack/obj/jni.o
/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/sun/com.sun.java.util.jar.p\
ack/unpack/obj/unpack.o
/home/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/sun/com.sun.java.util.jar.pack/unpack/obj/utils.o
/h\
ome/src/icedtea6/openjdk-ecj/control/build/linux-i586/tmp/sun/com.sun.java.util.jar.pack/unpack/obj/zip.o
-lz -L/home/src/icedtea6/openjdk\
-ecj/control/build/linux-i586/lib/i386/server -ljvm -Wl,-Bstatic -lstdc++ -lgcc
-Wl,-Bdynamic -ljava -L/home/src/icedtea6/openjdk-ecj/con\
trol/build/linux-i586/lib/i386/server -ljvm -lc
/usr/lib/gcc/i486-linux-gnu/4.1.2/libstdc++.a(eh_globals.o): In function
`__gnu_internal::get_global()':
(.text._ZN14__gnu_internal10get_globalEv+0x17): undefined reference to
`___tls_get_addr'
collect2: ld returned 1 exit status
The 'sed' above ultimately removes '-Wl,-Bstatic' in front of '-lstdc++'.
--
Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the distro-pkg-dev
mailing list