pkgsrc-Bugs archive

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

pkg/42468: devel/physfs fails to build on Darwin / OSX because of missing linker flag ( patch included )



>Number:         42468
>Category:       pkg
>Synopsis:       devel/physfs fails to build on Darwin / OSX because of missing 
>linker flag ( patch included )
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 17 17:50:00 +0000 2009
>Originator:     Emmanuel Kasper
>Release:        
>Organization:
>Environment:
uname -srm
Darwin 9.8.0 Power Macintosh
>Description:
===> Building for physfs-1.0.1nb1
/Volumes/Projects/netbsd/bin/bmake  all-recursive
/bin/sh ./libtool --mode=link gcc  -O2 -pipe -O2 
-I/Volumes/Projects/netbsd/include -I/usr/include -D_REENTRANT -D_REENTRANT 
-D_THREAD_SAFE   -L/V
olumes/Projects/netbsd/lib -L/usr/lib  -Wl,-framework -Wl,Carbon -Wl,-framework 
-Wl,IOKit -no-undefined -o test_physfs  test_physfs.o ./libphysfs.
la -lpthread -lz
gcc -O2 -pipe -O2 
-I/Volumes/Projects/netbsd/pkgsrc/devel/physfs/work/.buildlink/include 
-D_REENTRANT -D_THREAD_SAFE -Wl,-framework -Wl,Carbon -Wl
,-framework -Wl,IOKit -o .libs/test_physfs test_physfs.o  
-L/Volumes/Projects/netbsd/pkgsrc/devel/physfs/work/.buildlink/lib 
./.libs/libphysfs.dyl
ib -lpthread -lz
Undefined symbols:
  "_readline", referenced from:
      _main in test_physfs.o
  "_add_history", referenced from:
      _main in test_physfs.o
      _main in test_physfs.o
ld: symbol(s) not found
>How-To-Repeat:
bmake build
>Fix:
add missing linker flag like MacPorts did ( 
http://trac.macports.org/changeset/11813 )
attached patch does exactly ( and only ) that

--- Makefile.orig       2009-12-17 18:16:56.000000000 +0100
+++ Makefile    2009-12-17 18:38:06.000000000 +0100
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2008/06/12 02:14:28 joerg Exp $
+# $NetBSD: Makefile,v 0.16 2008/06/12 02:14:28 joerg Exp $
 #
 
 DISTNAME=              physfs-1.0.1
@@ -18,6 +18,12 @@
 CONFIGURE_ARGS+=       --enable-pthreads
 PTHREAD_AUTO_VARS=     yes
 
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "Darwin"
+LDFLAGS+=      -lreadline
+.endif
+
+
 .include "../../devel/readline/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 



Home | Main Index | Thread Index | Old Index