On Fri, Jun 21, 2013 at 10:14 AM, Robert Goley <rago...@rdasys.com> wrote:

> The only issue with the libexpat dependency is that it depends on a
> symbolic link that does not exist on debian/ubuntu based systems.  It
> depends on libexpat.so.0 and debian/ubuntu start naming them at .so.1.
>  That is the reason for creating the extra symbolic link and running
> ldconfig in the packing.  It works great once it is in place.
> Forcing the use of the static libs is a bit annoying.  The simplest hack I
> have seen is to add a subdirectory of the project to the library path early
> in the path  with -L and then create symbolic links from the static libs to
> the lib

I tried that and it broke some other parts of the build (most notably the
x-server module), but that was with the whole xorg build tree.  maybe I can
be more selective with the libraries that I add...

> subdirectory.  Then, the first library found wins.  It is annoying the
> both gcc and clang don't have a better way to specify it for specific libs
> only...

>From what I've read, adding "-Wl,Bstatic -lexpat -Wl,Bdynamic" to CFLAGS
should do just that (tell the linker to link against the static version of
libexpat and dynamic libraries for others), but it seems that then
-Bdynamic overrides any static libraries that were compiled as a part of
the build(?).  What would really be nice is some way to specify a default
behavior of "use static libraries whenever you can and fall back to shared
libraries otherwise" to the linker.
This SF.net email is sponsored by Windows:

Build for Windows Store.

Tigervnc-devel mailing list

Reply via email to