From kde-devel Wed Mar 07 10:32:56 2001 From: "ZECHA,HOLGER \(HP-Germany,ex1\)" Date: Wed, 07 Mar 2001 10:32:56 +0000 To: kde-devel Subject: RE: How to add a linker option in libtool ? X-MARC-Message: https://marc.info/?l=kde-devel&m=98396141121481 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=3Dlink gcc -DARTSC_BACKEND=3D'"/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 [ $? =3D '0' ] < then < deplibs_new=3D`echo $deplibs | sed 's/-Wl,//g'` < deplibs=3D$deplibs_new < fi Holger -----Original Message----- From: Michael Matz [mailto:matz@kde.org] Sent: Dienstag, 6. M=E4rz 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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=3Dsunos need_lib_prefix=3Dno need_version=3Dno + hardcode_into_libs=3Dall shlibpath_var=3DSHLIB_PATH shlibpath_overrides_runpath=3Dno # +s is required to enable = SHLIB_PATH library_names_spec=3D'${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=3D'-Wl,+s' .../configure = --prefix=3D....." to add -Wl,+s to all link commands, or also "make CXXLD=3D'g++ = -Wl,+s'". Ciao, Michael. =20 >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<