Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-14 09:35:25


Vladimir Prus <ghost_at_[hidden]> writes:

> I've brought back to life two tests that were broken by
> Dave's recent commit. Dave, can you see if all tests
> pass for you?

Something is still not working out:

gcc.link-dll bin/gcc/debug/shared-true/main-target-getting_started1/getting_started1.dll
../build/bin/gcc/debug/shared-true/main-target-boost_python/boost_python.so(.text+0x0):fake: multiple definition of `___do_frame_init'
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/crtbegin.o(.text+0x0): first defined here
../build/bin/gcc/debug/shared-true/main-target-boost_python/boost_python.so(.text+0x30):fake: multiple definition of `___do_frame_fini'
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/crtbegin.o(.text+0x30): first defined here
../build/bin/gcc/debug/shared-true/main-target-boost_python/boost_python.so(.text+0x1db20): In function `_ZN5boost6python9type_infoC1ERKSt9type_info':
/cygdrive/c/boost/libs/python/example/../../../boost/python/type_id.hpp:92: multiple definition of `boost::python::type_info::type_info[in-charge](std::type_info const&)'
bin/gcc/debug/shared-true/main-target-getting_started1/getting_started1.o(.text$_ZN5boost6python9type_infoC1ERKSt9type_info+0x0):/cygdrive/c/boost/libs/python/example/../../../boost/python/type_id.hpp: first defined here
../build/bin/gcc/debug/shared-true/main-target-boost_python/boost_python.so(.text+0x183a8): In function `_ZN5boost6python3api6objectD1Ev':
/cygdrive/c/boost/libs/python/example/../src/object/iterator.cpp: multiple definition of `boost::python::api::object::~object [in-charge]()'
...

I'm not sure why this should be happening. Didn't I test the basic
scheme for Cygwin earlier, and show that it was working?

These are functions which should have "weak linkage" (i.e. inlines) so
that definition in multiple translation units is not a problem.

I'd hate to have to start using import libraries with Cygwin... not
that I even understand how to modify Boost.Build to account for those
yet.

Ugh... OK, looking at "man ld" on Cygwin, it says:

The i386 PE linker supports the -shared option, which
causes the output to be a dynamically linked library (DLL)
instead of a normal executable. You should name the
output *.dll when you use this option. ...

And when I shift back to the following in builtin.jam,

declare-type NT CYGWIN : SHARED_LIB : dll : LIB : main ;

Everything works.

This is a real shame, because I think people expect cygwin dynamic
libraries to end with .so. However, it really seems as though Cygwin
isn't set up to allow that. In fact, I don't see any .so files in my
entire Cygwin tree... so addressing this whole thing may have been
premature.

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

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