You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Rajesh Bhattacharya <ra...@gmail.com> on 2009/04/28 12:11:12 UTC
Error while building xerces-c-3.0.1 on AIX 6.1
I could not find any related thread quickly, hence this post. Will
appreciate any support on this.
I am trying to build xerces-c-3.0.1 on AIX 6.1 platform. Followed the
steps from the xerces website as below:
export OBJECT_MODE=64
./configure CXX=xlc_r CC=xlc_r CXXFLAGS=-q64 CFLAGS=-q64 [replaced
xlC_r with xlc_r]
gmake clean [added to clear off linker errors due to stale obj files]
gmake libxerces_c_la_LDFLAGS=-qmkshrobj
I get the following errors when 'make' reaches samples folder...
Making all in samples
gmake[2]: Entering directory `/rajesh/xerces-c-3.0.1/samples'
Compiling src/CreateDOMDocument/CreateDOMDocument.cpp
/bin/sh ../libtool --tag=CXX --mode=link xlc_r -q64 -D_THREAD_SAFE
-o CreateDOMDocument src/CreateDOMDocument/CreateDOMDocument.o
../src/libxerces-c.la -lnsl -lpthreads
mkdir .libs
xlc_r -q64 -D_THREAD_SAFE -o CreateDOMDocument
src/CreateDOMDocument/CreateDOMDocument.o ../src/.libs/libxerces-c.a
-lnsl -lpthreads
ld: 0711-317 ERROR: Undefined symbol: .clear__Q2_3std8ios_baseFib
ld: 0711-317 ERROR: Undefined symbol: __dl__FPv
ld: 0711-317 ERROR: Undefined symbol: .__ct__Q2_3std7_LockitFi
<<snipped>>
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
gmake[2]: *** [CreateDOMDocument] Error 8
gmake[2]: Leaving directory `/rajesh/xerces-c-3.0.1/samples'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/rajesh/xerces-c-3.0.1'
gmake: *** [all] Error 2
Thanks,
Rajesh.
Re: Error while building xerces-c-3.0.1 on AIX 6.1
Posted by Rajesh Bhattacharya <ra...@gmail.com>.
Many thanks Dave! It was indeed harmless.
I guess, we should include these steps into the build instructions page
for those who may want to build xerces with GNU C++ compiler on AIX.
Thanks,
Rajesh.
On 4/30/2009 10:35 PM, David Bertoni wrote:
> Rajesh Bhattacharya wrote:
>> Boris,
>>
>> I appreciate your attention & support.
>>
>> Now I attempted to build xerces library using g++ compiler. I did not
>> find any instruction for that, but followed the following steps:
>>
>> export OBJECT_MODE=64
>> ./configure CFLAGS="-maix64" CXXFLAGS="-maix64" LDFLAGS="-maix64"
>> gmake
>>
>> Now gmake spews too many ld errors, e.g.
>> /bin/sh ../libtool --tag=CXX --mode=link g++ -maix64 -D_THREAD_SAFE
>> -maix64 -o StdInParse src/StdInParse/StdInParse.o
>> src/StdInParse/StdInParseHandlers.o ../src/libxerces-c.la -lnsl
>> -lpthreads
>> g++ -maix64 -D_THREAD_SAFE -maix64 -o StdInParse
>> src/StdInParse/StdInParse.o src/StdInParse/StdInParseHandlers.o
>> ../src/.libs/libxerces-c.a -lnsl -lpthreads
>>
>> ld: 0711-224 WARNING: Duplicate symbol: non-virtual thunk to
>> xercesc_3_0::HandlerBase::resetErrors()
> If you're only getting these duplicate symbol warnings, then it's OK.
>
> The AIX linker is not savvy enough to understand that there will be
> many duplicate weak symbols when linking C++ objects, because of
> inline functions and template instantiations.
>
> It's been several years since I've worked on AIX, so there may even be
> a linker option now to suppress duplicate weak symbols.
>
> Dave
Re: Error while building xerces-c-3.0.1 on AIX 6.1
Posted by David Bertoni <db...@apache.org>.
Rajesh Bhattacharya wrote:
> Boris,
>
> I appreciate your attention & support.
>
> Now I attempted to build xerces library using g++ compiler. I did not
> find any instruction for that, but followed the following steps:
>
> export OBJECT_MODE=64
> ./configure CFLAGS="-maix64" CXXFLAGS="-maix64" LDFLAGS="-maix64"
> gmake
>
> Now gmake spews too many ld errors, e.g.
> /bin/sh ../libtool --tag=CXX --mode=link g++ -maix64 -D_THREAD_SAFE
> -maix64 -o StdInParse src/StdInParse/StdInParse.o
> src/StdInParse/StdInParseHandlers.o ../src/libxerces-c.la -lnsl
> -lpthreads
> g++ -maix64 -D_THREAD_SAFE -maix64 -o StdInParse
> src/StdInParse/StdInParse.o src/StdInParse/StdInParseHandlers.o
> ../src/.libs/libxerces-c.a -lnsl -lpthreads
>
> ld: 0711-224 WARNING: Duplicate symbol: non-virtual thunk to
> xercesc_3_0::HandlerBase::resetErrors()
If you're only getting these duplicate symbol warnings, then it's OK.
The AIX linker is not savvy enough to understand that there will be many
duplicate weak symbols when linking C++ objects, because of inline
functions and template instantiations.
It's been several years since I've worked on AIX, so there may even be a
linker option now to suppress duplicate weak symbols.
Dave
Re: Error while building xerces-c-3.0.1 on AIX 6.1
Posted by Rajesh Bhattacharya <ra...@gmail.com>.
Boris,
I appreciate your attention & support.
Now I attempted to build xerces library using g++ compiler. I did not
find any instruction for that, but followed the following steps:
export OBJECT_MODE=64
./configure CFLAGS="-maix64" CXXFLAGS="-maix64" LDFLAGS="-maix64"
gmake
Now gmake spews too many ld errors, e.g.
/bin/sh ../libtool --tag=CXX --mode=link g++ -maix64 -D_THREAD_SAFE
-maix64 -o StdInParse src/StdInParse/StdInParse.o
src/StdInParse/StdInParseHandlers.o ../src/libxerces-c.la -lnsl
-lpthreads
g++ -maix64 -D_THREAD_SAFE -maix64 -o StdInParse
src/StdInParse/StdInParse.o src/StdInParse/StdInParseHandlers.o
../src/.libs/libxerces-c.a -lnsl -lpthreads
ld: 0711-224 WARNING: Duplicate symbol: non-virtual thunk to
xercesc_3_0::HandlerBase::resetErrors()
Thanks again for the support,
Rajesh.
On Thu, Apr 30, 2009 at 12:04 AM, Boris Kolpackov
<bo...@codesynthesis.com> wrote:
> Hi Rajesh,
>
> Rajesh Bhattacharya <ra...@gmail.com> writes:
>
>> After installing xerces 3.0 (gmake install), I am facing the linking
>> error as below for multiple symbols when I try to build my application
>> code on AIX using g++ compiler:
>
> You need to use the same compiler (XL C++ or g++) to build both Xerces-C++
> and your application.
>
> Boris
>
> --
> Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
> Open source XML data binding for C++: http://codesynthesis.com/products/xsd
> Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
>
Re: Error while building xerces-c-3.0.1 on AIX 6.1
Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Rajesh,
Rajesh Bhattacharya <ra...@gmail.com> writes:
> After installing xerces 3.0 (gmake install), I am facing the linking
> error as below for multiple symbols when I try to build my application
> code on AIX using g++ compiler:
You need to use the same compiler (XL C++ or g++) to build both Xerces-C++
and your application.
Boris
--
Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
Open source XML data binding for C++: http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
Re: Error while building xerces-c-3.0.1 on AIX 6.1
Posted by Rajesh Bhattacharya <ra...@gmail.com>.
Thanks Boris, that worked. In my system, xlC_r -> /usr/vac/bin/xlc.
After installing xerces 3.0 (gmake install), I am facing the linking
error as below for multiple symbols when I try to build my application
code on AIX using g++ compiler:
ld: 0711-317 ERROR: Undefined symbol:
xercesc_3_0::DTDEntityDecl::isSerializable() const
But look at the nm output:
nm -X64 /usr/local/lib/libxerces-c.a | grep "DTDEntityDecl::isSerializable"
.xercesc_3_0::DTDEntityDecl::isSerializable() const T 1888
xercesc_3_0::DTDEntityDecl::isSerializable() const D 2472 24
xercesc_3_0::DTDEntityDecl::isSerializable() const d 2168 8
The same module links well on Cygwin/Windows!
Thanks for all the support,
Rajesh.
On Wed, Apr 29, 2009 at 1:55 AM, Boris Kolpackov
<bo...@codesynthesis.com> wrote:
> Hi Rajesh,
>
> Rajesh Bhattacharya <ra...@gmail.com> writes:
>
>> ./configure CXX=xlc_r CC=xlc_r CXXFLAGS=-q64 CFLAGS=-q64 [replaced
>> xlC_r with xlc_r]
>>
>> [...]
>>
>> ld: 0711-317 ERROR: Undefined symbol: .clear__Q2_3std8ios_baseFib
>
> The linker is not finding the C++ library symbols. Try to use xlC_r
> instead of xlc_r, as suggested in the instructions.
>
> Boris
>
> --
> Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
> Open source XML data binding for C++: http://codesynthesis.com/products/xsd
> Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
>
Re: Error while building xerces-c-3.0.1 on AIX 6.1
Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Rajesh,
Rajesh Bhattacharya <ra...@gmail.com> writes:
> ./configure CXX=xlc_r CC=xlc_r CXXFLAGS=-q64 CFLAGS=-q64 [replaced
> xlC_r with xlc_r]
>
> [...]
>
> ld: 0711-317 ERROR: Undefined symbol: .clear__Q2_3std8ios_baseFib
The linker is not finding the C++ library symbols. Try to use xlC_r
instead of xlc_r, as suggested in the instructions.
Boris
--
Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
Open source XML data binding for C++: http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde