Subject: |
Re: [Merge] ~bhill/epics-base:shared-rpath-independent-of-static-build into epics-base:7.0 |
From: |
rivers via Core-talk <[email protected]> |
To: |
Bruce Hill <[email protected]> |
Date: |
Thu, 26 Sep 2019 16:23:23 -0000 |
> Mark, if you want to understand what flags were used to build a binary, then the output of 'readelf' is quite helpful.
Thanks. Here is the readelf output
corvette:pointGreyIOC/bin/linux-x86_64>readelf -d pointGreyApp
Dynamic section at offset 0x12caa90 contains 34 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libflycapture.so.2]
0x0000000000000001 (NEEDED) Shared library: [libX11.so.6]
0x0000000000000001 (NEEDED) Shared library: [libXext.so.6]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libreadline.so.6]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x5cae30
0x000000000000000d (FINI) 0x12b3b5c
0x0000000000000019 (INIT_ARRAY) 0x1829d58
0x000000000000001b (INIT_ARRAYSZ) 1240 (bytes)
0x000000000000001a (FINI_ARRAY) 0x182a230
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x000000006ffffef5 (GNU_HASH) 0x400298
0x0000000000000005 (STRTAB) 0x4bac68
0x0000000000000006 (SYMTAB) 0x42b748
0x000000000000000a (STRSZ) 967743 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x18cb000
0x0000000000000002 (PLTRELSZ) 14064 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x5c7740
0x0000000000000007 (RELA) 0x5b3130
0x0000000000000008 (RELASZ) 83472 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x5b2fc0
0x000000006fffffff (VERNEEDNUM) 7
0x000000006ffffff0 (VERSYM) 0x5a70a8
0x0000000000000000 (NULL) 0x0
Note that it does not contain a RUNPATH at all, which explains the problem.
This is happening even though I have applied Bruce's patch and my CONFIG.Common.linuxCommon contains this:
SHRLIBDIR_RPATH_LDFLAGS_YES = $(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%)
SHRLIBDIR_LDFLAGS += \
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
Let me explain what I am trying to do:
- Build a static executable
- Building with the vendor library which is only provided as a shared library.
My Makefile contains this:
# We use PROD_SYS_LIBS even though libflycapture.so is in the ADPointGrey tree
# because we are doing static build but the file is a .so file, not a .a file.
PROD_SYS_LIBS_Linux += flycapture
So I have to use PROD_SYS_LIBS_Linux, rather than PROD_LIBS, because PROD_LIBS only looks for a .a file if building statically.
I want RUNPATH to include the path to that vendor library that I installed in ADPointGrey.
How do I do that?
--
https://code.launchpad.net/~bhill/epics-base/+git/epics-base/+merge/373243
Your team EPICS Core Developers is requested to review the proposed merge of ~bhill/epics-base:shared-rpath-independent-of-static-build into epics-base:7.0.
- References:
- [Merge] ~bhill/epics-base:shared-rpath-independent-of-static-build into epics-base:7.0 Bruce Hill via Core-talk
- Navigate by Date:
- Prev:
Re: [Merge] ~bhill/epics-base:shared-rpath-independent-of-static-build into epics-base:7.0 mdavidsaver via Core-talk
- Next:
Re: [Merge] ~bhill/epics-base:shared-rpath-independent-of-static-build into epics-base:7.0 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
- Navigate by Thread:
- Prev:
Re: [Merge] ~bhill/epics-base:shared-rpath-independent-of-static-build into epics-base:7.0 mdavidsaver via Core-talk
- Next:
Re: [Merge] ~bhill/epics-base:shared-rpath-independent-of-static-build into epics-base:7.0 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
|