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:


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" \

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/ as also indicated by

$ ldd test/.libs/version.test =>  (0x00007ffffc3ff000) => /home/peterJo/local/lib/ (0x00007f869a89c000) => /lib64/ (0x00007f869a66e000) => /home/peterJo/local/lib/ (0x00007f869a25f000) => /home/peterJo/local/lib/ (0x00007f869a028000) => /usr/lib64/ (0x00007f8699e12000) => /usr/lib64/ (0x00007f8699c0f000) => /usr/lib64/ (0x00007f8699909000) => /lib64/ (0x00007f8699684000) => /lib64/ (0x00007f869946e000) => /lib64/ (0x00007f86990da000) => /lib64/ (0x00007f8698ebc000) => /lib64/ (0x00007f8698cb4000)
/lib64/ (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/ first and no installed 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.