Mercury Bugs - mercury
View Issue Details
0000398mercuryBugpublic2015-12-09 16:002016-09-28 16:04
Reporterjuliensf 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000398: mercury_compile.exe fails to link on Cygwin64 / MinGW64 with GCC 4.9.X
DescriptionBuilding the compiler on Cygwin64 and some versions of MinGW64 results in the compiler executable failing to link. The error is as follows:

top_level_init.o:top_level_init.c:(.rdata$.refptr._bss_start__[.refptr._bss_start__]+0x0): undefined reference to `_bss_start__'
top_level_init.o:top_level_init.c:(.rdata$.refptr._data_start__[.refptr._data_start__]+0x0):
undefined reference to `_data_start__'
top_level_init.o:top_level_init.c:(.rdata$.refptr._bss_end__[.refptr._bss_end__]+0x0):
undefined reference to `_bss_end__'
top_level_init.o:top_level_init.c:(.rdata$.refptr._data_end__[.refptr._data_end__]+0x0):
undefined reference to `_data_end__'
Additional InformationThis as reported on the users list at <http://www.mercurylang.org/list-archives/developers/2015-November/016491.html>. I have noticed it myself on Cygwin64 (using Cygwin GCC 4.9.3 and binutils 2.25). Ian has reported it as occurring with MSYS2/MinGW64 GCC 4.9.2 and binutils 2.25. Using MSYS2/MinGW64 GCC 5.2 does work (on my machine), so it may be that there is a problem with GCC 4.9.X on 64-bit Windows. (I haven't tried GCC 5 on Cygwin64 yet as it would need to be built from source.)
TagsNo tags attached.
Attached Files

Notes
(0000902)
juliensf   
2016-08-16 14:13   
The same issue occurs with GCC 5.4.0 on 64-bit Cygwin.
(0000903)
juliensf   
2016-08-17 09:22   
The issue has been fixed in Boehm upstream.
<https://github.com/ivmai/bdwgc/commit/4e24d219d29abb2b111bb9a9ccb13c3f149a855a>
We will need to backport that change (or upgrade our version of the collector).
(0000920)
juliensf   
2016-09-28 16:03   
(Last edited: 2016-09-28 16:04)
This has been resolved by upgrading the Boehm GC to version 7.6. I have tested it with rotd 2016-09-27.


Issue History
2015-12-09 16:00juliensfNew Issue
2016-08-16 14:13juliensfNote Added: 0000902
2016-08-17 09:22juliensfNote Added: 0000903
2016-09-28 16:03juliensfAssigned To => juliensf
2016-09-28 16:03juliensfStatusnew => resolved
2016-09-28 16:03juliensfResolutionopen => fixed
2016-09-28 16:03juliensfNote Added: 0000920
2016-09-28 16:04juliensfNote Edited: 0000920bug_revision_view_page.php?bugnote_id=920#r46