OpenJDK linking error

Weijun Wang Weijun.Wang at Sun.COM
Mon Jan 12 06:31:56 UTC 2009


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