Return to BSD News archive
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.hawaii.edu!ames!olivea!uunet!lysator.liu.se!ronnie From: ronnie@lysator.liu.se (Ronnie Sahlberg) Newsgroups: comp.unix.bsd Subject: [386BSD],fix for SharedLibraries posted recently Message-ID: <2029@lysator.liu.se> Date: 30 Nov 92 10:13:24 GMT Sender: news@lysator.liu.se Organization: Lysator Academic Computer Society, Linkoping University, Sweden Lines: 30 Nntp-Posting-Host: robert.lysator.liu.se First of all, please do not flame me for using or encouraging others to use the recently posted SharedLibraries. Yes I know that it is not the best way to implement SharedLibraries, but it works, and when 0.2 is released with (I hope) real shared libraries, we all have to reinstall the entire 386bsd distribution ? Do we not ? So it doesnt really matter if we install this SH-package or not. :-) Anyway, there are some problems with the libc_s as it created by the distributed package. Some functions in libc.a contains global data that is accessed from outside the functions/library itself. One such function is /usr/src/lib/libc/stdlib/getopt.c . This results in the program refusing to link when recompiled. (approx 20 programs in the /bin /sbin /usr/bin dirs.) To fix this problem I added the following to the Makefile : *********** updatelibs: Makefile cc -O -c -o /tmp/getopt.o /usr/src/lib/libc/stdlib/getopt.c ar -r /usr/lib/libc_s.a /tmp/getopt.o rm /tmp/getopt.o ranlib /usr/lib/libc_s.a ********** When libc_s.a is created, you must 'make updatelibs' in order to make it work properly. I have recompiled all programs in /bin /sbin /usr/bin and it seems to be working fine. ronnie s, ronnie@lysator.liu.se