Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2005 11:50:20 -0600 (MDT)
From:      "James E. Flemer" <jflemer@alum.rpi.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        ports@oven.org
Subject:   ports/84917: [patch] audio/id3lib - fix shared lib linking
Message-ID:  <200508141750.j7EHoK69084707@psi.speednaked.com>
Resent-Message-ID: <200508141800.j7EI0S5j075697@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84917
>Category:       ports
>Synopsis:       [patch] audio/id3lib - fix shared lib linking
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 14 18:00:27 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     James E. Flemer
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
n/a
>Environment:
System: FreeBSD psi.speednaked.com 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Wed Jul 13 23:20:03 MDT 2005 jflemer@psi.speednaked.com:/usr/obj/usr/src/sys/PSI6 i386

>Description:
	As currently built, libid3.so is linked using cc, not c++.  Since
	ID3lib is C++ code, this leaves many undefined C++ symbols in the
	shared lib.  Similarly, libz is not linked when building libid3.so,
	leaving those symbols undefined as well.

	The responsibility to link with c++ and libz now falls on the
	application using ID3lib.  Since ID3lib is supposed to provide
	a C interface, having to link with c++ is not acceptable.
>How-To-Repeat:
	Observe all the missing symbols with the following test.

	--- broke.c ---
	#include <id3.h>
	int main() {
		ID3Tag_New();
		return 0;
	}
	--- end ---
	cc -I/usr/local/include -L/usr/local/lib broke.c -lid3
>Fix:

#
# o Use libtool 1.5 so that the shared lib is linked with c++
#   not cc.
#
# o Using libtool 1.5 generates one more symlink for the shared
#   libs, add it to the plist.
#
# o Remove libtool 1.3 hacks from the configure script.
#
# o Patch configure script to link libz with libid3 so that
#   the responsibility does not fall on the application using
#   id3lib.
#

--- audio-id3lib.diff begins here ---
Index: audio/id3lib/Makefile
===================================================================
RCS file: /home/ncvs/ports/audio/id3lib/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- audio/id3lib/Makefile	9 Jul 2004 17:41:52 -0000	1.19
+++ audio/id3lib/Makefile	14 Aug 2005 17:33:21 -0000
@@ -16,7 +16,7 @@
 COMMENT=	Library for manipulating ID3v1/v1.1 and ID3v2 tags
 
 USE_ICONV=	yes
-USE_INC_LIBTOOL_VER=	13
+USE_LIBTOOL_VER=	15
 CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 INSTALLS_SHLIB=	yes
 
Index: audio/id3lib/pkg-plist
===================================================================
RCS file: /home/ncvs/ports/audio/id3lib/pkg-plist,v
retrieving revision 1.6
diff -u -r1.6 pkg-plist
--- audio/id3lib/pkg-plist	3 Jan 2004 11:02:43 -0000	1.6
+++ audio/id3lib/pkg-plist	14 Aug 2005 17:33:21 -0000
@@ -16,6 +16,7 @@
 include/id3/utils.h
 include/id3/writer.h
 include/id3/writers.h
+lib/libid3-3.8.so
 lib/libid3-3.8.so.3
 lib/libid3.a
 lib/libid3.so
Index: audio/id3lib/files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/audio/id3lib/files/patch-configure,v
retrieving revision 1.1
diff -u -r1.1 patch-configure
--- audio/id3lib/files/patch-configure	28 Jan 2003 12:59:13 -0000	1.1
+++ audio/id3lib/files/patch-configure	14 Aug 2005 17:33:21 -0000
@@ -1,10 +1,11 @@
---- configure.orig	Sun Nov 24 09:23:00 2002
-+++ configure	Fri Jan 24 01:05:47 2003
-@@ -7612,6 +7612,7 @@
+# $FreeBSD$
+--- configure.orig	Sun Aug 14 11:21:37 2005
++++ configure	Sun Aug 14 11:29:43 2005
+@@ -9134,6 +9134,7 @@
+ else
+   ID3_NEEDZLIB_TRUE='#'
+   ID3_NEEDZLIB_FALSE=
++  LIBS="-lz $LIBS"
+ fi
  
- # This can be used to rebuild libtool when needed
- LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
  
- # Always use our own libtool.
- LIBTOOL='$(SHELL) $(top_builddir)/libtool'
--- audio-id3lib.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508141750.j7EHoK69084707>