Mercury Bugs - mercury
View Issue Details
0000434mercuryBugpublic2017-03-29 09:552018-01-09 10:42
Assigned Towangp 
Platformx86_64-pc-linux-gnuOSAlpine LinuxOS Version3.5
Product Version 
Target VersionFixed in Version 
Summary0000434: Alpine Linux / musl libc / x86_64 support
DescriptionInstalling rotd-2017-03-28 from the source distribution on Alpine Linux (x86_64-pc-linux-gnu) results in a successful install, but the executables (e.g. hello world) generated by the compiler abort with:

    GC_is_visible test failed

This seems to be occurring in every grade.
TagsNo tags attached.
Attached Files

2017-03-30 18:46   
I can confirm the same issue on VoidLinux for amd64, using musl.

A possible clue to the issue is that using "--linkage static --mercury-linkage static" produces working executables.
2017-06-25 11:32   

- upstream bdwgc has the necessary changes for musl (including parallel marking)

- need to compile bdwgc with -DNO_GETCONTEXT -DHAVE_DL_ITERATE_PHDR

- there is some other difference between the autotools-based buid and the build. Mercury programs would crash when linked with libgc.{a,so} produced by, but would run correctly when linked with the libgc produced by the autotools-generated makefile.

- thread.spawn/spawn_native will need to set a reasonable stack size as musl gives threads something like 80 kB by default. We should also allow the user to choose a stack size when creating a thread.
2018-01-09 10:42   
Fixed as of commit 323bad9ff

Issue History
2017-03-29 09:55juliensfNew Issue
2017-03-30 18:46FlyingJesterNote Added: 0000945
2017-06-25 11:32wangpNote Added: 0000955
2018-01-09 10:42wangpAssigned To => wangp
2018-01-09 10:42wangpStatusnew => resolved
2018-01-09 10:42wangpResolutionopen => fixed
2018-01-09 10:42wangpNote Added: 0000959