stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: Any ideas on these StdLib build errors?
Date Thu, 09 Feb 2006 16:44:24 GMT
Liviu Nicoara wrote:
> Martin,
> 
> If you use implicit inclusion you need to collect the template
> instantiations via the prelink step (-qmkshrobj).

That's what we do on AIX, but it gives errors in Linux archive builds.
I have a feeling that it's not the right thing to do even on AIX. The
option implies "making a shared object" which is not what we want when
building an ordinary archive (the traditional kind). AIX has two types
of archives: ordinary and shared, so on AIX -qmkshrobj is correct when
building the latter but I suspect not for the former.

> I see in that in your
> later post, config.h has RWSTD_NO_IMPLICIT_INCLUSION is defined but down
> here you build your example with -qtemopinc.

I'm not sure where the -qtemopinc option came from but the library
should automatically adjust to these options by #undefining (or
#defining) the autoconfigured macros. (IIRC, you get the credit
for implementing this :)

In any case, I think it's clear that the XLC++/Linux build is messed
up in more than one way.

Martin

> 
> Liviu
> 
> Martin Sebor wrote:
> 
>>Martin Sebor wrote:
>>[...]
>>
>>
>>>With this fixed in my build I can compile the whole library with
>>>just a bunch of warnings like the one below but no compilation
>>>errors. I will need to look into the warnings but before I do
>>>I think I might look at the linker errors I get:
>>>
>>>/usr/bin/ld: Error: The symbol `backtrace@@GLIBC_2.1' has a R_PPC_REL24 
>>>relocation, that means 'assert.o' was compiled without -fPIC.
>>>/usr/bin/ld: Error: The symbol `backtrace_symbols_fd@@GLIBC_2.1' has a 
>>>R_PPC_REL24 relocation, that means 'assert.o' was compiled without -fPIC.
>>>/usr/bin/ld: Error: The symbol `fprintf@@GLIBC_2.0' has a R_PPC_REL24 
>>>relocation, that means 'assert.o' was compiled without -fPIC.
>>>/usr/bin/ld: Error: The symbol `fprintf@@GLIBC_2.0' has a R_PPC_REL24 
>>>relocation, that means 'assert.o' was compiled without -fPIC.
>>>/usr/bin/ld: Error: The symbol `abort@@GLIBC_2.0' has a R_PPC_REL24 
>>>relocation, that means 'assert.o' was compiled without -fPIC.
>>
>>
>>As the errors suggest, they are caused by trying to prelink the library
>>objects compiled without -fPIC with -qmkshrobj. On AIX we use the flag
>>even when building ordinary archive libraries (I think we do it to
>>collect all the template instantiations from the repository) but it's
>>clearly the wrong thing to do on Linux (and it's probably wrong on AIX
>>as well). So with -qmkshrobj removed I was able to build the library.
>>
>>Unfortunately, most (all?) programs now fail to link with it because
>>of errors like the one below. I suspect it has something to do with
>>the warnings I mentioned in my previous post.
>>
>>Stay tuned for more...
>>
>>xlC -F /package/1/ppc64/compilers/ibm/va80/vac.cfg accum.o -o accum 
>>-I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG 
>>-D_RWSTD_USE_CONFIG   -I/build/sebor/dev/stdlib/include/ansi 
>>-D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG -I/build/sebor/xlc-8.0-11s/include 
>>-I/build/sebor/dev/stdlib/include 
>>-I/build/sebor/dev/stdlib/examples/include  -qtempinc=accum.ti 
>>-L/build/sebor/xlc-8.0-11s/lib -lstd11s   -lm
>>/build/sebor/xlc-8.0-11s/lib/libstd11s.a(iostream.o)(.text+0x378): In 
>>function `std::basic_filebuf<wchar_t, std::char_traits<wchar_t> 
>> >::basic_filebuf(int, wchar_t*, int)':
>>/build/sebor/dev/stdlib/include/fstream:129: undefined reference to 
>>`std::basic_streambuf<wchar_t, std::char_traits<wchar_t> 
>> >::basic_streambuf(__rw::__rw_openmode)'
>>


Mime
View raw message