Bug 185951 - astro/cfitsio: DT_SONAME of libcfitsio.so.0 points to nonexisting file
Summary: astro/cfitsio: DT_SONAME of libcfitsio.so.0 points to nonexisting file
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 03:10 UTC by Florian Degner
Modified: 2014-02-05 20:10 UTC (History)
0 users

See Also:


Attachments
libcfitsio.patch (1.82 KB, patch)
2014-01-21 10:46 UTC, Florian Degner
no flags Details | Diff
libcfitsio.patch (1.99 KB, patch)
2014-01-22 12:55 UTC, Florian Degner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Degner 2014-01-21 03:10:00 UTC
The DT_SONAME entry of libcfitsio.so.0 points to libcfitsio.so.0.1, which does not exist. This causes dynamic linking to fail.

% pkg info -x cfitsio 
cfitsio-3.350

% grep FreeBSD: /usr/ports/astro/cfitsio/Makefile 
# $FreeBSD: astro/cfitsio/Makefile 334877 2013-11-25 18:14:33Z sunpoet $

% /usr/bin/objdump -p /usr/local/lib/libcfitsio.so.0 | grep SONAME                                                  
  SONAME      libcfitsio.so.0.1

% ls -F1 /usr/local/lib/libcfitsio.*
/usr/local/lib/libcfitsio.so@
/usr/local/lib/libcfitsio.so.0

% kstars
Shared object "libcfitsio.so.0.1" not found, required by "kstars"

Fix: 

As a workaround, one can create a symlink for the missing library:

# ln -s /usr/local/lib/libcfitsio.so /usr/local/lib/libcfitsio.so.0.1
How-To-Repeat: Link a program against libcfitsio and try to run it.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-21 03:10:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sunpoet

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Florian Degner 2014-01-21 10:46:25 UTC
The attached patch should fix the version mess and bring the library  
version in line with upstream. The library's version bump potentially  
affects the following ports, which need to be rebuild if installed:

% find /usr/ports/ -mindepth 3 -maxdepth 3 -type f -name "Makefile*" |  
xargs -P8 grep -l "cfitsio" | cut -d/ -f4,5 | sort
astro/cfitsio
astro/kstars
astro/p5-Astro-FITS-CFITSIO
astro/wcslib
graphics/gdal
graphics/ufraw
math/octave-forge-fits
science/kst2
%

Please note that this patch also changes astro/kstars which explicitly  
lists libcfitsio.so.0 as a dependency in its Makefile.
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-01-21 20:31:57 UTC
"Florian Degner" <f.degner@gmx.de> writes:

> The attached patch should fix the version mess and bring the library
> version in line with upstream. The library's version bump potentially
> affects the following ports, which need to be rebuild if installed:
>
> % find /usr/ports/ -mindepth 3 -maxdepth 3 -type f -name "Makefile*" |
> xargs -P8 grep -l "cfitsio" | cut -d/ -f4,5 | sort
> astro/cfitsio
> astro/kstars
> astro/p5-Astro-FITS-CFITSIO
> astro/wcslib
> graphics/gdal
> graphics/ufraw
> math/octave-forge-fits
> science/kst2
> %
>
> Please note that this patch also changes astro/kstars which explicitly
> lists libcfitsio.so.0 as a dependency in its Makefile.

Looks totally OK from the KDE side of things; it would be good if you
could switch the LIB_DEPENDS format in kstarts to the new syntax (ie.
libcfitsio.so:${PORTSDIR}/astro/cfitsio).

And whoever commits this patch should bump PORTREVISON where necessary.
Comment 4 Florian Degner 2014-01-22 12:55:06 UTC
On Tue, 21 Jan 2014 21:31:57 +0100, Raphael Kubo da Costa <rakuco@freebsd.org> wrote:

> Looks totally OK from the KDE side of things; it would be good if you
> could switch the LIB_DEPENDS format in kstarts to the new syntax (ie.
> libcfitsio.so:${PORTSDIR}/astro/cfitsio).
>
> And whoever commits this patch should bump PORTREVISON where necessary.


Take #2...
Comment 5 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-01-22 14:23:44 UTC
"Florian Degner" <f.degner@gmx.de> writes:

