471,071 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

shared library disaster

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
2 1395
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
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.

Similar topics

7 posts views Thread by akennis | last post: by
5 posts views Thread by David T. Ashley | last post: by
3 posts views Thread by S S | last post: by
3 posts views Thread by ankugoe7 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.