The following is a problem wrt to the find-requires portion of RPM on an armv4l Linux system, with a versioned glibc and binutils > 2.9.5. The problem: objdump -p *.so |tail -n 10 gives the following on ARM: [root@stewart-nw11 /bin]# objdump -p /lib/libc.so.6 |tail 6 0x00 0x09691f73 GLIBC_2.1.3 GLIBC_2.1.2 Version References: required from ld-linux.so.2: 0x09691f71 0x00 09 GLIBC_2.1.1 0x0d696911 0x00 08 GLIBC_2.1 0x0d696910 0x00 07 GLIBC_2.0 private flags = 0: [interworking not enabled] [APCS-32] [floats passed in integer registers] [absolute position] Note the last line: "private flags = 0:" This confuses the current find-requires, as it assumes all the lines after "Version References:" relate to glibc version information. This is not always true as can be seen below: [root@stewart-nw11 armv4l]# rpm -qp --requires bzip2-0.9.5c-1.armv4l.rpm /sbin/ldconfig ld-linux.so.2 libbz2.so.0 libc.so.6 /bin/sh libc.so.6(0:) libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) The line: "libc.so.6(0:)" should not be listed. The why: linux.req script assumes there is no none version information after the line "Version References:" from 'objdump -p', which is incorrect. Work around: I currently use the following work around for autodeps/linux.req - (START==1) && (LIBNAME!="") && ($4!="") { print LIBNAME "(" $4 ")"; } + (START==1) && (LIBNAME!="") && ($1~/^0x*/) && ($4!="") { print LIBNAME "(" $4 ")"; } It might be better to look for the string "GLIBC" in $4. It would be really nice to get this fixed. Hope it makes sense Thanks, -Rms
I believe this has been fixed in rpm-3.0.4. Thanks for the analysis.
I'd like to open this one again. With the current approach we only get library symbols for GLIBC dependencies in Requires. We actually get all library symbols in the Provides script, we simply do not add requires for them. As such I believe my first approach of checking for "($1~/^0x*/)" instead of GLIBC in "$4" would be better. Sorry about the confusion. This would help anyone doing library versioning including gcc if/when it ever starts using a shared libgcc with symbol versioning (I'm not up to date on whether this is still going ahead). The only thing I would add in is to not include the symbol library symbol '(GCC.INTERNAL)' as it does not make sense to have. rpm -qa --provides|grep GCC.INTERNAL This returns lots of useless garbage. I'd be willing to generate the proper patches for this, let me know if it makes sense. Thanks.
Changing component.
If you send me a patch against rpm-4.0.3, I'l certainly apply. However, there's no way that I can make a change for dependency chains on a platform I don't build on.