By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,436 Members | 1,344 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,436 IT Pros & Developers. It's quick & easy.

shared library disaster

P: n/a
Hi,

I work on a big project that consists of many small linux C++ CGI
binaries. This actually works fine but our problem is that we use many
..so libraries and we need to compile it separately for many different
linux distributions and versions and even architectures. I actually want
one compiled version that works everywhere.

One idea is to store all used .so libraries of the compiling system in a
seperate directory, install that directory on other systems and use
rpath
(http://godi.ocaml-programming.de/pro..._libraries.txt) to
make ld to search in this directory first.

This works fine with a few libraries but I could not manage to do this
for our big list of libraries e.g. ImageMagick that uses 10 more other
libraries.

Another idea is to compile all libraries static into one big shared
library and just link this shared one. Seems like the linker / ld can
not do such a mix of static and shared? Compiling all small CGI binaries
static would take too much disc space I think.

Any other ideas / suggestions?

Thanks

May 28 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 28 May, 11:44, Tobias Bergmann <t...@tobipage.dewrote:
Hi,

I work on a big project that consists of many small linux C++ CGI
binaries. This actually works fine but our problem is that we use many
.so libraries and we need to compile it separately for many different
linux distributions and versions and even architectures. I actually want
one compiled version that works everywhere.

One idea is to store all used .so libraries of the compiling system in a
seperate directory, install that directory on other systems and use
rpath
(http://godi.ocaml-programming.de/pro..._libraries.txt) to
make ld to search in this directory first.

This works fine with a few libraries but I could not manage to do this
for our big list of libraries e.g. ImageMagick that uses 10 more other
libraries.

Another idea is to compile all libraries static into one big shared
library and just link this shared one. Seems like the linker / ld can
not do such a mix of static and shared? Compiling all small CGI binaries
static would take too much disc space I think.

Any other ideas / suggestions?
This isn't a C++ language question, it's a question about the tools
you are using so it's off-topic here. So the best suggestion is to ask
in a forum full of people who are familiar with those tools and how to
use them on your OS, as they should be able to help you. The FAQ has
suggestions that may be useful:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Gavin Deane

May 28 '07 #2

P: n/a
Tobias Bergmann wrote:
Hi,

I work on a big project that consists of many small linux C++ CGI
binaries. This actually works fine but our problem is that we use many
.so libraries and we need to compile it separately for many different
linux distributions and versions and even architectures. I actually want
one compiled version that works everywhere.

One idea is to store all used .so libraries of the compiling system in a
seperate directory, install that directory on other systems and use
rpath
(http://godi.ocaml-programming.de/pro..._libraries.txt) to
make ld to search in this directory first.

This works fine with a few libraries but I could not manage to do this
for our big list of libraries e.g. ImageMagick that uses 10 more other
libraries.

Another idea is to compile all libraries static into one big shared
library and just link this shared one. Seems like the linker / ld can
not do such a mix of static and shared?
Depends on whether you made your static libraries position independant.

May 28 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.