[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    RE: How to add a linker option in libtool ?
From:       "ZECHA,HOLGER \(HP-Germany,ex1\)" <holger_zecha () hp ! com>
Date:       2001-03-07 10:32:56
[Download RAW message or body]

Hello,

the patch works fine, all the libs are now with the right path linked, but I
found another bug.
Somehow, I don't know why, the linker is called during linking ./arts/artsc
with the -Wl,+b -Wl,/opt... argument.
I fixed it by checking if we call ld or gcc, can you please have a look on
this as well ?

Here is the error:

/bin/sh ../../libtool --mode=link gcc
-DARTSC_BACKEND='"/opt/kde-2/lib/libartscb
ackend.la"' -O2  -o libartsdsp.la -rpath /opt/kde-2/lib -no-undefined
-module ar
tsdsp.lo libartsc.la
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/ld -b +h libartsdsp.sl.0 +b
/op
t/kde-2/lib -o .libs/libartsdsp.sl.0.0  .libs/artsdsp.o -Wl,+b
-Wl,/opt/developm
ent/kdelibs-2.1/arts/artsc/.libs:/opt/kde-2/lib  ./.libs/libartsc.sl -lc
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/ld: Unrecognized argument:
-Wl,
+b
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/ld: Usage:
/opt/gcc/lib/gcc-li
b/hppa1.1-hp-hpux10.20/2.95.2/ld flags... files...
make[2]: *** [libartsdsp.la] Error 1
make[2]: Leaving directory `/opt/development/kdelibs-2.1/arts/artsc'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/development/kdelibs-2.1/arts'
make: *** [install-recursive] Error 1

Here is my fix:
3330,3335d3329
<           echo $archive_cmds | grep LD
<           if [ $? = '0' ]
<           then
<               deplibs_new=`echo $deplibs | sed 's/-Wl,//g'`
<               deplibs=$deplibs_new
<           fi

Holger

-----Original Message-----
From: Michael Matz [mailto:matz@kde.org]
Sent: Dienstag, 6. März 2001 15:34
To: kde-devel@master.kde.org
Subject: Re: How to add a linker option in libtool ?


Hi,

On Mon, 5 Mar 2001, ZECHA,HOLGER (HP-Germany,ex1) wrote:
>
> I've to relink all libraries and excutables on HP-UX, because some
binaries
> have hard coded library paths inside (error. can't find
> /opt/development/kdeui/../kdecore/.libs/libkdecore.sl.3)

Hmm, you're right, the +b option doesn't work correctly (it should
hardcode the search-path to $prefix/lib), or only partially.  The problem
is, that libtool is adding the +b option only to applications, not
libraries.  This is caused by some errors in libtool, as it was used in
KDE (at the time we updated to the current version).  This was addressed
later in some way, but that broke linux, so I didn't update this
particular fix.  You might try with the following patch to the admin/
dir:

Index: ltconfig
===================================================================
RCS file: /home/kde/kde-common/admin/ltconfig,v
retrieving revision 1.52
diff -u -r1.52 ltconfig
--- ltconfig    2001/02/19 02:40:15     1.52
+++ ltconfig    2001/03/06 14:16:52
@@ -1065,6 +1065,7 @@
   version_type=sunos
   need_lib_prefix=no
   need_version=no
+  hardcode_into_libs=all
   shlibpath_var=SHLIB_PATH
   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
   library_names_spec='${libname}${release}.sl$versuffix
${libname}${release}.sl$major $libname.sl'

> I want to add the +s option during the linking which enables dld.sl to
have

You probably can use "USER_LDFLAGS='-Wl,+s' .../configure --prefix=....."
to add -Wl,+s to all link commands, or also "make CXXLD='g++ -Wl,+s'".


Ciao,
Michael.

 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to
unsubscribe <<

>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic