incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nico...@roguewave.com>
Subject Re: Any ideas on these StdLib build errors?
Date Thu, 09 Feb 2006 14:47:45 GMT
Martin,

If you use implicit inclusion you need to collect the template
instantiations via the prelink step (-qmkshrobj). 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.

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