Experimental Physics and Industrial Control System
On 3/30/22 10:32, Florian Feldbauer wrote:
Hey Michael,
attached is the complete output from make and the readelf command you mentioned.
From the readelf output:
[Requesting program interpreter: /usr/lib/ld.so.1]
If this file isn't present on target system, this is a sign that you are
trying to use a toolchain for a (slightly) different target. The best
thing you can do is to sort out this incompatibility.
Alternately, you could path Base to remove references to "-Wl,-Bdynamic",
which would result in a fully static executable (with the limitations
which this implies).
/usr/bin/g++ -o antelope -static -L/epics/base/lib/linux-arm -Wl,-rpath,/epics/base/lib/linux-arm -rdynamic closure.o error.o lalr.o lr0.o antelope.o mkpar.o output.o reader.o skeleton.o symtab.o verbose.o warshall.o -Wl,-Bdynamic -lpthread -lreadline -lm -lrt -ldl -lgcc
However, you may later encounter strange linker errors and/or crashes
if object code from different, somewhat incompatible, toolchains are
being linked together. So I would encourage you to investigate the
toolchain(s) first.
Cheers,
Florian
Am 30.03.2022 um 17:47 schrieb Michael Davidsaver:
On 3/30/22 07:15, Florian Feldbauer via Tech-talk wrote:
Hey all,
we use docker images to easily deploy our IOCs for our detector control system.
The images are build for amd64, arm64/aarch64 and armv7.
To reduce the size of those images, I recently switched from dynamic to static linking by adding the line
> && echo "STATIC_BUILD=YES" >> configure/CONFIG_SITE.local \
to our Dockerfile.
When compiling base7 for amd64 and aarch64 this is working just fine, but I get an error on arm/v7:
#0 189.7 Installing created executable /epics/base/bin/linux-arm/antelope
#0 190.1 /epics/base/bin/linux-arm/antelope -bparse -l -d ../flex/parse.y
#0 190.1 /usr/lib/ld.so.1: No such file or directory
#0 198.7 Expanding ../libComVersion.h@ to ../O.Common/libComVersion.h
I investigated the issue a bit closer and found the following:
root@195e454a8580:/epics/src/base# ldd /epics/base/bin/linux-arm/antelope
linux-vdso.so.1 (0x7ef10000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76e71000)
/usr/lib/ld.so.1 => /lib/ld-linux-armhf.so.3 (0x76f70000)
It looks like "STATIC_BUILD=YES" was ignored.
root@195e454a8580:/epics/src/base# ls /usr/lib/ld.so.1
ls: cannot access '/usr/lib/ld.so.1': No such file or directory
For some reason antelope gets linked against /usr/lib/ld.so.1 on armv7 but this file does not exist.
Does anyone know what causes this issue?
It would help if you could attach, or post somewhat, the complete
output of a clean 'make'.
Also the output of:
readelf -aW /epics/base/bin/linux-arm/antelope
Cheers,
Florian
- Replies:
- Re: Static Build on armv7 Maren Purves via Tech-talk
- Re: Static Build on armv7 Florian Feldbauer via Tech-talk
- References:
- Static Build on armv7 Florian Feldbauer via Tech-talk
- Re: Static Build on armv7 Michael Davidsaver via Tech-talk
- Re: Static Build on armv7 Florian Feldbauer via Tech-talk
- Navigate by Date:
- Prev:
Re: Static Build on armv7 Florian Feldbauer via Tech-talk
- Next:
Re: Static Build on armv7 Maren Purves via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
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: Static Build on armv7 Florian Feldbauer via Tech-talk
- Next:
Re: Static Build on armv7 Maren Purves via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
<2022>
2023
2024