Boost logo

Boost-Build :

Subject: [Boost-build] how to remove auto added, exports files for shared libs ?
From: Avi Bahra (avibahra_at_[hidden])
Date: 2010-09-07 04:17:31


I am trying to fix an issue that is specific to AIX.
In my case I know the fix, but don't know how to change jamfile's
to remove a automatically added exports file.

Using boost 1.43, python2.5 64 bit, new acc compiler v11.1
Everything links and runs ok, but I end up having
*hundreds* of warnings about duplicate symbols,
when building. i.e of the type:

ld: 0711-224 WARNING: Duplicate symbol: PyUnicodeUCS2_AsWideChar
ld: 0711-224 WARNING: Duplicate symbol: PyUnicodeUCS2_
FromEncodedObject
ld: 0711-224 WARNING: Duplicate symbol: PyWeakref_NewRef
ld: 0711-224 WARNING: Duplicate symbol: Py_InitModule4_64
ld: 0711-224 WARNING: Duplicate symbol: _PyObject_New
ld: 0711-224 WARNING: Duplicate symbol: _PyType_Lookup

 The problem can be reproduced with an example in the boost installation:
  boost_1_43_0/libs/python/example/quickstart

bjam -d2: gives:

xlC_r -brtl -bnoipath -g -qfullpath -o
"bin/vacpp/debug/threading-multi/embedding" -L/usr/local/python64/lib
-L/usr/local/python64/lib/python2.5/config
"bin/vacpp/debug/threading-multi/embedding.o"
"../../../../bin.v2/libs/python/build/vacpp/debug/threading-multi/libboost_python.so"
  -lpython2.5 -lpthread -ldl
-Wl,-bI:/usr/local/python64/lib/python2.5/config/python.exp

The symbol duplication is caused by linking with:
 -Wl,-bI:/usr/local/python64/lib/python2.5/config/python.exp
since the symbols have already been defined in -lpython2.5.a

When the file(python.exp) is removed from the link line,
no more duplicate symbols and test still runs ok.

I suspect the same issue exists with boost 1.44. Its not clear
if this is only a problem for python2.5. By I need this fix, to
avoid my users, from seeing the duplicate symbol warnings.

My only issue is, how can I remove the automatic
addition of python.exp exports file from the link line ?

Any help appreciated.

   Best regards,
Ta,
    Avi


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk