On Fri, Jun 21, 2013 at 10:52 AM, Brian Hinz
<bph...@users.sourceforge.net>wrote:

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

I found I had to be selective when I did it as well. I have found some
libraries don't link properly when using the static version but will work
perfectly with the shared library.


>
>> 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.
>
>
That is exactly what I was referring to.  Supposedly, the options you gave
should do what we want.  I have never seen it work.  It behaves as if it is
all static or nothing is.  I might be missing something but hacks and
workarounds are all I have found that will allow forcing the static version
when both a static and shared version of the same library are on the system.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to