Boost logo

Boost-Build :

Subject: Re: [Boost-build] Problem with pragma intrinsic(_InterlockedCompareExchange)
From: Adam Beneschan (adambeneschan_at_[hidden])
Date: 2014-08-19 21:08:27


Thank you all for your help. I actually wasn't aware that there were two
separate MinGW products out there. In fact, I think I downloaded
mingw-w64, did some things wrong during installation, decided to start
over, and somehow did a different Google search and found the mingw.org
one. Based on that and on the opinions here that mingw.org is broken, I
think I'll just go back and start over.

> Note that this is the list for questions about the build system itself, not
the Boost that happens to be built by it.

I thought this *was* a build problem, since the build produced object files
with the wrong symbols in it. I'm not sure where the dividing line is, but
if I run into further problems I'll try one of the other mailing lists.

Thanks again,
Adam

On Tue, Aug 19, 2014 at 10:26 AM, Lars Viklund <zao_at_[hidden]> wrote:

> On Mon, Aug 18, 2014 at 09:44:55PM -0700, Adam Beneschan wrote:
> > I'm not an old hand at building Boost (I did install 1.55 on a different
> > machine), so sorry if this is a trivial question.
> >
> > I'm trying to build 1.56 on a Windows 8 system, using mingw and gcc.
> >
> > ./boost/thread/win32/thread_primitives.hpp:180:0: warning: ignoring
> #pragma
> > intrinsic [-Wunknown-pragmas]
> > #pragma intrinsic(_InterlockedCompareExchange)
> >
> > I can't link any program that needs -lboost_thread; it complains about
> > undefined references to _InterlockedCompareExchange.
> >
> > Is this just a matter of adding __stdcall to the declaration of
> > _InterlockedCompareExchange in thread_primitives.hpp, or is a different
> fix
> > needed?
>
> No, that's not the correct root cause or fix. I also barked upon the
> wrong tree about it.
>
> See Niall's diagnosis over on the boost-users list:
> http://thread.gmane.org/gmane.comp.lib.boost.user/82316/focus=82347
>
> The problem is known and fixed in trunk, and was not considered a
> showstopper when it was detected very late in the 1.56 release cycle.
>
> The commit range that fixes the problem is:
>
> https://github.com/boostorg/thread/commit/26042ca26a9783c9055a40ada6b8bb26d3dd65b6#diff-d41d8cd98f00b204e9800998ecf8427e
>
> > Assuming I either fix the source myself or get a patch, how would I
> rebuild
> > without rebuilding all of Boost from scratch? Sorry if this seems like a
> > dumb question, but so far I've just followed instructions without really
> > knowing anything about b2, and I'm hoping not to have to do another
> > four-and-a-half-hour build.
>
> As mentioned, builds of Boost are incremental unless you go and
> obliterate previous artifacts.
>
> Note that this is the list for questions about the build system itself,
> not the Boost that happens to be built by it. You probably want boost@
> (for questions about the development of Boost itself), or boost-users@
> (for questions about the use of Boost as an end-developer).
>
> --
> Lars Viklund | zao_at_[hidden]
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>



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