Hi -
I wrote back in September that prelink was not available, the last days I studied it more closely and made some progress.
Prelink builds OK but fails some of its tests in the Makefile. But when I looked at the tests, it seemed that they were failing either due to problems with the tests themselves or on genuine and well-handled refusal to prelink stuff.
So I disabled the tests in the spec file, build the package and prelinked my rootfs, it rejected to prelink some stuff but otherwise worked, and my boot time decreased by ~1.5s.
When I studied the rejection to prelink, I first realized an important lib was blacklisted by default, then found this bugzilla about the issue still unresolved
https://bugzilla.redhat.com/show_bug.cgi?id=504949
After disabling the blacklist for nss, and prelinking the whole rootfs, there is still a list of "bad guys", these seem that they could be Fedora packaging / building errors?
/usr/sbin/prelink: /usr/bin/ospcat: Cannot prelink against non-PIC shared library /usr/lib/libosp.so.5 /usr/sbin/prelink: /usr/bin/onsgmls: Cannot prelink against non-PIC shared library /usr/lib/libosp.so.5 /usr/sbin/prelink: /usr/bin/rarian-sk-migrate: Cannot prelink against non-PIC shared library /usr/lib/librarian.so.0 /usr/sbin/prelink: /usr/bin/txtr-client-proxy: Cannot prelink against non-PIC shared library /usr/lib/libxml++-2.6.so.2 Prelinking /usr/bin/ospent /usr/sbin/prelink: /usr/bin/ospent: Cannot prelink against non-PIC shared library /usr/lib/libosp.so.5 /usr/sbin/prelink: /usr/bin/ospam: Cannot prelink against non-PIC shared library /usr/lib/libosp.so.5 /usr/sbin/prelink: /usr/bin/rarian-sk-get-cl: Cannot prelink against non-PIC shared library /usr/lib/librarian.so.0 /usr/sbin/prelink: /usr/bin/osgmlnorm: Cannot prelink against non-PIC shared library /usr/lib/libosp.so.5 /usr/sbin/prelink: /usr/bin/lzma: Cannot prelink against non-PIC shared library /usr/lib/libstdc++.so.6 /usr/sbin/prelink: /usr/bin/openjade: Cannot prelink against non-PIC shared library /usr/lib/libosp.so.5 /usr/sbin/prelink: /usr/bin/osx: Cannot prelink against non-PIC shared library /usr/lib/libosp.so.5 /usr/sbin/prelink: /usr/bin/txtr-reader: Cannot prelink against non-PIC shared library /usr/lib/libstdc++.so.6 /usr/sbin/prelink: /usr/bin/rarian-sk-preinstall: Cannot prelink against non-PIC shared library /usr/lib/librarian.so.0 /usr/sbin/prelink: /usr/bin/gcj-dbtool: Cannot prelink against non-PIC shared library /usr/lib/libgcj.so.10
Any ideas why these libs (they're all from Fedora packages) are not -fPIC?
-Andy
On 03/19/10 10:46, Somebody in the thread at some point said:
After disabling the blacklist for nss, and prelinking the whole rootfs, there is still a list of "bad guys", these seem that they could be Fedora packaging / building errors?
In terms of packages that matter to me, it's only these libs which are claimed by prelink to not be compiled with -fPIC.
/usr/lib/libxml++-2.6.so.2 /usr/lib/libstdc++.so.6
I decided to try to graft CFLAGS=-fPIC on libxml++ and rebuild the package, however when it builds I see it likes to use libtool, and the output of that already has -fPIC and -DPIC I didn't add, for example
g++ -DHAVE_CONFIG_H -DLIBXMLPP_BUILD -I. -I../.. -I../../libxml++ -I../.. -I/usr/include/libxml2 -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv5te -MT schemavalidator.lo -MD -MP -MF .deps/schemavalidator.Tpo -c schemavalidator.cc -fPIC -DPIC -o .libs/schemavalidator.o
It's absent on executable build lines but I think that's OK from what I understand. So I think it's at least trying to be built -fPIC by itself already.
I installed the new package and prelinked the lib
-bash-4.0# prelink -v /usr/lib/libxml++-2.6.so.2 ... Prelinking /usr/lib/libxml++-2.6.so.2.0.7 -bash-4.0#
Then I tried to prelink the executable that is not prelinked due to failure with /usr/lib/libxml++-2.6.so.2
-bash-4.0# prelink -v /usr/bin/txtr-client-proxy ... Prelinking /usr/bin/txtr-client-proxy prelink: /usr/bin/txtr-client-proxy: Cannot prelink against non-PIC shared library /usr/lib/libxml++-2.6.so.2 -bash-4.0#
So prelink did not complain when run on the lib but did complain when run on the executable that binds to the lib, and it complained then about the lib.
Is there something I can do with, eg, objdump to probe the PIC-ness of /usr/lib/libxml++-2.6.so.2 that prelink refuses to work with or otherwise debug this futher?
-Andy
On 03/20/10 10:26, Somebody in the thread at some point said:
In terms of packages that matter to me, it's only these libs which are claimed by prelink to not be compiled with -fPIC.
/usr/lib/libxml++-2.6.so.2 /usr/lib/libstdc++.so.6
Is there something I can do with, eg, objdump to probe the PIC-ness of /usr/lib/libxml++-2.6.so.2 that prelink refuses to work with or otherwise debug this futher?
Looking at the prelink source for generating the error it uses the presence of TEXTREL in the .so as indicating it isn't built with -fPIC.
In both libxml++ and libstdc++ cases, those .sos do have a TEXTREL entry when I look with objdump -x, but as a random sanity check /usr/lib/libssl.so.8 that doesn't make prelink trouble does NOT have TEXTREL.
So this doesn't seem to be any prelink issue, the libs are not tagged right themselves by ld if I understood it as being the position-independent libs they should be.
Further, I checked libstdc++ and libxml++ on my x86_64 box with the same objdump test, TEXTREL is absent.
-Andy
On 03/20/10 10:58, Somebody in the thread at some point said:
So this doesn't seem to be any prelink issue, the libs are not tagged right themselves by ld if I understood it as being the position-independent libs they should be.
Further, I checked libstdc++ and libxml++ on my x86_64 box with the same objdump test, TEXTREL is absent.
Ah these two problems are gone in current F12, I uplevelled my rootfs from F11 and prelink works fine.
If you want to try it you can get the package
http://rpm.txtr.com/f11/txtr-a/devel/RPMS/armv5tel/prelink-20100106-8_gmaste...
( and source here
http://rpm.txtr.com/f11/txtr-a/devel/SRPMS/prelink- 20100106-8_gmaster_9bb3a224.fc11.src.rpm )
It was built on F11 basis but works fine on F12.
Very nice speedup ;-)
If the tests don't get fixed, I would humbly suggest using %ifarch to null them out for now so it can be in normal Fedora.
-Andy
I'm currently using the repositories with the mirror list at http://mirrorlist.fedora-arm.wantstofly.org/ (via fedora-release-12-1.fa2.noarch), but it appears to not have been updated since about November.
Does anyone have a better repo to use for Fedora 12 for arm?
Jeff Voskamp