EPICS Home

Experimental Physics and Industrial Control System


 
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  <2025 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  <2025
<== Date ==> <== Thread ==>

Subject: EPICS INSTALL_LOCATION/FINAL_LOCATION doesn't work?
From: "J. Lewis Muir via Tech-talk" <tech-talk at aps.anl.gov>
To: EPICS Tech-Talk <tech-talk at aps.anl.gov>
Date: Sat, 18 Jan 2025 12:45:35 -0600
Hi, Tech-Talkers!

On RHEL 7 (linux-x86_64), using the DESTDIR-like build behavior
of EPICS 7.0.8.1 by setting INSTALL_LOCATION, FINAL_LOCATION, and
LINKER_USE_RPATH doesn't seem to work.  Is this broken, or am I doing
something wrong?

I did the following:

====
$ mkdir /tmp/45
$ cd /tmp/45
$ mkdir distfiles opt src work
$ cd distfiles
$ curl -OL https://epics.anl.gov/download/base/base-7.0.8.1.tar.gz
$ cd ../src
$ tar xzf ../distfiles/base-7.0.8.1.tar.gz
$ cd base-7.0.8.1
$ vi configure/CONFIG_SITE
----
INSTALL_LOCATION=/tmp/45/work
FINAL_LOCATION=/tmp/45/opt/epics-7.0.8.1
LINKER_USE_RPATH=NO
----
$ export EPICS_HOST_ARCH=linux-x86_64
$ export PATH="/tmp/45/work/bin/$EPICS_HOST_ARCH:$PATH"
$ export LD_LIBRARY_PATH=/tmp/45/work/lib/$EPICS_HOST_ARCH
$ make
====

After the build completes, /tmp/45/opt is empty; that's as expected
since that's the final location, and it's up to me to move them into
their final location, potentially on a different machine.

In /tmp/45/work, all the installed files are there; that's as expected
also.  But unfortunately, the RPATH information is wrong.  For example,
caget doesn't have correct RPATH entries for libca nor libCom:

====
$ ldd /tmp/45/work/bin/linux-x86_64/caget
        linux-vdso.so.1 =>  (0x00007fff0d2b8000)
        libca.so.4.14.4 => not found
        libCom.so.3.23.1 => not found
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa226e61000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fa226b5f000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa226949000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fa22657b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa227169000)
====

And libca doesn't have a correct RPATH entry for libCom:

====
$ ldd /tmp/45/work/lib/linux-x86_64/libca.so
        linux-vdso.so.1 =>  (0x00007ffd80bd2000)
        libCom.so.3.23.1 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb2bd6a2000)
        libreadline.so.6 => /lib64/libreadline.so.6 (0x00007fb2bd45c000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fb2bd254000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fb2bd050000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fb2bcd48000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fb2bca46000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fb2bc830000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fb2bc462000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb2bdb28000)
        libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007fb2bc238000)
====

Wondering whether setting LINKER_USE_RPATH=NO above was the wrong
thing to do, I tried again as above but with LINKER_USE_RPATH=YES in
CONFIG_SITE.  Unfortunately, that also results in broken RPATH entries,
but different.  For example, caget's RPATH entries for libca and libCom
are both under INSTALL_LOCATION (/tmp/45/work), which is wrong; they
should be under FINAL_LOCATION (/tmp/45/opt/epics-7.0.8.1):

====
$ ldd /tmp/45/work/bin/linux-x86_64/caget
        linux-vdso.so.1 =>  (0x00007ffff5ffd000)
        libca.so.4.14.4 => /tmp/45/work/lib/linux-x86_64/libca.so.4.14.4 (0x00007f6356d92000)
        libCom.so.3.23.1 => /tmp/45/work/lib/linux-x86_64/libCom.so.3.23.1 (0x00007f6356b15000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f635680d000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f635650b000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f63562f5000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f6355f27000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6355d0b000)
        libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f6355ac5000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f63558bd000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f63556b9000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6356ffc000)
        libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f635548f000)
====

And libca's RPATH entry for libCom is similarly under INSTALL_LOCATION
(/tmp/45/work), which is wrong; it should be under FINAL_LOCATION
(/tmp/45/opt/epics-7.0.8.1):

====
$ ldd /tmp/45/work/lib/linux-x86_64/libca.so
        linux-vdso.so.1 =>  (0x00007ffce6921000)
        libCom.so.3.23.1 => /tmp/45/work/lib/linux-x86_64/libCom.so.3.23.1 (0x00007fc58b491000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc58b275000)
        libreadline.so.6 => /lib64/libreadline.so.6 (0x00007fc58b02f000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fc58ae27000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fc58ac23000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fc58a91b000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fc58a619000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc58a403000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fc58a035000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc58b978000)
        libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007fc589e0b000)
====

Thanks!

Lewis

Replies:
Re: EPICS INSTALL_LOCATION/FINAL_LOCATION doesn't work? Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Phytron support for EPICS motor (pull request #8) Lutz Rossa via Tech-talk
Next: Question Regarding HLS/LLS Settings and DIR Values Zhibang Shen 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  <2025
Navigate by Thread:
Prev: Re: Phytron support for EPICS motor (pull request #8) Lutz Rossa via Tech-talk
Next: Re: EPICS INSTALL_LOCATION/FINAL_LOCATION doesn't work? Johnson, Andrew N. 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  <2025