[xsd-users] Specifying location of boost when building from all-in-one package

Boris Kolpackov boris at codesynthesis.com
Fri Jan 25 08:31:39 EST 2013


Hi Charles,

Charles Grant <cegrant at uw.edu> writes:

> I did 'make clean' between builds. Is that sufficient?

Yes, that should be sufficient.


> The libraries are there.
> 
> [...]/libboost_filesystem.a@
> 
>
> It really looks like the XSD build is checking some standard library
> locations before it checks the ones in the LDFLAGS. 

Ok, I think I know what's going on here. GNU make 3.81 and earlier has
broken library search path order in that it would first search in all
the directories (both user-supplied and system) for .so and then for
.a. This is in contrast to how ld works. That is, it examines each
directory first for .so and then for .a.

If you are using make 3.81, then this would explain why the build
system picks up libboost_filesystem.so from /usr/lib instead of
libboost_filesystem.a from your custom directory.

There are two ways to fix this:

1. I've fixed the broken search order in make 3.82 so if you can
   upgrade, then that should fix your problem.

2. If you cannot upgrade, then the only way  I can see to work around
   this (other than modifying the makefiles) is to disable search for
   shared libraries altogether:

   make .LIBPATTERNS=lib%.a

   Note that in this case Xerces-C++ will also have to be built as
   a static library. You may also have to add some extra libraries
   (e.g., -lpthread) with the LIBS variable.

Boris



More information about the xsd-users mailing list