Boost logo

Boost Testing :

From: David Abrahams (dave_at_[hidden])
Date: 2007-03-26 11:14:47


on Sun Mar 25 2007, "Caleb Epstein" <caleb.epstein-AT-gmail.com> wrote:

> Would it not make more sense to ask Python itself what libraries it
> needs, rather than having this encoded in the Jamfiles? It looks to
> me like this might work:
>
> #!/usr/bin/env python
> from distutils import sysconfig
> print sysconfig.get_config_vars()['LIBS']
>
> This outputs:
>
> -lresolv -lsocket -lnsl -lrt -ldl
>
> on my platform (SunOS moma 5.10 Generic_Patch_118844-30 i86pc i386 i86pc)

Another potential issue with this approach is that it enumerates the
libraries required when building with the same compiler that was used
to build Python, which isn't always the case. As you can see by
inspecting python.jam, we have developed (through experience, I
suppose) some idea that which system libraries are required should be
based on the toolset.

I don't really understand any of it, frankly. On my linux systems,
distutils.sysconfig reports that -lutil is required. The logic in
python.jam says it's only required for gcc. However, the conditional
libraries were failing, which is why you were seeing that error on
SunOS, so -lutil was never getting added, with gcc or otherwise, and
all tests were passing. Go figure.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-testing list run by mbergal at meta-comm.com