www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14961] New: v2.067 fails to build with musl libc (on alpine


          Issue ID: 14961
           Summary: v2.067 fails to build with musl libc (on alpine linux)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: v.krishnakumar gmail.com

Created attachment 1545
  --> https://issues.dlang.org/attachment.cgi?id=1545&action=edit
small patch to fix compilation under musl libc.

when building with g++ version 4.9.2/musl libc (on alpine linux 3.2
stable), compilation fails in root/port.c -- seems to be using glibc specific

the error message is:

root/port.c:586:22: fatal error: bits/nan.h: No such file or directory
 #include <bits/nan.h>
compilation terminated.
posix.mak:391: recipe for target 'port.o' failed
make: *** [port.o] Error 1

the attached patch "fixes" these errors but not sure if it is the correct way
to go about it. It does produce a working dmd executable that prints the help

Aug 25 2015