*BSD News Article 68786


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!vic.news.telstra.net!act.news.telstra.net!imci3!imci4!imci5!pull-feed.internetmci.com!news.internetMCI.com!newsfeed.internetmci.com!solaris.cc.vt.edu!news.mathworks.com!uunet!in2.uu.net!newsfeed.pitt.edu!bb3.andrew.cmu.edu!cantaloupe.srv.cs.cmu.edu!moore.fac.cs.cmu.edu!moore
From: moore+@moore.fac.cs.cmu.edu (Dale Moore)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: ld.so continued
Date: 17 May 1996 17:58:07 GMT
Organization: Carnegie Mellon University
Lines: 60
Message-ID: <4nienf$67m@cantaloupe.srv.cs.cmu.edu>
NNTP-Posting-Host: moore.fac.cs.cmu.edu

Short Version:

	Shared library minor revisions do not work on NetBSD 1.1.

Long Version:

Perhaps this is old news.   I'm just getting started with NetBSD.
I looked at some of the older posts, but didn't have much luck finding info
about this problem.

If I have two shared libraries in
	/usr/local/lib/libXaw.so.6.0
	/usr/local/lib/libXaw.so.6.1

Then "ldconfig /usr/local/lib" will load or cache  only 
the 6.1 version.  The "ldconfig -r" confirms this.

When I execute a binary that was linked against the 6.0
version, it will complain that the 6.0 file is not found.
(The environment variable LD_LIBRARY_PATH is not set.)

The solutions that I can think of are to either
 -  modify the runtime loader to match the requested
    version (6.0) with the loaded version (6.1).  Or
 - modify ldconfig to load both the 6.0 and 6.1 version.

Modifying ld.so is not a very small change.  It hashes its
hints file.  The hash is based on the name, major, and minor
revision level.  Because it hashes with the minior revision
level, it makes it more difficult to find the  highest minor
revision.

The ldconfig  patch was easy.  The change was only one line.
But with context, and #ifdef's and comments explaining the change.
The uuencoded compressed diff file is below.

If you have additional comments or questions, please feel free to
send me mail.

Dale Moore

begin 644 /usr/tmp/ldconfig.diff.gz
M'XL("!2 G#$  VQD8V]N9FEG+F1I9F8 G5)=;]I $'R&7S%1\Q HQAA"TA"U
M$@%#K :[XB-1GM#%/L.E]AG='4E0\^.[-B;]4%6IM2Q[YVYW]FYVZO4ZMEK9
M6H7V2FYMBIL/0MI)1&^8R5BLWH)F6!DI@2 T<#IHMWJ=3L]QX%Q<=*N69<%F
ML;9#;6]4]LA#8^N=-CS55O;P:#EVFF6*V__8:\)V<,[1NNBUN[UN*^]U5JW_
M^N08[?-&IXT"YD<A>-H"15850!TGGC^X60P]?PS?'=]X8]<?N BF".;7[O3.
MF[DU]*?>+$_P?/3]>]SU[Q$LY@A&H!PL9I0_VK/-K[T99L%H?M>?N@VXMZX/
M;X3^\):(AH>*+\%LYEUY-][\/E^:+0;7&/8G_;';+&BJ[W,NHIH'T_L] (8L
MX9CD4F' E.0K09 G22:QD.*)*RT,27)FD3)6H499Z!FPS88SI6'6S.!YS26>
M.=;LB4-S1:4L023BF"LN#5(A,P7%GX06F=0'FBP&0R(>%%.[!C*9[(B.6,1J
MS?7O51 :2<8B'C4/]5=;4Q2HK801*=_O*SPS:328!']AY)^4/1(/DU')F#(3
MKM](^A%1T@#\^7+B^<%T.75)62_PEU?3X#.);3(Z0YK1S3*ZCXR$7"',(EXR
M'-]DJ^,R=&54H%SQRK$7]?##8HTG.$VG73C8;GVPVUTX3J_3I1>;KW!?-M@7
MVO3]H^V<BVZCW7)^,EZKTV@[IP?K5;116[JO7I.FRT1H4ZGK]>8RYZ/=F*Y^
M0A@?RXPU9]$E\@P<EC?6)\E?3 W?Z$;O1!SQ^"_2Y*P5$1.K46&Z.9$LY8V2
MA<(:CCZBA=?7<@)'98<"U?(&/-&<_O]-0LM%.<E6SO9M.T?['C2QN#AIA49A
CA-SR@R(5NPZ?>NP=P37YA43+YTNF5;M\%-\!R6H>L[,$  #[
 
end