This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cygwin GCC linking Python extensions issue


Hi,

Recently I've begun to see the following link errors when building
some of the Boost.Python test suite extension modules using Cygwin gcc
(version 2 or 3, doesn't matter) and Python 2.2.2 release or Python
2.3 debug.  This error happens only on some of the extension modules,
but all of them use the symbol boost::python::scope::current_scope
which is defined in libboost_python.dll.  Regardless, even if that's
somehow my bug, there's the matter of `__head_boost_python_dll'...

Does anyone have an explanation/workaround for this?

To reproduce, get the latest Boost CVS and the latest Cygwin installs
from any mirror.  Go to $BOOST_ROOT/libs/python/test and do 

     bjam -sTOOLS=gcc args.run

Thanks,
---

g++ -fmessage-length=0  -Wl, --export-all-symbols -Wl, --exclude-symbols, _bss_end__:
    _bss_start__:_data_end__:_data_start__ -Wl, --out-implib, c:\build\libs\python\test\bin\
    args_ext.pyd\gcc\debug-python\runtime-link-dynamic\args_ext.lib  -g -shared  -o "c:\build\
    libs\python\test\bin\args_ext.pyd\gcc\debug-python\runtime-link-dynamic\args_ext.dll"  -
    L"/usr/local/pydebug/lib/python2.3/config" -L"c:/build/libs/python/build/bin/boost_python.
    dll/gcc/debug-python/runtime-link-dynamic"   "c:\build\libs\python\test\bin\args_ext.pyd\
    gcc\debug-python\runtime-link-dynamic\args.obj"  "c:\build\libs\python\build\bin\
    boost_python.dll\gcc\debug-python\runtime-link-dynamic\boost_python.lib"  "c:\build\libs\
    python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\boost_python.lib"
    -lpython2.3.dll -lboost_python

d000000.o(.idata$2+0x0): multiple definition of `__head_boost_python_dll'
c:\build\libs\python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\
    boost_python.lib(d000000.o)(.idata$2+0x0): first defined here
d000001.o(.idata$5+0x0): multiple definition of `__imp___ZN5boost6python5scope13current_scope
    E'
c:\build\libs\python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\
    boost_python.lib(d000716.o)(.idata$5+0x0): first defined here
d000001.o(.idata$6+0x0): multiple definition of `__nm___ZN5boost6python5scope13current_scopeE'
c:\build\libs\python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\
    boost_python.lib(d000716.o)(.idata$6+0x0): first defined here
d000002.o(.idata$7+0x0): multiple definition of `_boost_python_dll_iname'
c:\build\libs\python\build\bin\boost_python.dll\gcc\debug-python\runtime-link-dynamic\
    boost_python.lib(d002399.o)(.idata$7+0x0): first defined here
Creating library file: c:\build\libs\python\test\bin\args_ext.pyd\gcc\debug-python\runtime-
    link-dynamic\args_ext.lib
Info: resolving boost::python::scope::current_scope     by linking to
    __imp___ZN5boost6python5scope13current_scopeE (auto-import)
collect2: ld returned 1 exit status


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


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]