Public bug reported:
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="-DIPPORT_USERRESERVED=5000 -fPIC".
The build fails because the "backtrace" function does not exist in musl:
/usr/bin/g++ -o iocLogServer -L/EPICS/base/lib/linux-x86_64 -Wl,-rpath,/EPICS/base/lib/linux-x86_64 -rdynamic -m64 iocLogServer.o -lCom
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /EPICS/base/lib/linux-x86_64/libCom.so: undefined reference to `backtrace'
collect2: error: ld returned 1 exit status
Looking into epics-
base/modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp, which is
the only file using that function, I was in the end able to successfully
build EPICS by adding "-D__UCLIBC_MAJOR__=0" to the build options.
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.
** Affects: epics-base
Importance: Undecided
Status: New
** Summary changed:
- Building epics-case fails on musl based systems
+ Building epics-base fails on musl based systems
** Description changed:
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="-DIPPORT_USERRESERVED=5000 -fPIC".
The build fails because the "backtrace" function does not exist in musl:
- /usr/bin/g++ -o iocLogServer -L/EPICS/base/lib/linux-x86_64 -Wl,-rpath,/EPICS/base/lib/linux-x86_64 -rdynamic -m64 iocLogServer.o -lCom
+ /usr/bin/g++ -o iocLogServer -L/EPICS/base/lib/linux-x86_64 -Wl,-rpath,/EPICS/base/lib/linux-x86_64 -rdynamic -m64 iocLogServer.o -lCom
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /EPICS/base/lib/linux-x86_64/libCom.so: undefined reference to `backtrace'
collect2: error: ld returned 1 exit status
Looking into epics-
base/modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp, which is
the only file using that function, I was in the end able to successfully
build EPICS by adding "-D__UCLIBC_MAJOR__=0" to the build options.
However, it would be better to detect the presence of backtrace() by
- testing the existence of __GLIBC__, or, alternatively, to provide the
- user with the possibility of disabling backtrace support.
+ testing the existence of __GLIBC__ or __GNU_LIBRARY__, or,
+ alternatively, to provide the user with the possibility of disabling
+ backtrace support.
--
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1892190
Title:
Building epics-base fails on musl based systems
Status in EPICS Base:
New
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="-DIPPORT_USERRESERVED=5000
-fPIC".
The build fails because the "backtrace" function does not exist in
musl:
/usr/bin/g++ -o iocLogServer -L/EPICS/base/lib/linux-x86_64 -Wl,-rpath,/EPICS/base/lib/linux-x86_64 -rdynamic -m64 iocLogServer.o -lCom
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: /EPICS/base/lib/linux-x86_64/libCom.so: undefined reference to `backtrace'
collect2: error: ld returned 1 exit status
Looking into epics-
base/modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp, which
is the only file using that function, I was in the end able to
successfully build EPICS by adding "-D__UCLIBC_MAJOR__=0" to the build
options.
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1892190/+subscriptions
- Replies:
- [Bug 1892190] Re: Building epics-base fails on musl based systems mdavidsaver via Core-talk
- [Bug 1892190] Re: Building epics-base fails on musl based systems J. Lewis Muir via Core-talk
- [Bug 1892190] Re: Building epics-base fails on musl based systems Andrew Johnson via Core-talk
- [Bug 1892190] Re: Building epics-base fails on musl based systems mdavidsaver via Core-talk
- [Bug 1892190] Re: Building epics-base fails on musl based systems Sébastien Wertz via Core-talk
- Navigate by Date:
- Prev:
Re: Possible bug in convertRelease.pl Johnson, Andrew N. via Core-talk
- Next:
epics-pva2pva-linux32 - Build # 191 - Unstable! APS Jenkins via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: getVersionHelper.pl ignore -V option Johnson, Andrew N. via Core-talk
- Next:
[Bug 1892190] Re: Building epics-base fails on musl based systems mdavidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|