Subject: pkg/22688: pkgsrc/lang/tcl fails to build under OS X
To: None <gnats-bugs@gnats.netbsd.org>
From: None <cyber@netbsd.org>
List: netbsd-bugs
Date: 09/04/2003 15:45:21
>Number:         22688
>Category:       pkg
>Synopsis:       pkgsrc/lang/tcl fails to build under OS X
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 04 22:47:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Erik Berls
>Release:        OS X 10.2.6
>Organization:
>Environment:
	pkgsrc/ and othersrc/bootstrap-pkgsrc as of 9/04/2003 @ aprox 11:00PDT.
Architecture: macppc
Machine: macppc
>Description:
	pkgsrc/lang/tcl fails to compile with various library related errors.
>How-To-Repeat:
	on a OS X box, install bootstrap-pkgsrc, and have the latest pkgsrc
	cd pkgsrc/lang/tcl
	bmake
>Fix:

The following patchs fixes the build.  The second patch section to
Makefile eliminates the use of rpath, this is an MD change in an MI
section, and will need to be done differently.  PLIST changes are
not included in this patch.


--- /tmp/Makefile.in	Thu Sep  4 14:50:55 2003
+++ Makefile.in	Thu Sep  4 14:55:14 2003
@@ -207,7 +207,7 @@
 TCL_LIB_FILE		= @TCL_LIB_FILE@
 #TCL_LIB_FILE		= libtcl.a
 
-TCL_LIB_FLAG		= @TCL_LIB_FLAG@
+TCL_LIB_FLAG		= libtcl83.la
 #TCL_LIB_FLAG		= -ltcl
 
 TCL_EXP_FILE		= @TCL_EXP_FILE@
@@ -237,8 +237,7 @@
 
 #CC			= purify -best-effort @CC@ -DPURIFY
 CC                      = ${LIBTOOL} --mode=compile @CC@
-#LD                      = ${LIBTOOL} --mode=link @CC@ -Wl,${RPATH_FLAG}${PREFIX}/lib
-LD                      = ${LIBTOOL} --mode=link @CC@ 
+LD                      = ${LIBTOOL} --mode=link @CC@ -Wl,${RPATH_FLAG}${PREFIX}/lib
 
 #----------------------------------------------------------------
 # The information below should be usable as is.  The configure
@@ -443,11 +442,11 @@
 
 
 tclsh: ${TCLSH_OBJS} ${TCL_LIB_FILE}
-	${LD} ${LDFLAGS} ${TCLSH_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
+	${LD} ${LDFLAGS} ${TCLSH_OBJS} libtcl83.la ${LIBS} \
 		@TCL_LD_SEARCH_FLAGS@ -o tclsh
 
 tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST}
-	${LD} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} \
+	${LD} ${LDFLAGS} ${TCLTEST_OBJS} libtcl83.la ${LIBS} \
 		@TCL_LD_SEARCH_FLAGS@ -o tcltest
 
 # Note, in the target below TCL_LIBRARY needs to be set or else



--- /tmp/configure	Thu Sep  4 14:15:32 2003
+++ configure	Thu Sep  4 14:55:14 2003
@@ -5421,7 +5421,7 @@
 	Rhapsody-*|Darwin-*)
 	    SHLIB_CFLAGS="-fno-common"
 	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
-	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr a000000 -dynamiclib"
+	    TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_MAJOR_VERSION} -current_version \${VERSION} -install_name \${LIB_RUNTIME_DIR}/\${TCL_LIB_FILE} -prebind -seg1addr a000000"
 	    SHLIB_LD_LIBS="${LIBS}"
 	    SHLIB_SUFFIX=".dylib"
 	    DL_OBJS="tclLoadDyld.o"
>Release-Note:
>Audit-Trail:
>Unformatted: