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

Re: Error recompiling latest 4.1.1 test release on ppc



On Thu, Mar 13, 2003 at 08:12:09AM -0500, Jeff Johnson wrote:
> On Thu, Mar 13, 2003 at 09:45:10AM +0100, Matthias Saou wrote:
> > The binaries I now got seem to have been somehow linked against the librpm
> > used to build them:
> > 
> > error: failed dependencies:
> >         librpm-4.0.3.so   is needed by rpm-4.1.1-0.1.7x
> >         librpmdb-4.0.3.so   is needed by rpm-4.1.1-0.1.7x
> >         librpmio-4.0.3.so   is needed by rpm-4.1.1-0.1.7x
> > 
> > I'm going to try to more or less get it working and see if I can recompile
> > 4.1.1 against itself. But is this the expected behavior?
> 
> Hmmm, libtool is evil. I gave up wrestling with libtool, here's the
> sick hack that fixed the problem for me (from rpm-4.1.1 rpmdb/Makefile.am,
> other Makefile.am's too):
> 
> 	librpmdb_la_LDFLAGS = -release 4.1 -L/var/tmp/rpm-root$(usrlibdir)
> 
> The hack gets -L$(RPM_BUILD_ROOT} in front of -L/usr/lib.

I think this library linking bug ist still there, at least with the 4.2/4.1.1
pair. Simply uninstall rpm-devel, I even use the attached patch to rpm's
specfile to remind me. ;)
(it is against 4.2, but should apply to 4.1.1 also)
-- 
Axel.Thimm@physik.fu-berlin.de
--- rpm-4.2-0.70.spec.nootherdevel	2003-03-07 23:39:28.000000000 +0100
+++ rpm.spec	2003-03-11 10:37:12.000000000 +0100
@@ -33,6 +35,13 @@
 
 # XXX necessary only to drag in /usr/lib/libelf.a, otherwise internal elfutils.
 BuildRequires: elfutils-libelf
+# If a previous version of rpm is installed, then its shared libs may
+# get linked against in library install mode. The library installation
+# of librpm looks like:
+# /bin/sh ../libtool --mode=relink gcc [...]
+# gcc -shared  cpio.lo [...] -L/usr/src/at/work/BUILD/rpm-4.2/popt/.libs -L/usr/local/lib -L/usr/src/at/work/BUILD/rpm-4.2/zlib -L/usr/src/at/work/BUILD/rpm-4.2/rpmio/.libs -L/usr/lib -L/var/tmp/rpm-root/usr/lib -lrpmdb -lrpmio -lpopt     -Wl,-soname -Wl,librpm-4.2.so -o .libs/librpm-4.2.so
+# Note that there is no -L...rpmdb/.libs and also that the installation dir is after /usr/lib, so instead of librpmdb-4.2 you link against 4.1
+BuildConflicts: rpm-devel > %{version}, rpm-devel < %{version}
 
 BuildRequires: zlib-devel
 

Attachment: pgp00015.pgp
Description: PGP signature


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