User: Password:
|
|
Subscribe / Log in / New account

Applications and bundled libraries in the Ideal World (LSB)

Applications and bundled libraries in the Ideal World (LSB)

Posted Mar 18, 2010 21:07 UTC (Thu) by aleXXX (subscriber, #2742)
In reply to: Applications and bundled libraries in the Ideal World (LSB) by vomlehn
Parent article: Applications and bundled libraries

Last week I tried to rely on LSB 3.0 and it didn't work.
Maybe I did it wrong or I had wrong expectations.

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
nevertheless successfully.

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
told me.
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.

Alex


(Log in to post comments)

Applications and bundled libraries in the Ideal World (LSB)

Posted Mar 18, 2010 22:14 UTC (Thu) by dlang (subscriber, #313) [Link]

look at what LSB defines. it only defines a very small portion of the system.

if the application only uses the things that are defined by LSB, then it would work on either distro.

but if the application uses things that are outside the scope of the LSB, then it may not work.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds