tech-pkg archive

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

Re: [PATCH] devel/dmalloc: libdmalloc.a stripped and unusable



Hello,

On Sat, Apr 20, 2019 at 07:50:50PM +0200, Roland Illig wrote:
> Am 20.04.2019 um 18:17 schrieb tlaronde%polynum.com@localhost:
> > Hello,
> >
> > The static library libdmalloc.a is stripped at install time (the index
> > is generated by ranlib when building, but the installed version is
> > totally stripped rending it unable to be linked).
>>[...]
> 
> Did you look in work/.wrapper.log? Since strip has a wrapper, that
> wrapper should be called during the build.
> 
> If you find the command there, you can define:
> 
> TOOLS_SCRIPT.strip= \
>     echo "strip is called with $$*" 1>/dev/tty; \
>     read line; \
>     ${TOOLS_PLATFORM.strip}
> 
> This will pause the build whenever the strip wrapper is called.
> 
> If that doesn't help, you will probably have to make /usr/bin/strip a
> wrapper that logs all its calls.

Well, in the Makefile generated from Makefile.in, INSTALL_PROGRAM is set
to "/usr/bin/install" with the "-s" flag.

And the static library is installed with INSTALL_PROGRAM instead of
INSTALL_DATA, resulting in the static library being stripped (while
ranlib has been invoked at creation) with a totally useless call of
ranlib after installation on the then stripped library: the information
is lost.

So I changed the patch to be applied to Makefile.in.orig.

Here is the diff for whoever can commit.

Best regards,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C
? dmalloc.diff
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/dmalloc/distinfo,v
retrieving revision 1.8
diff -u -r1.8 distinfo
--- distinfo	3 Nov 2015 03:27:23 -0000	1.8
+++ distinfo	20 Apr 2019 20:05:48 -0000
@@ -4,4 +4,4 @@
 RMD160 (dmalloc-5.5.2.tgz) = 2cfe4daa453337e0fae0656bdbdaad1214d6243d
 SHA512 (dmalloc-5.5.2.tgz) = 96bb94aeb2bc3220f652b5294bdf8592b984cb2a53e5f02b2b8d52450c3396d18651f334644cdfff9c85a8c0d0cedc7f6a18b9d70497b2c6b5f85dbd1e827b93
 Size (dmalloc-5.5.2.tgz) = 666608 bytes
-SHA1 (patch-aa) = 04ce2571172eb7ed60aa9d4fa98a5cad0e88aec8
+SHA1 (patch-aa) = f3703ea65bb61ed42a911e33273c5581d03cf3da
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/devel/dmalloc/patches/patch-aa,v
retrieving revision 1.3
diff -u -r1.3 patch-aa
--- patches/patch-aa	11 Feb 2010 18:35:07 -0000	1.3
+++ patches/patch-aa	20 Apr 2019 20:05:48 -0000
@@ -1,8 +1,16 @@
-$NetBSD: patch-aa,v 1.3 2010/02/11 18:35:07 drochner Exp $
-
---- Makefile.in.orig	2007-05-14 17:26:14.000000000 +0000
-+++ Makefile.in
-@@ -257,7 +257,7 @@ shlib : $(BUILD_SL)
+--- Makefile.in.orig	2007-05-14 19:26:14.000000000 +0200
++++ Makefile.in	2019-04-20 21:59:25.962311461 +0200
+@@ -217,8 +217,7 @@
+ 
+ installlib : $(INSTALL_LIB)
+ 	$(srcdir)/mkinstalldirs $(libdir)
+-	$(INSTALL_PROGRAM) $(LIBRARY) $(libdir)
+-	@RANLIB@ $(libdir)/$(LIBRARY)
++	$(INSTALL_DATA) $(LIBRARY) $(libdir)
+ @SL_OFF@	@echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
+ @CXX_OFF@	@echo "Enter 'make installcxx' to install the C++ library"
+ @TH_OFF@	@echo "Enter 'make installth' to install thread library"
+@@ -257,7 +256,7 @@
  # via: http://256.com/gray/email.html
  $(LIB_SL) : $(LIBRARY)
  	rm -f $@ $@.t
@@ -11,7 +19,7 @@
  	mv $@.t $@
  
  $(LIBRARY) : $(OBJS) $(NORMAL_OBJS)
-@@ -270,7 +270,7 @@ $(LIB_TH) : $(OBJS) $(THREAD_OBJS)
+@@ -270,7 +269,7 @@
  
  $(LIB_TH_SL) : $(LIB_TH)
  	rm -f $@ $@.t
@@ -20,7 +28,7 @@
  	mv $@.t $@
  
  $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS)
-@@ -279,7 +279,7 @@ $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CX
+@@ -279,7 +278,7 @@
  
  $(LIB_CXX_SL) : $(LIB_CXX)
  	rm -f $@ $@.t
@@ -29,7 +37,7 @@
  	mv $@.t $@
  
  $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS)
-@@ -288,7 +288,7 @@ $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $
+@@ -288,7 +287,7 @@
  
  $(LIB_TH_CXX_SL) : $(LIB_TH_CXX)
  	rm -f $@ $@.t


Home | Main Index | Thread Index | Old Index