Subject: Re: pkg/29215: lang/tcl build fails on MacOS X 10.[12].x after mk/wrapper changes
To: None <jlam@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org>
From: Min Sik Kim <minskim@NetBSD.org>
List: pkgsrc-bugs
Date: 02/14/2005 04:21:01
The following reply was made to PR pkg/29215; it has been noted by GNATS.

From: Min Sik Kim <minskim@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: jlam@NetBSD.org
Subject: Re: pkg/29215: lang/tcl build fails on MacOS X 10.[12].x after mk/wrapper changes
Date: Sun, 13 Feb 2005 22:20:10 -0600

 On Feb 3, 2005, at 12:33 PM, jdbaker@netbsd.org wrote:
 > Building lang/tcl fails as follows:
 >
 > gcc -pipe -dynamiclib ${wl}-flat_namespace ${wl}-undefined 
 > ${wl}suppress -o .libs/libtcl84.1.0.0.dylib  .libs/regcomp.o 
 > .libs/regexec.o .libs/regfree.o .libs/regerror.o .libs/tclAlloc.o 
 > .libs/tclAsync.o .libs/tclBasic.o .libs/tclBinary.o .libs/tclCkalloc.o 
 > .libs/tclClock.o .libs/tclCmdAH.o .libs/tclCmdIL.o .libs/tclCmdMZ.o 
 > .libs/tclCompCmds.o .libs/tclCompExpr.o .libs/tclCompile.o 
 > .libs/tclDate.o .libs/tclEncoding.o .libs/tclEnv.o .libs/tclEvent.o 
 > .libs/tclExecute.o .libs/tclFCmd.o .libs/tclFileName.o .libs/tclGet.o 
 > .libs/tclHash.o .libs/tclHistory.o .libs/tclIndexObj.o 
 > .libs/tclInterp.o .libs/tclIO.o .libs/tclIOCmd.o .libs/tclIOGT.o 
 > .libs/tclIOSock.o .libs/tclIOUtil.o .libs/tclLink.o .libs/tclListObj.o 
 > .libs/tclLiteral.o .libs/tclLoad.o .libs/tclMain.o .libs/tclNamesp.o 
 > .libs/tclNotify.o .libs/tclObj.o .libs/tclPanic.o .libs/tclParse.o 
 > .libs/tclParseExpr.o .libs/tclPipe.o .libs/tclPkg.o 
 > .libs/tclPosixStr.o .libs/tclPreserve.o .libs/tclProc.o 
 > .libs/tclRegexp.o .libs/tclResolv
 >  e.o .libs/tclResult.o .libs/tclScan.o .libs/tclStringObj.o 
 > .libs/tclThread.o .libs/tclThreadAlloc.o .libs/tclThreadJoin.o 
 > .libs/tclStubInit.o .libs/tclStubLib.o .libs/tclTimer.o .libs/tclUtf.o 
 > .libs/tclUtil.o .libs/tclVar.o .libs/tclUnixChan.o 
 > .libs/tclUnixEvent.o .libs/tclUnixFCmd.o .libs/tclUnixFile.o 
 > .libs/tclUnixPipe.o .libs/tclUnixSock.o .libs/tclUnixTime.o 
 > .libs/tclUnixInit.o .libs/tclUnixThrd.o .libs/tclUnixNotfy.o 
 > .libs/tclLoadDyld.o .libs/tclMacOSXBundle.o  
 > -L/Volumes/NetBSD/tmp/pkgsrc/lang/tcl/work/.buildlink/lib -ltcl84  
 > -install_name  /usr/pkg/lib/libtcl84.1.dylib 
 > -Wl,-compatibility_version -Wl,2 -Wl,-current_version -Wl,2.0
 > /usr/bin/libtool: can't locate file for: -ltcl84
 > /usr/bin/libtool: file: -ltcl84 is not an object file (not allowed in 
 > a library)
 > *** Error code 1
 
 The wrapper framework now doesn't skip the argument of "-install_name" 
 any more when calling libtool.  Moving the -install-name case from 
 arg-pp-darwin-gcc to arg-pp-main will fix the problem.  See the patch 
 below.
 
 --
 Min Sik Kim
 
 
 Index: arg-pp-darwin-gcc
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/wrapper/arg-pp-darwin-gcc,v
 retrieving revision 1.1
 diff -u -r1.1 arg-pp-darwin-gcc
 --- arg-pp-darwin-gcc	18 Jan 2005 17:25:13 -0000	1.1
 +++ arg-pp-darwin-gcc	14 Feb 2005 04:02:52 -0000
 @@ -35,21 +35,4 @@
   # POSSIBILITY OF SUCH DAMAGE.
 
   case $arg in
 -######################################################################
 -# Darwin's linker uses:
 -#
 -#	-dylib_file /path/shlib:/path2/shlib
 -#	-dylib_install_name /path/shlib
 -#	-install_name /path/shlib
 -#
 -# to pass the installed locations for the shared libraries to the
 -# linker, and we need to pass the extra argument unmodified.  The
 -# purpose of -seg_addr_table_filename is more obscure, but Darwin's
 -# imake rules use it.
 -######################################################################
 --dylib_file|-dylib_install_name|-install_name|-seg_addr_table_filename)
 -	skipargs=1
 -	argok=yes
 -	argmatch=yes
 -	;;
   esac
 Index: arg-pp-main
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mk/wrapper/arg-pp-main,v
 retrieving revision 1.3
 diff -u -r1.3 arg-pp-main
 --- arg-pp-main	26 Jan 2005 05:03:11 -0000	1.3
 +++ arg-pp-main	14 Feb 2005 04:02:52 -0000
 @@ -171,4 +171,21 @@
   	argok=yes
   	argmatch=yes
   	;;
 +######################################################################
 +# Darwin's linker uses:
 +#
 +#	-dylib_file /path/shlib:/path2/shlib
 +#	-dylib_install_name /path/shlib
 +#	-install_name /path/shlib
 +#
 +# to pass the installed locations for the shared libraries to the
 +# linker, and we need to pass the extra argument unmodified.  The
 +# purpose of -seg_addr_table_filename is more obscure, but Darwin's
 +# imake rules use it.
 +######################################################################
 +-dylib_file|-dylib_install_name|-install_name|-seg_addr_table_filename)
 +	skipargs=1
 +	argok=yes
 +	argmatch=yes
 +	;;
   esac