So, I have a binary software built on SUSE 10 (SLES). Somewhere I found
that SUSE 10 is LSB 3.0 compatible.
So is RHEL 4/Centos 4, according to some webpage.
So I expected that the software built on SUSE 10 would also run on Centos
4. It didn't, it was expecting a symbol not present on Centos 4.
That symbol came from libstdc++, something in std::string, and it was
referenced by log4cplus. So I actually expected that log4cplus wouldn't
compile on Centos4, since there that symbol was missing, but it compiled
What was the reason ?
std::string has a lot of inline-functions, which call more or less
internal functions of libstdc++. Since they are inline, these calls to
internal functions end up in the resulting binary, instead of being
hidden in the binary libstdc++.
So what to do if you want to ship a binary application ?
Not sure. Link statically against libstdc++ ? Not too easy, as the web
Ship with a copy of libstdc++.so which works ? I tried, it seems to work.
But I'm not sure whether this doesn't have any other issues.
Use some other STL implementation, like STLport or stdcxx from Apache ?
Maybe, haven't tried yet.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds