ports/152842: Patch: Fix build of lang/tcl8[45] x11-toolkits/tk8[45] with clang

Koop Mast kwm at FreeBSD.org
Sat Dec 4 22:30:19 UTC 2010


>Number:         152842
>Category:       ports
>Synopsis:       Patch: Fix build of lang/tcl8[45] x11-toolkits/tk8[45] with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 04 22:30:17 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Koop Mast
>Release:        FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 8.1-STABLE FreeBSD 8.1-STABLE #2 r215627: Sun Nov 21 13:36:51 UTC 2010 simon at freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386


	
>Description:
	When building tcl8[45] or tk8[45] with clang the build fails with:

	clang -shared -o libtcl85.so.1 <load of .o files> -lm -soname libtcl85.so.1  -rpath /usr/local/lib
	clang: error: no such file or directory: 'libtcl85.so.1'
	*** Error code 1

	Use -Wl syntax with -soname will fix it.
	
>How-To-Repeat:
	
>Fix:

	

--- tk-tcl-clang.diff begins here ---
Index: lang/tcl84/files/patch-configure
===================================================================
RCS file: /home/pcvs/ports/lang/tcl84/files/patch-configure,v
retrieving revision 1.11
diff -a -u -r1.11 patch-configure
--- lang/tcl84/files/patch-configure	5 Jun 2007 13:26:58 -0000	1.11
+++ lang/tcl84/files/patch-configure	4 Dec 2010 22:14:47 -0000
@@ -1,6 +1,6 @@
---- configure.orig	Thu Apr 20 16:42:21 2006
-+++ configure	Mon May  1 17:31:03 2006
-@@ -2560,7 +2560,7 @@
+--- configure.orig	2008-04-17 22:29:49.000000000 +0200
++++ configure	2009-11-23 14:17:43.000000000 +0100
+@@ -2570,7 +2570,7 @@
      LDFLAGS_ORIG="$LDFLAGS"
      TCL_EXPORT_FILE_SUFFIX=""
      UNSHARED_LIB_SUFFIX=""
@@ -9,13 +9,13 @@
      ECHO_VERSION='`echo ${VERSION}`'
      TCL_LIB_VERSIONS_OK=ok
      CFLAGS_DEBUG=-g
-@@ -3384,25 +3384,26 @@
+@@ -3434,25 +3434,26 @@
  	FreeBSD-*)
  	    # FreeBSD 3.* and greater have ELF.
  	    SHLIB_CFLAGS="-fPIC"
 -	    SHLIB_LD="ld -Bshareable -x"
 +	    SHLIB_LD="${CC} -shared"
-+	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
++	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\$@"
  	    SHLIB_LD_LIBS='${LIBS}'
  	    SHLIB_SUFFIX=".so"
  	    DL_OBJS="tclLoadDl.o"
Index: lang/tcl85/files/patch-unix-configure
===================================================================
RCS file: /home/pcvs/ports/lang/tcl85/files/patch-unix-configure,v
retrieving revision 1.4
diff -a -u -r1.4 patch-unix-configure
--- lang/tcl85/files/patch-unix-configure	29 Dec 2007 21:38:48 -0000	1.4
+++ lang/tcl85/files/patch-unix-configure	4 Dec 2010 22:14:47 -0000
@@ -1,15 +1,15 @@
 --- configure.orig	2007-12-19 22:50:13.000000000 +0100
 +++ configure	2007-12-26 11:49:03.000000000 +0100
-@@ -6633,7 +6633,7 @@
+@@ -6636,7 +6636,7 @@
+     # is disabled by the user. [Bug 1016796]
      LDFLAGS_ARCH=""
-     TCL_EXPORT_FILE_SUFFIX=""
      UNSHARED_LIB_SUFFIX=""
 -    TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
 +    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
      ECHO_VERSION='`echo ${VERSION}`'
      TCL_LIB_VERSIONS_OK=ok
      CFLAGS_DEBUG=-g
-@@ -7624,7 +7624,7 @@
+@@ -7609,7 +7609,7 @@
  	    SHLIB_SUFFIX=".so"
  	    DL_OBJS="tclLoadDl.o"
  	    DL_LIBS=""
@@ -18,7 +18,7 @@
  	    if test $doRpath = yes; then
  
  		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-@@ -7635,16 +7635,16 @@
+@@ -7620,16 +7620,16 @@
  
  		# The -pthread needs to go in the CFLAGS, not LIBS
  		LIBS=`echo $LIBS | sed s/-pthread//`
@@ -39,3 +39,12 @@
  	    	TCL_LIB_VERSIONS_OK=nodots
  		;;
  	    esac
+@@ -7638,7 +7638,7 @@
+ 	    # This configuration from FreeBSD Ports.
+ 	    SHLIB_CFLAGS="-fPIC"
+ 	    SHLIB_LD="${CC} -shared"
+-	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
++	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\$@"
+ 	    SHLIB_LD_LIBS='${LIBS}'
+ 	    SHLIB_SUFFIX=".so"
+ 	    DL_OBJS="tclLoadDl.o"
Index: x11-toolkits/tk84/files/patch-aa
===================================================================
RCS file: /home/pcvs/ports/x11-toolkits/tk84/files/patch-aa,v
retrieving revision 1.23
diff -a -u -r1.23 patch-aa
--- x11-toolkits/tk84/files/patch-aa	5 Jun 2007 13:26:58 -0000	1.23
+++ x11-toolkits/tk84/files/patch-aa	4 Dec 2010 22:14:47 -0000
@@ -1,11 +1,11 @@
---- configure.orig	Wed Apr 19 14:29:37 2006
-+++ configure	Mon May  1 17:59:53 2006
-@@ -2881,25 +2881,26 @@
+--- configure.orig	2008-04-17 17:14:08.000000000 +0200
++++ configure	2010-12-03 00:16:52.000000000 +0100
+@@ -2929,25 +2929,26 @@
  	FreeBSD-*)
  	    # FreeBSD 3.* and greater have ELF.
  	    SHLIB_CFLAGS="-fPIC"
 -	    SHLIB_LD="ld -Bshareable -x"
-+	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
++	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\$@"
 +	    SHLIB_LD="${CC} -shared"
  	    SHLIB_LD_LIBS='${LIBS}'
  	    SHLIB_SUFFIX=".so"
@@ -34,7 +34,7 @@
  	    	TCL_LIB_VERSIONS_OK=nodots
  		;;
  	    esac
-@@ -3472,6 +3473,7 @@
+@@ -3427,6 +3428,7 @@
  #define _POSIX_PTHREAD_SEMANTICS 1
  EOF
  
Index: x11-toolkits/tk85/files/patch-unix::configure
===================================================================
RCS file: /home/pcvs/ports/x11-toolkits/tk85/files/patch-unix::configure,v
retrieving revision 1.5
diff -a -u -r1.5 patch-unix::configure
--- x11-toolkits/tk85/files/patch-unix::configure	29 Dec 2007 21:39:48 -0000	1.5
+++ x11-toolkits/tk85/files/patch-unix::configure	4 Dec 2010 22:14:47 -0000
@@ -1,6 +1,6 @@
 --- configure.orig	2007-12-17 18:57:25.000000000 +0100
-+++ configure	2007-12-29 14:17:55.000000000 +0100
-@@ -3536,6 +3536,7 @@
++++ configure	2010-09-28 00:00:20.000000000 +0200
+@@ -3538,6 +3538,7 @@
  # Threads support - this auto-enables if Tcl was compiled threaded
  #------------------------------------------------------------------------
  
@@ -8,7 +8,7 @@
  
      # Check whether --enable-threads or --disable-threads was given.
  if test "${enable_threads+set}" = set; then
-@@ -5828,7 +5829,7 @@
+@@ -5815,7 +5816,7 @@
  	    SHLIB_SUFFIX=".so"
  	    DL_OBJS="tclLoadDl.o"
  	    DL_LIBS=""
@@ -17,7 +17,7 @@
  	    if test $doRpath = yes; then
  
  		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-@@ -5839,16 +5840,16 @@
+@@ -5826,16 +5827,16 @@
  
  		# The -pthread needs to go in the CFLAGS, not LIBS
  		LIBS=`echo $LIBS | sed s/-pthread//`
@@ -38,3 +38,12 @@
  	    	TCL_LIB_VERSIONS_OK=nodots
  		;;
  	    esac
+@@ -5844,7 +5845,7 @@
+ 	    # This configuration from FreeBSD Ports.
+ 	    SHLIB_CFLAGS="-fPIC"
+ 	    SHLIB_LD="${CC} -shared"
+-	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
++	    TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\$@"
+ 	    SHLIB_LD_LIBS='${LIBS}'
+ 	    SHLIB_SUFFIX=".so"
+ 	    DL_OBJS="tclLoadDl.o"
--- tk-tcl-clang.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list