>  do-install:
>  	cd ${WRKSRC}/ && ${INSTALL_DATA} drvrsmem.h fitsio.h fitsio2.h longnam.h ${STAGEDIR}${PREFIX}/include/
> -	cd ${WRKSRC}/ && ${INSTALL_LIB} libcfitsio.so.0 ${STAGEDIR}${PREFIX}/lib/
> +	cd ${WRKSRC}/ && ${INSTALL_LIB} libcfitsio.so.1.3.35 ${STAGEDIR}${PREFIX}/lib/
>  	cd ${WRKSRC}/ && ${INSTALL_DATA} cfitsio.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/
> -	${LN} -fs libcfitsio.so.0 ${STAGEDIR}${PREFIX}/lib/libcfitsio.so
> +	${LN} -fs libcfitsio.so.1.3.35 ${STAGEDIR}${PREFIX}/lib/libcfitsio.so.1
> +	${LN} -fs libcfitsio.so.1 ${STAGEDIR}${PREFIX}/lib/libcfitsio.so

I couldn't help taking a look at the port's build system myself, and it
looks like it already takes care of creating the appropriate symlinks,
so just installing libcfitsio.so, libcfitsio.so.1 and
libcfitsio.so.1.3.35 and removing all the ${LN} calls should work and
look cleaner.

The kstars change looks fine (with my kde@ hat).
Comment 6 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-01-23 09:31:17 UTC
(CC'ing everyone again)

"Florian Degner" <f.degner@gmx.de> writes:
> On Wed, 22 Jan 2014 15:23:44 +0100, Raphael Kubo da Costa
> <rakuco@freebsd.org> wrote:
>
>> I couldn't help taking a look at the port's build system myself, and it
>> looks like it already takes care of creating the appropriate symlinks,
>> so just installing libcfitsio.so, libcfitsio.so.1 and
>> libcfitsio.so.1.3.35 and removing all the ${LN} calls should work and
>> look cleaner.
>
> Hi,
>
> hmm, this does not seem to work. Using any of the INSTALL_* macros
> results in the symlinks being followed. I took a look at other ports
> that install shared libs and they all seem to use ${LN} to create such
> symlinks.

Indeed, our INSTALL_* commands don't pass -l. Too bad we're not using
make install. Please disregard my last suggestion then :-)
Comment 7 dfilter service freebsd_committer freebsd_triage 2014-02-05 20:02:34 UTC
Author: sunpoet
Date: Wed Feb  5 20:02:27 2014
New Revision: 342829
URL: http://svnweb.freebsd.org/changeset/ports/342829
QAT: https://qat.redports.org/buildarchive/r342829/

Log:
  - Fix shared library installation
  - Bump PORTREVISION for package change
  - While I'm here, convert to new LIB_DEPENDS format
  
  PR:		ports/185951
  Submitted by:	Florian Degner <f.degner@gmx.de>

Modified:
  head/astro/cfitsio/Makefile
  head/astro/cfitsio/pkg-plist

Modified: head/astro/cfitsio/Makefile
==============================================================================
--- head/astro/cfitsio/Makefile	Wed Feb  5 19:56:17 2014	(r342828)
+++ head/astro/cfitsio/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
@@ -3,6 +3,7 @@
 
 PORTNAME=	cfitsio
 PORTVERSION=	3.350
+PORTREVISION=	1
 CATEGORIES=	astro
 MASTER_SITES=	http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/ \
 		http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/oldvers/ \
@@ -27,18 +28,21 @@ USE_LDCONFIG=	yes
 USES=		pkgconfig
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
+PLIST_SUB=	SHLIB_VER=${SHLIB_VER}
 PORTDOCS=	*
 
