2024-11-23 20:35 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000434mercuryBugpublic2018-01-09 10:42
Reporterjuliensf 
Assigned Towangp 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
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
    Aborted

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

-Relationships
+Relationships

-Notes

~0000945

FlyingJester (reporter)

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.

~0000955

wangp (developer)

Progress:

- 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 Makefile.direct-based build. Mercury programs would crash when linked with libgc.{a,so} produced by Makefile.direct, 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.

~0000959

wangp (developer)

Fixed as of commit 323bad9ff
+Notes

-Issue History
Date Modified Username Field Change
2017-03-29 09:55 juliensf New Issue
2017-03-30 18:46 FlyingJester Note Added: 0000945
2017-06-25 11:32 wangp Note Added: 0000955
2018-01-09 10:42 wangp Assigned To => wangp
2018-01-09 10:42 wangp Status new => resolved
2018-01-09 10:42 wangp Resolution open => fixed
2018-01-09 10:42 wangp Note Added: 0000959
+Issue History