libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking problems on SL6


From: Adam Mercer
Subject: Re: linking problems on SL6
Date: Mon, 21 Nov 2011 15:22:25 -0600

On Mon, Nov 21, 2011 at 12:21, Peter O'Gorman <address@hidden> wrote:

Peter

> Are these -Wl,-rpath flags coming from libtool? They seem to be there
> already on the libtool command line. Could you post this snippet of your
> makefile.am, please?

I am not setting these myself and they don't seem to be coming from
any library dependencies. The section of the Makefile.am that deals
with the library is essentially:

INCLUDES = -I$(top_builddir)/include
LDADD = liblalframe.la

lalframeincludedir = $(includedir)/lal
lalframeinclude_HEADERS = \
        Aggregation.h \
        FrameCache.h \
        FrameCalibration.h \
        FrameData.h \
        FrameStream.h \
        LALFrameConfig.h \
        LALFrameIO.h \
        LALFrameL.h \
        LALFrameVCSInfo.h \
        LowLatencyData.h

lib_LTLIBRARIES = liblalframe.la
liblalframe_la_SOURCES = \
        Aggregation.c \
        FrameCache.c \
        FrameCalibration.c \
        FrameData.c \
        FrameSeries.c \
        FrameStream.c \
        LALFrameIO.c \
        LALFrameVCSInfo.c \
        LowLatencyData.c

noinst_HEADERS = \
        FrameSeriesRead_source.c \
        FrameSeriesWrite_source.c

liblalframe_la_LDFLAGS = -version-info $(LIBVERSION)

This is not the complete Makefile.am, the rest is stuff for test
codes, documentation, etc...

> Libtool has issues with multilib systems. Someone had a patch at some point
> that correctly figured out the multilib library paths using ldconfig, but
> I've long forgotten who. You can set lt_cv_sys_lib_dlsearch_path_spec and
> lt_cv_sys_lib_search_path_spec at configure time if libtool is getting
> sys_lib_dlsearch_path_spec/sys_lib_search_path_spec wrong (check the
> generated libtool script for ^sys_lib_dlsearch_path_spec and
> ^sys_lib_search_path_spec to see what it's guessing).

I have been looking at those variables, they are set as:

# Compile-time system search path for libraries.
sys_lib_search_path_spec="/usr/lib/gcc/x86_64-redhat-linux/4.4.5
/usr/lib64 /lib64 "

# Run-time system search path for libraries.
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib64/R/lib
/usr/lib/atlas-3dnow /usr/lib/atlas-sse /usr/lib/atlas-sse2
/usr/lib/atlas-sse3 /usr/lib64/atlas /usr/lib64/mysql
/usr/lib64/octave-3.2.4 /usr/lib64/root "

sys_lib_search_path_spec seems to be what I'd expect, but not
sys_lib_dlsearch_path_spec. If I edit this to contain /lib64 and
/usr/lib64 then the "-Wl,-rpath -Wl,/usr/lib64" flags aren't passed
and the library links correctly.

I've been looking through libtool.m4, specifically where is sets
sys_lib_dlsearch_path_spec, and the output seems to be correct given
the code but I'm not very familier with the libtool internals so I
could be mistaken.

Setting lt_cv_sys_lib_dlsearch_path_spec="/lib64 /usr/lib64" at
configure time results in "-Wl,-rpath -Wl,/usr/lib64" not being passed
and the correct libraries linked. So this is a workaround but I'd like
to understand why these flags are being added in the first place.

Cheers

Adam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]