+SHLIB_VER=	1.${PORTVERSION:S/0$//}
+
 post-patch:
-	@${REINPLACE_CMD} -e 's|="\.so"|=".so.0"|g' ${WRKSRC}/configure
 	@${MV} ${WRKSRC}/zlib.h ${WRKSRC}/zlib.h.dist
 	@${GREP} -lR "<malloc.\h>" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e 's|<malloc\.h>|<stdlib.h>|g'
 
 do-install:
 	cd ${WRKSRC}/ && ${INSTALL_DATA} drvrsmem.h fitsio.h fitsio2.h longnam.h ${STAGEDIR}${PREFIX}/include/
-	cd ${WRKSRC}/ && ${INSTALL_LIB} libcfitsio.so.0 ${STAGEDIR}${PREFIX}/lib/
+	cd ${WRKSRC}/ && ${INSTALL_LIB} libcfitsio.so.${SHLIB_VER} ${STAGEDIR}${PREFIX}/lib/
 	cd ${WRKSRC}/ && ${INSTALL_DATA} cfitsio.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/
-	${LN} -fs libcfitsio.so.0 ${STAGEDIR}${PREFIX}/lib/libcfitsio.so
+	${LN} -fs libcfitsio.so.${SHLIB_VER} ${STAGEDIR}${PREFIX}/lib/libcfitsio.so.1
+	${LN} -fs libcfitsio.so.1 ${STAGEDIR}${PREFIX}/lib/libcfitsio.so
 	${MKDIR} ${STAGEDIR}${DOCSDIR}/
 	${INSTALL_DATA} ${WRKSRC}/*.doc ${STAGEDIR}${DOCSDIR}/
 

Modified: head/astro/cfitsio/pkg-plist
==============================================================================
--- head/astro/cfitsio/pkg-plist	Wed Feb  5 19:56:17 2014	(r342828)
+++ head/astro/cfitsio/pkg-plist	Wed Feb  5 20:02:27 2014	(r342829)
@@ -3,5 +3,6 @@ include/fitsio.h
 include/fitsio2.h
 include/longnam.h
 lib/libcfitsio.so
-lib/libcfitsio.so.0
+lib/libcfitsio.so.1
+lib/libcfitsio.so.%%SHLIB_VER%%
 libdata/pkgconfig/cfitsio.pc
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2014-02-05 20:02:43 UTC
Author: sunpoet
Date: Wed Feb  5 20:02:34 2014
New Revision: 342830
URL: http://svnweb.freebsd.org/changeset/ports/342830
QAT: https://qat.redports.org/buildarchive/r342830/

Log:
  - Bump PORTREVISION for astro/cfitsio shlib change
  - While I'm here, convert to new LIB_DEPENDS format
  
  PR:		ports/185951
  Submitted by:	Florian Degner <f.degner@gmx.de>

Modified:
  head/astro/kstars/Makefile
  head/astro/p5-Astro-FITS-CFITSIO/Makefile
  head/astro/wcslib/Makefile
  head/graphics/gdal/Makefile
  head/graphics/ufraw/Makefile
  head/math/octave-forge-fits/Makefile
  head/science/kst2/Makefile

Modified: head/astro/kstars/Makefile
==============================================================================
--- head/astro/kstars/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
+++ head/astro/kstars/Makefile	Wed Feb  5 20:02:34 2014	(r342830)
@@ -2,6 +2,7 @@
 
 PORTNAME=	kstars
 PORTVERSION=	${KDE4_VERSION}
+PORTREVISION=	1
 CATEGORIES=	astro kde
 MASTER_SITES=	${MASTER_SITE_KDE}
 MASTER_SITE_SUBDIR=	${KDE4_BRANCH}/${PORTVERSION}/src
@@ -10,8 +11,8 @@ DIST_SUBDIR=	KDE/${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 desktop planetarium
 
-LIB_DEPENDS=	cfitsio.0:${PORTSDIR}/astro/cfitsio \
-		wcs:${PORTSDIR}/astro/wcslib
+LIB_DEPENDS=	libcfitsio.so:${PORTSDIR}/astro/cfitsio \
+		libwcs.so:${PORTSDIR}/astro/wcslib
 
 BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/eigen2.pc:${PORTSDIR}/math/eigen2 \
 		xplanet:${PORTSDIR}/astro/xplanet

Modified: head/astro/p5-Astro-FITS-CFITSIO/Makefile
==============================================================================
--- head/astro/p5-Astro-FITS-CFITSIO/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
+++ head/astro/p5-Astro-FITS-CFITSIO/Makefile	Wed Feb  5 20:02:34 2014	(r342830)
@@ -3,6 +3,7 @@
 
 PORTNAME=	Astro-FITS-CFITSIO
 PORTVERSION=	1.10
+PORTREVISION=	1
 CATEGORIES=	astro perl5
 MASTER_SITES=	CPAN
 PKGNAMEPREFIX=	p5-

Modified: head/astro/wcslib/Makefile
==============================================================================
--- head/astro/wcslib/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
+++ head/astro/wcslib/Makefile	Wed Feb  5 20:02:34 2014	(r342830)
@@ -3,6 +3,7 @@
 
 PORTNAME=	wcslib
 PORTVERSION=	4.13.4
+PORTREVISION=	1
 CATEGORIES=	astro
 MASTER_SITES=	ftp://ftp.atnf.csiro.au/pub/software/wcslib/
 

Modified: head/graphics/gdal/Makefile
==============================================================================
--- head/graphics/gdal/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
+++ head/graphics/gdal/Makefile	Wed Feb  5 20:02:34 2014	(r342830)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gdal
 PORTVERSION=	1.10.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	graphics geography
 MASTER_SITES=	http://download.osgeo.org/gdal/${PORTVERSION}/ \
 		ftp://ftp.remotesensing.org/pub/gdal/${PORTVERSION}/ \

Modified: head/graphics/ufraw/Makefile
==============================================================================
--- head/graphics/ufraw/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
+++ head/graphics/ufraw/Makefile	Wed Feb  5 20:02:34 2014	(r342830)
@@ -3,6 +3,7 @@
 
 PORTNAME=	ufraw
 PORTVERSION=	0.19.2
+PORTREVISION=	1
 CATEGORIES=	graphics
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
@@ -47,25 +48,25 @@ CONFIGURE_ARGS+=	--enable-dst-correction
 .endif
 
 .if ${PORT_OPTIONS:MEXIV2}
-LIB_DEPENDS+=	exiv2:${PORTSDIR}/graphics/exiv2
+LIB_DEPENDS+=	libexiv2.so:${PORTSDIR}/graphics/exiv2
 .else
 PC_FALSE+=	exiv2
 .endif
 
 .if ${PORT_OPTIONS:MLENSFUN}
-LIB_DEPENDS+=	lensfun:${PORTSDIR}/graphics/lensfun
+LIB_DEPENDS+=	liblensfun.so:${PORTSDIR}/graphics/lensfun
 .else
 PC_FALSE+=	lensfun
 .endif
 
 .if ${PORT_OPTIONS:MFITS}
-LIB_DEPENDS+=	cfitsio:${PORTSDIR}/astro/cfitsio
+LIB_DEPENDS+=	libcfitsio.so:${PORTSDIR}/astro/cfitsio
 .else
 PC_FALSE+=	cfitsio
 .endif
 
 .if ${PORT_OPTIONS:MGIMP}
-LIB_DEPENDS+=	gimp-2.0:${PORTSDIR}/graphics/gimp-app
+LIB_DEPENDS+=	libgimp-2.0.so:${PORTSDIR}/graphics/gimp-app
 PLIST_SUB+=	GIMP=""
 .else
 CONFIGURE_ARGS+=--without-gimp
@@ -74,7 +75,7 @@ PLIST_SUB+=	GIMP="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MGTK2}
-LIB_DEPENDS+=	gtkimageview:${PORTSDIR}/x11-toolkits/gtkimageview
+LIB_DEPENDS+=	libgtkimageview.so:${PORTSDIR}/x11-toolkits/gtkimageview
 PLIST_SUB+=	MGTK2=""
 .else
 PLIST_SUB+=	MGTK2="@comment "

Modified: head/math/octave-forge-fits/Makefile
==============================================================================
--- head/math/octave-forge-fits/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
+++ head/math/octave-forge-fits/Makefile	Wed Feb  5 20:02:34 2014	(r342830)
@@ -3,7 +3,7 @@
 
 PORTNAME=	octave-forge-fits
 PORTVERSION=	1.0.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	math
 
 MAINTAINER=	stephen@FreeBSD.org
@@ -17,7 +17,7 @@ OCTSRC=		${OCTAVE_PKGNAME}
 
 WRKSRC=	${WRKDIR}/${OCTSRC}/src
 
-LIB_DEPENDS+=	cfitsio:${PORTSDIR}/astro/cfitsio
+LIB_DEPENDS+=	libcfitsio.so:${PORTSDIR}/astro/cfitsio
 
 .include "${.CURDIR}/../../Mk/bsd.octave.mk"
 

Modified: head/science/kst2/Makefile
==============================================================================
--- head/science/kst2/Makefile	Wed Feb  5 20:02:27 2014	(r342829)
+++ head/science/kst2/Makefile	Wed Feb  5 20:02:34 2014	(r342830)
@@ -3,7 +3,7 @@
 
 PORTNAME=	kst
 DISTVERSION=	2.0.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	science kde
 MASTER_SITES=	SF/${PORTNAME}/Kst%20${DISTVERSION:C/-r.*//}/
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 9 Po-Chuan Hsieh freebsd_committer freebsd_triage 2014-02-05 20:05:40 UTC
State Changed
From-To: open->closed

Committed. Thanks!