2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: "DSO missing" errors for missing intermediate dependencies |
From: | Ralph Lange <[email protected]> |
To: | EPICS Core Talk <[email protected]> |
Date: | Fri, 12 Jan 2018 14:10:00 +0100 |
http://www.kaizou.org/2015/01/linux-libraries/ http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
Hi Ralph,
On 01/11/2018 04:16 AM, Ralph Lange wrote:
> Moving from RHEL6 to RHEL7, we ran into the issue that with the newer
> system the linker line for an executable has to mention all intermediate
> dependencies, while on RHEL6 is was good enough that intermediate
> dependency libraries were mentioned in the internal dependency list
> (output of 'ldd') of a primary dependency library.
Huh?
> tux% cat /etc/redhat-release
> Red Hat Enterprise Linux Workstation release 7.4 (Maipo)
> tux% make softIoc
> make -f ../Makefile TOP=../../.. T_A=linux-x86_64 softIoc
> make[1]: Entering directory '/epics/base/7.0/modules/database/src/std/O.linux-x86_ 64'
> /usr/bin/g++ -o softIoc -L/epics/base/7.0/lib/linux-x86_64
> -Wl,-rpath,/epics/base/7.0/lib/linux-x86_64 -rdynamic -m64
> softIoc_registerRecordDeviceDriver.o softMain.o -ldbRecStd -ldbCore -lca -lCom
> make[1]: Leaving directory '/epics/base/7.0/modules/database/src/std/O.linux-x86_ 64'
There is no -lpthread on that line. Are you using a different linker
(gold perhaps?).
> As a result of the missing intermediate dependency, you get error
> messages like
>
> /usr/bin/ld: PIDThread.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
> /usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line
Why do you think you get those errors but I've never seen them here on
RHEL-7? Can you name a standard EPICS module where you're seeing this so
I can try to replicate it (I assume it doesn't happen with Base builds
or you would have reported it earlier)?
> At first glance, the setting of POSIX_LDLIBS
> (in CONFIG.Common.linuxCommon) seems to try to avoid this for pthreads,
> but it turns out that this is added only (in CONFIG.Common.UnixCommon)
> for STATIC_BUILD = YES or SHARED_LIBRARIES = NO.
>
> How should we address this?
I would like to be able to see it here to understand what's going on
before we make any build system changes. Can you post the full
command-line that generates the error please.
I'm going to guess that this is an ITER source file. Does its Makefile
contain SYS_LIBS += pthread which I think should be needed to build
any code that is calling pthread routines directly?
Also make sure that you have rebuilt everything on RHEL-7, I do have a
vague recollection of seeing that error here recently, and I think the
fix was that we needed to rebuild something after the upgrade.
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon