Bug 1010470

Summary: InterlockedCompareExchange
Product: [Fedora] Fedora Reporter: Joel <jdy>
Component: mingw-boostAssignee: Thomas Sailer <fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bdallen, erik-fedora, fedora, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mingw-boost-1.53.0-2.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 00:46:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
makefile to build attached program
none
test program exhibiting problem none

Description Joel 2013-09-20 20:32:39 UTC
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 

https://lists.fedoraproject.org/pipermail/fedora-mingw/2013-June/006985.html

and 

http://sourceforge.net/mailarchive/message.php?msg_id=31189847

Comment 1 Joel 2013-09-20 20:33:12 UTC
Created attachment 800707 [details]
test program exhibiting problem

Comment 2 Erik van Pienbroek 2013-09-20 21:45:18 UTC
What version of mingw64-headers and mingw64-crt do you have installed?

Comment 3 Joel 2013-09-20 23:06:41 UTC
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 23:37:44 UTC
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-21 00:36:07 UTC
Yes please. Thanks!

Comment 6 Fedora Update System 2013-09-21 12:00:42 UTC
mingw-boost-1.53.0-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mingw-boost-1.53.0-2.fc19

Comment 7 Fedora Update System 2013-09-22 04:23:33 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2013-17347/mingw-boost-1.53.0-2.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-09-30 00:46:19 UTC
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.