incubator-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 02:12:52 GMT
Martin Sebor wrote:
> Nicole Willson wrote:
> 
>> If they are in the std64rd (my build type label) directories or even 
>> in the
>> ch13n dirs, they are blown away.  Besides I had it working in this 
>> buildtype
>> already.  The problems came back when I did a clean build.
> 
> 
> Well, there's something screwy going on with the compiler. I have
> a clean build with gcc but XLC++ chokes on the very first file,
> assert.cpp. It gives an error in _G_config.h for __mbstate_t:
> 
> "/usr/include/_G_config.h", line 29.15: 1540-0040 (S) The text "__state" 
> is unexpected.  "__mbstate_t" may be undeclared or ambiguous.
> 
> I need to get past this first.

Okay, I see what's going on. It was the stupid -F $VACCFG option
we use to allow multiple versions of the same compiler on the same
machine (I'm told we need it to get around an IBM bug in their
support for this apparently "unsupported" feature of XLC).

I put it in makefile.in as CXX=xlC -F $(VACCFG) but the file gets
processed by GNUmakefile.cfg and the output is used as a shell
script (vars.sh) to pass compiler and linker options to the
libc_decl.sh config test. But because the $(VACCFG) syntax is
not valid in the shell the test ends up with just -F (and no
config file) and all the little libc tests that the script does
end up failing. One of them is a test for the stdarg.h header.
Since we "replace" the C++ libc headers with our own in which
we #include the C versions (don't ask why) but if they are known
to exist, everything breaks. This needs to be fixed in the
makefile but that's another story.

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.

Here's an example of the warning:

"/build/sebor/dev/stdlib/include/rw/_ioinsert.h", line 131.27: 1540-0092 
(W) The explicit instantiation of 
"std::basic_ostream<char,std::char_traits<char> > 
&__rw::__rw_insert<char,std::char_traits<char>,double>(std::basic_ostream<char,std::char_traits<char>

 > &, double)" was ignored because the function definition was not found.

Martin

Mime
View raw message