[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Release-critical Bugreport for December 7, 1998



Nice to see some discussion on how to build shared libs ...

Adam Di Carlo writes:
 > In article <[🔎] 19981208222718.B18101@gate.cks.com>, David Welton <davidw@gate.cks.com> writes:
 > My jade package ships two binary packages (jade, sp) which depend on
 > libsp1; there's libsp1-dev to boot.  See the rules file for the source
 > package, but what I do in a nutshell is (from build-arch rule):
 > 
 > 	echo "libsp1:ShlibVersion=libsp1 (>= $(SHLIBS_PKGVER))" \
 > 	    >> debian/substvars

Nice. Although the lines are doubled if you run the binary target
twice (And the variable name could be something like libsp1:Dependency).
Perhaps a dh_substvars command would be helpful which replaces an
already existing variable name.

 > 	...
 > 	echo "libsp      1 libsp1 (>= $(SHLIBS_PKGVER))" > debian/shlibs.local
 > 	echo "libgrove   1 libsp1 (>= $(SHLIBS_PKGVER))" >> debian/shlibs.local
 > 	echo "libspgrove 1 libsp1 (>= $(SHLIBS_PKGVER))" >> debian/shlibs.local
 > 	echo "libstyle   1 libsp1 (>= $(SHLIBS_PKGVER))" >> debian/shlibs.local

That's overworked. You already have the dependency in the control
file. echo "libsp 1" > debian/shlibs.local is enough to ignore the
dependency that dpkg-shlibdeps finds.

 > 	...
 > 	LD_LIBRARY_PATH=$(prefix-libsp1)/usr/lib			\
 > 	  LD_PRELOAD=							\
 > 	  dpkg-shlibdeps -pshlibs-sp $(bindir-sp)/*

Should be noted that $(prefix-libsp1) is an absolute path, else
dpkg-shlibdeps won't recognize the ldd output.

To simplify this: Would it be wrong, if the debhelper dh_shlibdeps
searches for shared libs and sets the LD_LIBRARY_PATH itself?

Why is the LD_PRELOAD needed?

 > Note I've statically set 'SHLIBS_PKGVER := 1.2-1' -- this controls
 > backwards shlibs compability.  Generally, you can determine from just
 > the major version of your package, but mistakes can happen.
 > 
 > And then I reference these new variables in my control file:
 > 
 >   Package: sp
 >   Architecture: any
 >   Depends: ${shlibs-sp:Depends}, ${libsp1:ShlibVersion}
 > 
 > It's pretty hairy but it works fine.  Of course there are more little
 > details; see the whole rules file for an example.

And it's pretty critical that this isn't described anywhere. I don't
want to know how many shared libs are not correctly built ...
Where does the documentation belong to? In the packaging manual?


Reply to: