Subject: Re: Problem with shared library handling on 1.5 a.out?
To: Nick Hudson <skrll@netbsd.org>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 05/16/2001 14:31:12
On Wed, May 16, 2001 at 01:06:40PM +0100, Nick Hudson wrote:
> Nick Hudson wrote:
> > 
> 
> > The problem is definitely in the automatic shlib handling. I should have
> > a fix soon.
> 
> Please try the attached patch.
> 
> Nick
> -- 
> aka skrll@netbsd.org, skrll@excite.co.uk
> Index: bsd.pkg.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
> retrieving revision 1.733
> diff -c -r1.733 bsd.pkg.mk
> *** bsd.pkg.mk	2001/05/09 10:25:38	1.733
> --- bsd.pkg.mk	2001/05/16 12:05:03
> ***************
> *** 1877,1882 ****
> --- 1877,1885 ----
>   					links[linkc++] = $$0;		\
>   					sub("\.[0-9]+$$", "");		\
>   					links[linkc++] = $$0;		\
> + 					if (sub("-[^-]+\.so$$", "\.so")) { \
> + 						links[linkc++] = $$0;	\
> + 					}				\
>   					next				\
>   				}					\
>   				/.*\/lib[^\/]+\.so\.[0-9]+\.[0-9]+$$/ {	\
> ***************
> *** 1886,1891 ****
> --- 1889,1897 ----
>   					links[linkc++] = $$0;		\
>   					sub("\.[0-9]+$$", "");		\
>   					links[linkc++] = $$0;		\
> + 					if (sub("-[^-]+\.so$$", "\.so")) { \
> + 						links[linkc++] = $$0;	\
> + 					}				\
>   					next				\
>   				}					\
>   				{ lines[NR] = $$0 }			\
> 

From my reading of these patches, what will happen is that, if we're
on an a.out platform, and we get a PLIST entry of the form
libnnnn-i.j.so.1.2, then you'll comment the libnnnn.so entry out of
the generated PLIST.

But, to quote from the original query:

>         Trying to create a gimp package on a fresh 1.5.1_BETA2 arm32
>         system gives:
> 
> ===> [Automatic a.out shared object handling]
> ls: /usr/X11R6/lib/libgck.so: No such file or directory
> ls: /usr/X11R6/lib/libgimp.so: No such file or directory
> ls: /usr/X11R6/lib/libgimpui.so: No such file or directory
> ===> Registering installation for gimp-1.2.1
> pkg_create: can't stat `/usr/X11R6/lib/libgck.so'
> pkg_create: can't stat `/usr/X11R6/lib/libgimp.so'
> pkg_create: can't stat `/usr/X11R6/lib/libgimpui.so'
> 
> % ls /usr/X11R6/lib/libgck*
> /usr/X11R6/lib/libgck-1.2.so.0.1        /usr/X11R6/lib/libgck.la
> /usr/X11R6/lib/libgck.a                 /usr/X11R6/lib/libgck.so.0.1

and the PLIST has:

lib/libgck-1.2.so
lib/libgck-1.2.so.0
lib/libgck-1.2.so.0.1
lib/libgck.a
lib/libgck.la
lib/libgck.so

So you should really be removing the lib/libgck.so entry, and adding
the lib/libgck.so.0.1 entry - my reading of the patch above is that
only the first part is achieved.

Regards,
Alistair