Subject: Re: graphics/tiff does not create libtiffxx.so.3.7
To: None <asmodai@in-nomine.org>
From: Idar Tollefsen <idart@performancedesign.no>
List: tech-pkg
Date: 07/22/2005 15:12:18
This is a multi-part message in MIME format.
--------------060005080509070104090602
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

06/14/2005 10:39:56, Jeroen Ruigrok/asmodai wrote:
 > If you build the pkg, there should be a libtiff/.libs directory under
 > work/<pkgname>.
 > Does it have any *.so in that directory?

Yes, it has. libtiff.so.3.7.3 and symlinks, but only the symlinks to 
libtiffxx.so.3.7, not libtiffxx.so.3.7 itself.

I'm on Solaris 10, using SunPro (5.7).

I can't remember having this problem when I was using GCC (3.4.3), but if 
libtiffxx is a new addition, maybe it wasn't there then.

It's like libtool never writes out the actual library, but still creates the 
symlinks. There are no error messages until I try to actually install it. Then 
it tries to relink libtiffxx.so.3.7, thinks it succeeds (just like during the 
build itself), and then bombs out when it can't find it anyway.

I was wondering if this could be related to libtool's version_type setting. 
There's a devel/libtool/patch-ab that used to change version_type from "linux" 
to "sunos" for Solaris from revision 1.30 to 1.39. I tried to do the same here 
(change version_type), but it didn't help. Barking up the wrong tree I suppose.

Since graphics/tiff is required by quite a few other packages, I would suggest 
making the C++ library optional, at least until a fix for this has been found.

I've attached patches for Makefile, options.mk and PLIST and a new file, 
PLIST.cxx, that accomplishes this. Could someone take a look at them and, if 
they do what they're supposed to, maybe get them to someone who can get them in?

The new option is "cxx" and is on by default. I can successfully build and 
install graphics/tiff here if I apply these patches and set PKG_OPTIONS.tiff= 
${PKG_SUGGESTED_OPTIONS} -cxx. However, since I can't build the C++ library, I 
haven't tried these patches with "cxx" turned on.


- IT

--------------060005080509070104090602
Content-Type: text/plain;
 name="PLIST.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="PLIST.diff"

--- ../tiff.orig/PLIST	Fri Jul 22 12:15:11 2005
+++ PLIST	Fri Jul 22 12:20:48 2005
@@ -24,10 +24,8 @@
 include/tiff.h
 include/tiffconf.h
 include/tiffio.h
-include/tiffio.hxx
 include/tiffvers.h
 lib/libtiff.la
-lib/libtiffxx.la
 man/man1/bmp2tiff.1
 man/man1/fax2ps.1
 man/man1/fax2tiff.1

--------------060005080509070104090602
Content-Type: text/plain;
 name="Makefile.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="Makefile.diff"

--- ../tiff.orig/Makefile	Fri Jul 22 12:15:11 2005
+++ Makefile	Fri Jul 22 14:25:40 2005
@@ -13,16 +13,19 @@
 
 PKG_INSTALLATION_TYPES=	overwrite pkgviews
 
-USE_LANGUAGES=	c c++
 USE_LIBTOOL=	yes
 
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--enable-rpath
-CONFIGURE_ARGS+=	--enable-cxx
 CONFIGURE_ARGS+=	--with-docdir=${PREFIX}/share/doc/tiff
 
 .include "options.mk"
 
+.if !empty(PKG_OPTIONS:Mcxx)
+PLIST_SRC+=		PLIST.cxx
+USE_LANGUAGES+= 	c c++
+.endif
+
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../graphics/jpeg/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

--------------060005080509070104090602
Content-Type: text/plain;
 name="options.mk.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="options.mk.diff"

--- ../tiff.orig/options.mk	Fri Jul 22 12:15:11 2005
+++ options.mk	Fri Jul 22 12:27:49 2005
@@ -1,8 +1,8 @@
 # $NetBSD: options.mk,v 1.2 2005/05/31 10:01:37 dillo Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.tiff
-PKG_SUPPORTED_OPTIONS=	lzw
-PKG_SUGGESTED_OPTIONS=	lzw
+PKG_SUPPORTED_OPTIONS=	lzw cxx
+PKG_SUGGESTED_OPTIONS=	lzw cxx
 
 .include "../../mk/bsd.options.mk"
 
@@ -13,4 +13,13 @@
 CONFIGURE_ARGS+=	--enable-lzw
 .else
 CONFIGURE_ARGS+=	--disable-lzw
+.endif
+
+###
+### C++ library
+###
+.if !empty(PKG_OPTIONS:Mcxx)
+CONFIGURE_ARGS+=	--enable-cxx
+.else
+CONFIGURE_ARGS+=	--disable-cxx
 .endif

--------------060005080509070104090602
Content-Type: text/plain;
 name="PLIST.cxx"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="PLIST.cxx"

@comment $NetBSD: PLIST,v 1.0 2005/07/22 12:20:45 wiz Exp $
include/tiffio.hxx
lib/libtiffxx.la

--------------060005080509070104090602--