mklibs, lib_pics ???
Hello,
I'm using mklibs to build small libs from libc6 and other libs.
I'm trying to run ntpdate (as a test) depending on librt, libc and
libpthread.
That's why I added librt and libpthread from my system to my boot-disc.
when I'm running ntpdate
I'm getting the following message :
ntpdate: error while loading shared libraries: /lib/libpthread.so.0 :
symbol __strverscmp, version GLIBC_2.1.1 not defined in file libc.so.6
with link time reference.
After that I downloaded libc6 sources and compiled it .... obtaining
librt_pic.a and libpthread_pic.a.
I then tried the following :
~/mklibstest$ ./mklibs.sh -v -d libs/ ntpdate
Obtaining :
Initializing data objects... done.
Constructing dependency graph... (LALNLALA) done.
Eliminating cycles... () done.
Make small lib from /usr/lib/librt_pic.a in libs//librt-2.2.2.so.
++ cat /tmp/,mklibs.353/lib-symbols-to-include
++ sed 's/^/-u/'
++ echo /lib:/usr/lib
++ sed -e 's/::*/:/g' -e 's/^://' -e 's/:$//' -e 's/:/ -L/g'
++ cat /tmp/,mklibs.353/lib-dependencies
++ sed 's/^/-l/'
+ gcc -nostdlib -nostartfiles -shared -Wl,-soname=librt.so.1 -o
/tmp/,mklibs.353
/lib-so /usr/lib/librt_pic.a -lgcc -Llibs/ -L/lib -L/usr/lib -lc
-lpthread
Make small lib from /usr/lib/libpthread_pic.a in
libs//libpthread-0.9.so.
++ cat /tmp/,mklibs.353/lib-symbols-to-include
++ sed 's/^/-u/'
++ echo /lib:/usr/lib
++ sed -e 's/::*/:/g' -e 's/^://' -e 's/:$//' -e 's/:/ -L/g'
++ cat /tmp/,mklibs.353/lib-dependencies
++ sed 's/^/-l/'
+ gcc -nostdlib -nostartfiles -shared -Wl,-soname=libpthread.so.0
-u__errno_location -ufcntl -uread -urecvfrom -usendto -usigaction -o
/tmp/,mklibs.353/lib-so /usr/lib/libpthread_pic.a -lgcc -Llibs/ -L/lib
-L/usr/lib -lc /usr/bin/ld: /tmp/,mklibs.353/lib-so: undefined versioned
symbol name sem_trywait@@GLIBC_2.1
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
./mklibs.sh: install-small-lib: gcc or objcopy failed.
I'd like to be able to run any apply I want using small libs (libc6 in
particular). Is there a way to customize small libs ???
Is there any documentation explaining how to do that ?
If yes where can I find it ?
In advance : Thank you
Bye
Romain
Reply to: