Hi,

I am trying to compile rpm-4.4.4 on my cross-lfs system. As far as i can see all dependencies are covered so this should not be any problem. I start by issuing the command:

./configure --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64 --disable-debug --disable-shared

the shared is disabled due to a -fPIC problem early in the build.

after around 10 minutes i get this (sorry, its quite long)

make[2]: Entering directory `/mnt/main/home/justin/src/rpm-4.4.4'
/bin/sh ./libtool --tag=CC --mode=link gcc -m64  -fPIC -lz -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts  -lz  -o rpm2cpio -lbeecrypt -lz  -all-static rpm2cpio.o ./lib/librpm.la ./rpmdb/librpmdb.la ./rpmio/librpmio.la ./popt/libpopt.la ./zlib/libz.la   -lrt -lpthread  -L./zlib  -lbz2
gcc -m64 -fPIC -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o rpm2cpio -static rpm2cpio.o  ./lib/.libs/librpm.a -L/usr/lib6464 /mnt/main/home/justin/src/rpm-4.4.4/rpmdb/.libs/librpmdb.a -L/mnt/main/home/justin/src/rpm-4.4.4/zlib -lselinux ./rpmdb/.libs/librpmdb.a /mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a /mnt/main/home/justin/src/rpm-4.4.4/popt/.libs/libpopt.a /usr/lib64/libsqlite3.a ./rpmio/.libs/librpmio.a -lbeecrypt /usr/lib64/libneon.a /usr/lib64/libxml2.a -lm -ldl /mnt/main/home/justin/src/rpm-4.4.4/zlib/.libs/libz.a -lresolv ./popt/.libs/libpopt.a ./zlib/.libs/libz.a -lrt -lpthread -lbz2
/mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a(liblua_la-loadlib.o): In function `loadlib':
loadlib.c:(.text+0x44): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a(ugid.o): In function `gidToGname':
ugid.c:(.text+0x528): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/.libs/librpm.a(psm.o): In function `rpmpsmStage':
psm.c:(.text+0x63b9): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
psm.c:(.text+0x63be): warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
psm.c:(.text+0x6390): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a(rpmio.o): In function `ftpLogin':
rpmio.c:(.text+0x2dbe): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/.libs/librpm.a(psm.o): In function `rpmpsmStage':
psm.c:(.text+0x6395): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib64/libneon.a(ne_socket.o): In function `ne_addr_resolve':
ne_socket.c:(.text+0x9c2): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
./lib/.libs/librpm.a(rpminstall.o): In function `rpmInstall':
rpminstall.c:(.text+0x138a): warning: the use of `mktemp' is dangerous, better use `mkstemp'
/mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a(rpmio.o): In function `mygethostbyname':
rpmio.c:(.text+0x1c78): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/mnt/main/home/justin/src/rpm-4.4.4/rpmio/.libs/librpmio.a(url.o): In function `urlSplit':
url.c:(.text+0x20ba): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlGzfileOpen_real':
xmlIO.c:(.text+0xfdd): undefined reference to `gzdopen'
xmlIO.c:(.text+0x107c): undefined reference to `gzopen'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlGzfileOpenW':
xmlIO.c:(.text+0x1175): undefined reference to `gzdopen'
xmlIO.c:(.text+0x11fa): undefined reference to `gzopen'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlGzfileRead':
xmlIO.c:(.text+0x122f): undefined reference to `gzread'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlGzfileWrite':
xmlIO.c:(.text+0x1271): undefined reference to `gzwrite'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlGzfileClose':
xmlIO.c:(.text+0x12a5): undefined reference to `gzclose'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlFreeZMemBuff':
xmlIO.c:(.text+0x1363): undefined reference to `deflateEnd'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlCreateZMemBuff':
xmlIO.c:(.text+0x1495): undefined reference to `deflateInit2_'
xmlIO.c:(.text+0x150e): undefined reference to `crc32'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlZMemBuffAppend':
xmlIO.c:(.text+0x1803): undefined reference to `deflate'
xmlIO.c:(.text+0x1895): undefined reference to `crc32'
/usr/lib64/libxml2.a(xmlIO.o): In function `xmlZMemBuffGetContent':
xmlIO.c:(.text+0x190f): undefined reference to `deflate'
/usr/lib64/libxml2.a(xmlIO.o): In function `__xmlParserInputBufferCreateFilename':
xmlIO.c:(.text+0x298c): undefined reference to `gzread'
xmlIO.c:(.text+0x29c8): undefined reference to `gzrewind'
collect2: ld returned 1 exit status
make[2]: *** [rpm2cpio] Error 1
make[2]: Leaving directory `/mnt/main/home/justin/src/rpm-4.4.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/main/home/justin/src/rpm-4.4.4'
make: *** [all] Error 2

This to me looks like it cannot successfully link in a required file, so I set about locating the functions that it could not find. I found it to be libz, part of zlib. So I issued a

nm -A /usr/lib64/libz.so |grep "gzopen"

and this returned

/usr/lib64/libz.so:0000000000004220 T gzopen

and works fine for all the functions mention as 'undefined references'. As you probably know /usr/lib64/libz.so is a symlink to /lib64/libz.1

Any help in this matter would be appreciated.

Thanks

Justin Whelan
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to