Build openjdk7/hotspot error while linking,
Dang Nhan Nguyen
nhann at chalmers.se
Tue Jun 14 15:43:23 UTC 2011
I found out the cause is my additional code to the hotspot which use sdt namespace:
using namespace std;
When I remove this line and all the printout with "cout <<", no more linking error. Though I don't have a thorough explanation.
Does it mean I cannot use certain features in stdlib in hotspot? If so, which part (at least std namespace is not possible)?
> -----Original Message-----
> From: David Holmes [mailto:David.Holmes at oracle.com]
> Sent: Tuesday, June 14, 2011 1:21 PM
> To: Dang Nhan Nguyen
> Cc: build-dev at openjdk.java.net
> Subject: Re: Build openjdk7/hotspot error while linking,
> Sorry never seen this, or heard of this one, when building hotspot. I
> suggest comparing that build instructions used when building the whole
> JDK with those building Hotspot by itself.
> David Holmes
> Dang Nhan Nguyen said the following on 06/14/11 20:01:
> > Hi All,
> > I have successfully built the whole Openjdk7/JVM (b121) on an
> > platform with amd64/Ubuntu/Gcc 4.4.3. I try to build hotspot alone on
> > the same machine.
> > ALT_OUTPUTDIR=../../build/hotspot_product ARCH_DATA_MODEL=64 make
> > product 2>&1 | tee ../../build/hotspot_product.log
> > The building process go well, but the linking process has a error
> > like this:
> > Linking vm... /usr/bin/ld:
> > /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a(ctype.o): relocation
> > R_X86_64_32S against `vtable for std::ctype<wchar_t>' can not be used
> > when making a shared object; recompile with -fPIC
> > /usr/lib/gcc/x86_64-linux-gnu/4.4.3/libstdc++.a: could not read
> > symbols: Bad value collect2: ld returned 1 exit status
> > I try some time but have not solved it successfully. Could anybody
> > hint me what is the actual problem and how to solve it?
> > Thank you, --Nhan Nguyen
More information about the build-dev