This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: ios_base vanishing from shared objects
On Sat, Mar 17, 2001 at 05:24:18PM +0100, Peter Schmid wrote:
> I assume, that missing ios_base symbols
> in the dynamic library are detected as additional failures when
> running the testsuite;
You assume correctly. The link fails with undefined references.
Since everything is present in the .a library, the static builds are passing.
> What symbols are missing in your copy of the dynamic library?
Just about all of them. Not just ios_base.
% grep 'undefined reference' 20010318-mkchecklog.txt | sort | uniq
/home/pme/build/install-2001-03-18-i686/include/g++-v3/bits/basic_ios.h:151: undefined reference to
`std::ios_base::imbue(std::locale const&)'
/home/pme/build/install-2001-03-18-i686/include/g++-v3/bits/basic_ios.h:151: undefined reference to
`std::locale::locale()'
/home/pme/build/install-2001-03-18-i686/include/g++-v3/bits/basic_ios.tcc:130: undefined reference to
`std::ios_base::badbit'
/home/pme/build/install-2001-03-18-i686/include/g++-v3/bits/basic_ios.tcc:130: undefined reference to
`std::ios_base::goodbit'
/home/pme/build/install-2001-03-18-i686/include/g++-v3/bits/basic_ios.tcc:130: undefined reference to
`std::ios_base::_M_dispose_callbacks()'
/home/pme/build/install-2001-03-18-i686/include/g++-v3/bits/basic_ios.tcc:130: undefined reference to
`std::locale::~locale()'
Another 792 lines/symbols follow. I'm pleased at least that the linker is
generating file:line messages (and yes, I've verified that it is the linker).
> Maybe this is a binutils related problem?
I thought so at first -- after all, the compiler itself doesn't link up
all the .o's into a .so, the linker does. But then I took a closer look
at what libtool was doing.
(paraphrasing the lines here) It's turning
libtool xgcc libmath.la libsupc++convenience.la ios.lo ...all the
other src .lo files... -o libstdc++.la
into
xgcc -whole-archive libmath.a libsupc++convenience.a
-no-whole-archive -shared -o libstdc++.so
Notice something missing? Like, all of the .lo files from the build?
The only symbols appearing in libstdc++.so.3.0.0, both the one in .libs
and the one installed in prefix/lib, are the ones in libsupc++. I can't
even find any libmath symbols in there, and that also bothers me.
The investigation continues... I did find some leading spaces in certain
places in src/Makefile.am, but nothing that should cause this. All the
rules are firing okay; it's just the .o files vanishing from the command.
Of course, I never rule out the possibility of local screwups.
Phil
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.