Opened 7 years ago

Last modified 7 years ago

#805 new defect

installed libyat linked in before local libyat

Reported by: Peter Owned by: Peter
Priority: trivial Milestone: yat 0.x+
Component: build Version: 0.12
Keywords: Cc:

Description

I have yat 0.12pre installed in /home/peterJo/local and then configure yat 0.12 with

../yat-0.12/configure --enable-silent-rules \
LDFLAGS="-Wl,-rpath -Wl,/home/peterJo/local/lib" \
prefix=/home/peterJo/local

which results in two test failures:

FAIL: test/version
==================

running '/home/peterJo/projects/osd/_yat/test/.libs/lt-version.test' in 'test/testSubDir/lt-version.test'
API version: 0.12
    major:   0
    minor:   12
    patch:   0
ABI version: 0.12pre
    major:   0
    minor:   12
    patch:   0
Boost API version: 1_41
GSL API version: 1.15
GSL ABI version: 1.15
Test failed.

indicating that the local libyat is not linked but instead /home/peterJo/local/lib/libyat.so as also indicated by

$ ldd test/.libs/version.test 
linux-vdso.so.1 =>  (0x00007ffffc3ff000)
libyat.so.9 => /home/peterJo/local/lib/libyat.so.9 (0x00007f869a89c000)
libz.so.1 => /lib64/libz.so.1 (0x00007f869a66e000)
libgsl.so.0 => /home/peterJo/local/lib/libgsl.so.0 (0x00007f869a25f000)
libgslcblas.so.0 => /home/peterJo/local/lib/libgslcblas.so.0 (0x00007f869a028000)
libboost_thread-mt.so.5 => /usr/lib64/libboost_thread-mt.so.5 (0x00007f8699e12000)
libboost_system.so.5 => /usr/lib64/libboost_system.so.5 (0x00007f8699c0f000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f8699909000)
libm.so.6 => /lib64/libm.so.6 (0x00007f8699684000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f869946e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f86990da000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8698ebc000)
librt.so.1 => /lib64/librt.so.1 (0x00007f8698cb4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f869ab65000)

This is obviously caused by the LDFLAGS provided via configure telling the runtime linker to look in /home/peterJo/local/lib first.

I set those LDFLAGS because I want those flags in yat-config --ldflags. Without those flags the runtime linker does not find libyat (unless binary is built via libtool which adds that flag).

Is it possible to make the build to always pick up yat/libyat.la first and no installed libyat.la. Perhaps this is a flawed use case that should not be supported, but then there should be a mechanism to inject flags into yat-config without having the flags injected into the remaining build.

yat_m4_test also fails for the same reason:

Incorrect version of linked libyat

Change History (1)

comment:1 Changed 7 years ago by Peter

Needless to say, ideally the output of yat-config --ldflags should contain the

'-Wl,-rpath -Wl,/home/peterJo/local/lib'

in my setting.

Note: See TracTickets for help on using tickets.