libtool
[Top][All Lists]
Advanced

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

-Wl,-rpath issues


From: Steven F. Killen
Subject: -Wl,-rpath issues
Date: Mon, 16 Feb 2004 10:58:20 -0500 (EST)

Greetings,

I did some searching in libtool and bugs-libtool, and didn't find anything
directly related to a problem I'm having with LDFLAGS and libtool.

Due to our distribution mechanism, programs that use shared libraries need
to be told where to look at runtime. LDFLAGS looks like this:

-L/usr/local/lib -Wl,-rpath /usr/local/lib

The problem I'm experiencing is that libtool seems to chop off the
/usr/local/lib after -rpath, and the build fails.  If I build without
LDFLAGS set, the build proceeds, but (naturally) the program can't find
the shared libraries.  Setting LD_LIBRARY_PATH to /usr/local/lib confirms
this.

Below is an example of where the build fails.  Is this a bug in libtool,
or is there something I can do to make it work properly for our system?

% gmake
Making all in wrlib
gmake[1]: Entering directory
`/usr/build/wmaker/003/WindowMaker-0.80.2/wrlib'
/bin/sh ../libtool --mode=link gcc  -g -O2 -L/usr/local/lib -Wl,-rpath
/usr/local/lib -o libwraster.la -rpath /usr/local/lib -version-info 4:0:2
LookupCmap.lo StdCmap.lo CrCmap.lo DelCmap.lo CmapAlloc.lo raster.lo
draw.lo color.lo load.lo save.lo gradient.lo xpixmap.lo convert.lo
context.lo misc.lo scale.lo rotate.lo convolve.lo nxpm.lo xpm.lo xutil.lo
ppm.lo png.lo jpeg.lo tiff.lo gif.lo -L/usr/local/lib  -L/usr/X11R6/lib
-ltiff  -lXpm -ljpeg -lungif -lXext -lX11  -lm
rm -fr .libs/libwraster.la .libs/libwraster.* .libs/libwraster.*
gcc -shared  LookupCmap.lo StdCmap.lo CrCmap.lo DelCmap.lo CmapAlloc.lo
raster.lo draw.lo color.lo load.lo save.lo gradient.lo xpixmap.lo
convert.lo context.lo misc.lo scale.lo rotate.lo convolve.lo nxpm.lo
xpm.lo xutil.lo ppm.lo png.lo jpeg.lo tiff.lo gif.lo
-D__LIBTOOL_IS_A_FOOL__   -D__LIBTOOL_IS_A_FOOL__   -L/usr/local/lib
-L/usr/X11R6/lib -ltiff -lXpm /usr/lib/libjpeg.so
/usr/local/lib/libungif.so -lXext -lX11 -lm  -Wl,-rpath -Wl,-soname
                                             ^^^^^^^^^^
-Wl,libwraster.so.2 -o .libs/libwraster.so.2.2.0
/usr/local/bin/ld: cannot open libwraster.so.2: No such file or directory
collect2: ld returned 1 exit status
gmake[1]: *** [libwraster.la] Error 1
gmake[1]: Leaving directory
`/usr/build/wmaker/003/WindowMaker-0.80.2/wrlib'
gmake: *** [all-recursive] Error 1

Thanks,

--
Steve Killen <address@hidden>




reply via email to

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