OpenJDK linking error

Peng Du imdupeng at gmail.com
Mon Jan 12 16:33:14 UTC 2009


Thanks, Weijun

However, the problem is still not resolved even if I've installed
libstdc++ from my distribution: 

=================================================================
[peng at localhost openjdk]$ locate libstdc++.so
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++.so.5.0.7
/usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6.0.10
/usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/libstdc++.so 
=================================================================

I've even tried to create a symbolic link "libstdc++.so" at /usr/lib/ to
all the above libstdc++.so.*. The problem still does not go away. I am
really out of solution. 

Please help! Thanks!



On Mon, 2009-01-12 at 14:31 +0800, Weijun Wang wrote:
> libstdc++ is a separate package, not included in gcc/g++. You may need
> to install it and try again.
> 
> Peng Du wrote:
> > Hello, everyone
> > 
> > I tried to generate a debug build of OpenJDK Build b42 on a x86 Linux
> > box. Everything went well except for the following link error. It seemed
> > the 'gamma' launcher can't be linked and LD complained about missing
> > '-lstdc++' and '-ljvm'. But I am sure I have gcc/g++ properly
> > installed. 
> > 
> > Please help! Thanks! 
> > 
> > ====================================================================
> > Linking vm...
> > make[8]: Entering directory
> > `/work/jvm/openjdk-debug/hotspot/outputdir/linux_i486_compiler2/jvmg'
> > make[8]: `libsaproc.so' is up to date.
> > make[8]: Leaving directory
> > `/work/jvm/openjdk-debug/hotspot/outputdir/linux_i486_compiler2/jvmg'
> > /usr/bin/ld: cannot find -lstdc++
> > collect2: ld returned 1 exit status
> > { \
> > 	    echo Linking launcher...; \
> > 	     \
> > 	    gcc -m32 -march=i586 -Xlinker -O1 -m32 -march=i586 -export-dynamic
> > -L `pwd` -o gamma launcher.o -ljvm -lm -ldl -lpthread; \
> > 	     \
> >         }
> > Linking launcher...
> > /usr/bin/ld: cannot find -ljvm
> > collect2: ld returned 1 exit status
> > make[7]: *** [gamma] Error 1
> > make[7]: Leaving directory
> > `/work/jvm/openjdk-debug/hotspot/outputdir/linux_i486_compiler2/jvmg'
> > make[6]: *** [the_vm] Error 2
> > make[6]: Leaving directory
> > `/work/jvm/openjdk-debug/hotspot/outputdir/linux_i486_compiler2/jvmg'
> > make[5]: *** [jvmg] Error 2
> > make[5]: Leaving directory `/work/jvm/openjdk-debug/hotspot/outputdir'
> > make[4]: *** [generic_build2] Error 2
> > make[4]: Leaving directory `/work/jvm/openjdk/hotspot/make'
> > make[3]: *** [jvmg] Error 2
> > make[3]: Leaving directory `/work/jvm/openjdk/hotspot/make'
> > make[2]: *** [hotspot-build] Error 2
> > make[2]: Leaving directory `/work/jvm/openjdk'
> > make[1]: *** [generic_debug_build] Error 2
> > make[1]: Leaving directory `/work/jvm/openjdk'
> > make: *** [build_debug_image] Error 2
> > ====================================================================
> > 
> > 
> > 
> > 
> > 
> > 
> > 




More information about the build-dev mailing list