Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021 
<== Date ==> <== Thread ==>

Subject: Re: "DSO missing" errors for missing intermediate dependencies
From: Ralph Lange <ralph.lange@gmx.de>
To: EPICS Core Talk <core-talk@aps.anl.gov>
Date: Fri, 12 Jan 2018 14:10:00 +0100
Solved.
Thanks for your hints. In the end, it was an issue in our own library stack.

For the records: a good general description and a specific description of the changes in Fedora/RHEL.
These articles suggest that any application only needs to link against libraries that it directly uses.
However, if the API of a C++ library contains template classes, the templates are source code that gets instantiated in your application. Your application ends up directly calling functions in second level dependencies, and - after the change in DSO linking - has to explicitly link against those libraries.

This was not necessary on RHEL6, hence not documented, and broke when we moved to RHEL7.

Cheers,
~Ralph


On Thu, Jan 11, 2018 at 5:57 PM, Andrew Johnson <anj@aps.anl.gov> wrote:
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


References:
"DSO missing" errors for missing intermediate dependencies Ralph Lange
Re: "DSO missing" errors for missing intermediate dependencies Andrew Johnson

Navigate by Date:
Prev: Re: "DSO missing" errors for missing intermediate dependencies Andrew Johnson
Next: Build failed in Jenkins: epics-base-3.14-win32 #263 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021 
Navigate by Thread:
Prev: Re: "DSO missing" errors for missing intermediate dependencies Andrew Johnson
Next: Build failed in Jenkins: epics-base-3.14-win32 #263 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021 
ANJ, 19 Jan 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·