Bug 1010470 - InterlockedCompareExchange
Product: Fedora
Classification: Fedora
Component: mingw-boost (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Thomas Sailer
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-20 16:32 EDT by Joel
Modified: 2013-09-29 20:46 EDT (History)
4 users (show)

See Also:
Fixed In Version: mingw-boost-1.53.0-2.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-29 20:46:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
makefile to build attached program (417 bytes, text/plain)
2013-09-20 16:32 EDT, Joel
no flags Details
test program exhibiting problem (169 bytes, text/x-c++src)
2013-09-20 16:33 EDT, Joel
no flags Details

  None (edit)
Description Joel 2013-09-20 16:32:39 EDT
Created attachment 800706 [details]
makefile to build attached program

With Fedora 19 when linking against boost_filesystem one gets these errors:

boost_filemapper.o: In function `interlocked_compare_exchange':
/usr/x86_64-w64-mingw32/sys-root/mingw/include/boost/interprocess/detail/win32_api.hpp:1192: undefined reference to `InterlockedCompareExchange'
/usr/x86_64-w64-mingw32/sys-root/mingw/include/boost/interprocess/detail/win32_api.hpp:1192: undefined reference to `InterlockedCompareExchange'
boost_filemapper.o: In function `interlocked_increment':
/usr/x86_64-w64-mingw32/sys-root/mingw/include/boost/interprocess/detail/win32_api.hpp:1186: undefined reference to `InterlockedIncrement'
/usr/x86_64-w64-mingw32/sys-root/mingw/include/boost/interprocess/detail/win32_api.hpp:1186: undefined reference to `InterlockedIncrement'
collect2: error: ld returned 1 exit status
make[3]: *** [hashdb_manager.exe] Error 1

This seems related to 



Comment 1 Joel 2013-09-20 16:33:12 EDT
Created attachment 800707 [details]
test program exhibiting problem
Comment 2 Erik van Pienbroek 2013-09-20 17:45:18 EDT
What version of mingw64-headers and mingw64-crt do you have installed?
Comment 3 Joel 2013-09-20 19:06:41 EDT
adding #define BOOST_USE_WINDOWS_H before the boost #includes fixed the problem in our code.

Versions are 2.0.999-0.30.trunk.r5969.20130721.fc19
Comment 4 Erik van Pienbroek 2013-09-20 19:37:44 EDT
This issue was fixed in mingw-headers in the 20130721 snapshot. Apparently mingw-boost wasn't rebuilt for Fedora 19 after that

@Thomas: the fix for this bug was applied in mingw-boost 1.53.0-2, but this was only done for rawhide and f20. Are you okay if I also apply this change to f19 (just this one change, not the 1.54.0 update which you did recently in rawhide and f20) ?
Comment 5 Thomas Sailer 2013-09-20 20:36:07 EDT
Yes please. Thanks!
Comment 6 Fedora Update System 2013-09-21 08:00:42 EDT
mingw-boost-1.53.0-2.fc19 has been submitted as an update for Fedora 19.
Comment 7 Fedora Update System 2013-09-22 00:23:33 EDT
Package mingw-boost-1.53.0-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mingw-boost-1.53.0-2.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2013-09-29 20:46:19 EDT
mingw-boost-1.53.0-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.