[atomic] building with --layout=system, mingw, bug #7482

hi, i need some help with resolving issue #7482: for some reason it seems to build a static libboost_atomic, although it has to be a shared library. could someone with more insights in this platform have a look, what's going wrong (and why the library is static)? unfortunately i neither have access to mingw, nor am i too familiar with the boost build infrastructure ... thanks, tim

On Fri, Jan 4, 2013 at 2:20 AM, Tim Blechmann <tim@klingt.org> wrote:
hi,
i need some help with resolving issue #7482: for some reason it seems to build a static libboost_atomic, although it has to be a shared library.
It can be built either way, depending on what the user requests.
could someone with more insights in this platform have a look, what's going wrong (and why the library is static)? unfortunately i neither have access to mingw, nor am i too familiar with the boost build infrastructure ...
I tried building the current release with these flags and successfully compiled the following libs: libboost_atomic-mt.a libboost_atomic-mt-d.a along with other static boost libs. I suppose, by default bjam builds static libs on mingw; you have to specify link=shared to build dlls (this also worked for me). I did some fixes to atomic jamfile in revision 81834, perhaps those fixes resolved the problem in the ticket. Or I just failed to reproduce the problem.

hi andrey,
i need some help with resolving issue #7482: for some reason it seems to build a static libboost_atomic, although it has to be a shared library. It can be built either way, depending on what the user requests.
well, it *can* be built as static library, but the library should be shared to ensure that the same spinlock pool is used if multiple libraries link to libboost_atomic. otherwise the blocking emulation of atomics is not correct, if the same atomic<> object is accessed from different shared libraries ... cheers, tim

Hi Tim, -------- Original-Nachricht --------
Datum: Thu, 03 Jan 2013 23:20:05 +0100 Von: Tim Blechmann <tim@klingt.org> An: boost@lists.boost.org Betreff: [boost] [atomic] building with --layout=system, mingw, bug #7482
hi,
i need some help with resolving issue #7482: for some reason it seems to build a static libboost_atomic, although it has to be a shared library.
Well, static build is default in windows. But link=shared works.
could someone with more insights in this platform have a look, what's going wrong (and why the library is static)? unfortunately i neither have access to mingw, nor am i too familiar with the boost build infrastructure ...
This is not a Boost.Atomic issue. The problem is that --layout=system is broken on Windows. Rationale: Boost.Build (in $BOOST_ROOT/boostcpp.jam) defaults to build both release and debug variants of each library on Windows. Requiring system layout ends up with the _same_ name for the release and debug libraries on Windows. This happens for msvc too. This triggers the error reported in #7482. Explicitly specifying "--layout=system release" or "--layout=system debug" will make the problem go away. I'm not sure how/if this problem can be intercepted in boostcpp.jam You should be able to reproduce this on Linux by requesting both debug and release variants with "--layout=system debug,release". Hope this helps, Yours Jürgen -- * Dipl.-Math. Jürgen Hunold ! juergen.hunold@gmx.eu * voice: 0049 4257 300 ! Fährstraße 1 * fax : 0049 4257 300 ! 31609 Balge/Sebbenhausen * mobil: 0049 178 186 1566 ! Germany
participants (3)
-
"Jürgen Hunold"
-
Andrey Semashev
-
Tim Blechmann