Building epics-base fails on musl based systems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
I am trying to build EPICS base 7.0.4 inside a docker container based on alpine linux, which uses musl in place of glibc.
The build options used are CXXFLAGS=
The build fails because the "backtrace" function does not exist in musl:
/usr/bin/g++ -o iocLogServer -L/EPICS/
/usr/lib/
collect2: error: ld returned 1 exit status
Looking into epics-base/
However, it would be better to detect the presence of backtrace() by testing the existence of __GLIBC__ or __GNU_LIBRARY__, or, alternatively, to provide the user with the possibility of disabling backtrace support.
summary: |
- Building epics-case fails on musl based systems + Building epics-base fails on musl based systems |
description: | updated |
The "posix" code in Base supports more than just Linux with glibc, uclibc, or perhaps musl. It also includes the c libraries from Apple, freebsd, and (at least for the moment) solaris. All of these provide the backtrace() function. So it is easier to express uclibc as the exception.
Still, I think it would be acceptable if someone were motivated to figure out all of the relevant macros, and do the testing. Perhaps aided by:
https:/ /sourceforge. net/p/predef/ wiki/Home/
Personally. I looked into musl recently and was disappointed by the deliberate omission of identifying macros (eg. __MUSL__). It strikes me as presumptuous for a new entrant to demand a rewrite and retest of existing compatibility logic as a price of entry. Maybe it would be better to use uclibc instead of musl?
https:/ /wiki.musl- libc.org/ faq.html# Q:-Why- is-there- no-%3Ccode% 3E__MUSL_ _%3C/code% 3E-macro?