[Linuxppc-users] Runtime dependencies

Michael Meissner meissner at linux.ibm.com
Tue Nov 13 06:30:40 AEDT 2018


On Mon, Nov 12, 2018 at 04:20:24PM +0000, Ben Hood wrote:
> Hi list,
> 
> Is it mandatory to install the advance-toolchain-atX.X-runtime on the target deployment machine when cross compiling for that target as the documentation implies:
> 
> https://developer.ibm.com/linuxonpower/advance-toolchain/adv-tool-usage/#faq1A
> 
> “[the runtime package] is always required."
> 
> For example, the binaries produced by the toolchain appear to depend on AT runtime libraries:
> 
> (NEEDED)             Shared library: [libm.so.6]
> (NEEDED)             Shared library: [libc.so.6]
> (RUNPATH)           Library runpath: [/opt/at12.0/lib64]
> 
> So I’m guessing that the runtime needs to find it’s way onto the target machine, either manually or including it in an RPM spec.
> 
> Is this a strict dependency?

Yes.  In general, the Advance Toolchain libraries are newer than the
distribution libraries.  If something was compiled against the AT headers, they
might reference things that don't exist in the distribution libraries.  When
you link with the Advance Toolchain, the compiler driver adds the options:

	-rpath /opt/at12.0/lib64 \
	--enable-new-dtags \
	-dynamic-linker /opt/at12.0/lib64/ld64.so.2


to the link line which tells the OS to use /opt/at12.0/lib64/ld64.so.2 as the
dynamic linker, and when invokved, the dynamic linker will search for libraries
first in /opt/at12.0/lib64/<machine> and then /opt/at12.0/lib64 (where
<machine> is power7, power8, power9, etc. based on the machine the program is
running on).

> Or is it possible (if sensible) to use the default libc/libm of the target machine?

You might cobble something together that may work most of the time, but in
general you want to install at least the runtimes package on the remote system.
You may/may not also want to install the perf libraries if you intend to run
the performance tools like operf.  You may also want to install the
mcore-libraries package which contains additional runtimes like boost, sphde,
etc.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner at linux.ibm.com, phone: +1 (978) 899-4797



More information about the Linuxppc-users mailing list