linux-headers and musl-dev conflict for mman.h and types.h
There is conflict between linux-headers and musl-dev for mman.h and types.h
On Alpine Edge (3.6.3 / Linux version 4.9.32-0-hardened) I have built
Openshift Origin from source.
First my build failed with “implicit declaration of function ‘mmap’” which I worked around by removing both musl-dev and linux-headers and then adding linux-headers and then musl-dev. Then I continued the build and it hit “unknown type name ‘__u16’”. I then removed the packages again and added first musl-dev and then linux-headers and continued the build. The in which these includes are added makes a huge difference.
When I install linux-headers when musl-dev is not installed, it failed
to create 62 files
apk add linux-headers
(1/1) Installing linux-headers (4.4.6-r2)
ERROR: Failed to create usr/include/asm/byteorder.h: No such file or directory
ERROR: Failed to create usr/include/asm/posix_types.h: No such file or directory
ERROR: Failed to create usr/include/asm/mman.h: No such file or directory
I have the feeling that this is a friction between the Linux Kernel ABI and MUSL. It’s not life threatening or anything and I don’t think it’s simple to fix, but it would be nice to hear your opinion and register this as a known issue.
(from redmine: issue id 7453, created on 2017-06-27, closed on 2017-06-27)