ports/72114: [PATCH] libtool15 chokes on gcc34 on 4-STABLE
Chris BeHanna
chris at behanna.org
Sun Sep 26 21:50:30 UTC 2004
>Number: 72114
>Category: ports
>Synopsis: [PATCH] libtool15 chokes on gcc34 on 4-STABLE
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Sep 26 21:50:27 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Chris BeHanna
>Release: FreeBSD 4.10-STABLE i386
>Organization:
BeHanna Family
>Environment:
System: FreeBSD topperwein.pennasoft.com 4.10-STABLE FreeBSD 4.10-STABLE #0: Wed Aug 4 17:23:04 EDT 2004 behanna at topperwein.pennasoft.com:/raid0/stable/usr/obj/raid5/4stable/src/sys/TOPPERWEIN i386
>Description:
Attempting to build ports that use C code using libtool15 and gcc34 results in
link-time failures (references to C++ symbols). Linking with g++34 solves the
problem, but libtool15 doesn't know how to do that.
>How-To-Repeat:
Install libtool15 as follows:
cd /usr/ports/devel/libtool15
env CC=/usr/local/bin/gcc34 CXX=/usr/local/bin/g++34 \
LD=/usr/local/bin/g++34 make install
Next, try installing the mysql 4.0 client:
cd /usr/ports/databases/mysql40-client
env CC=/usr/local/bin/gcc34 CXX=/usr/local/bin/g++34 \
LD=/usr/local/bin/g++34 make install
This will bomb at link-time. mysql40-server will suffer similarly.
>Fix:
Apply the following patch to /usr/ports/devel/libtool15/files/patch-ltmain.sh,
then reinstall libtool15 as described in the "How-To-Repeat" section. Now,
using gcc34 from ports to build mysql will succeed. I've tested this by
installing both mysql 4.0 client and server, and by upgrading kdebase3 and
kdelibs3.
Index: patch-ltmain.sh
===================================================================
RCS file: /raid5/cvs/ports/devel/libtool15/files/patch-ltmain.sh,v
retrieving revision 1.3
diff -u -u -r1.3 patch-ltmain.sh
--- patch-ltmain.sh 1 Jul 2004 17:06:38 -0000 1.3
+++ patch-ltmain.sh 26 Sep 2004 17:00:06 -0000
@@ -1,11 +1,17 @@
---- ltmain.sh.orig Sun Apr 11 05:44:45 2004
-+++ ltmain.sh Wed Jun 9 18:21:15 2004
-@@ -1358,3 +1358,3 @@
+--- ltmain.sh.orig Sat Aug 7 08:12:06 2004
++++ ltmain.sh Sun Sep 26 12:59:32 2004
+@@ -1477,7 +1477,7 @@
+ esac
+ elif test "X$arg" = "X-lc_r"; then
case $host in
- *-*-openbsd* | *-*-freebsd*)
+ *-*-openbsd* | *-*-freebsd4*)
# Do not include libc_r directly, use -pthread flag.
-@@ -1375,2 +1375,8 @@
+ continue
+ ;;
+@@ -1494,6 +1494,12 @@
+
+ -module)
module=yes
+ case $host in
+ *-*-freebsd*)
@@ -14,17 +20,73 @@
+ ;;
+ esac
continue
-@@ -1858,2 +1864,3 @@
+ ;;
+
+@@ -1977,6 +1983,7 @@
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
fi
-@@ -4409,2 +4416,5 @@
+ continue
+ ;;
+@@ -4442,6 +4449,9 @@
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
;;
+ *-*-freebsd*)
+ # FreeBSD doesn't need this...
+ ;;
*)
-@@ -5549,6 +5559,13 @@
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit $EXIT_FAILURE
+@@ -4460,7 +4470,7 @@
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+- link_command="$compile_command$compile_rpath"
++ link_command=`echo "$compile_command$compile_rpath" | sed 's/gcc\(3[34]\) /g++\1 /'`
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+@@ -4524,7 +4534,7 @@
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+- link_command="$compile_var$compile_command$compile_rpath"
++ link_command=`echo "$compile_command$compile_rpath" | sed 's/gcc\(3[34]\) /g++\1 /'`
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+@@ -4537,14 +4547,14 @@
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+- link_command="$compile_var$compile_command$compile_rpath"
++ link_command=`echo "$compile_command$compile_rpath" | sed 's/gcc\(3[34]\) /g++\1 /'`
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+- link_command="$finalize_var$compile_command$finalize_rpath"
++ link_command=`echo "$finalize_var$compile_command$compile_rpath" | sed 's/gcc\(3[34]\) /g++\1 /'`
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+@@ -4552,7 +4562,7 @@
+ relink_command=
+ fi
+ else
+- link_command="$compile_var$compile_command$compile_rpath"
++ link_command=`echo "$compile_command$compile_rpath" | sed 's/gcc\(3[34]\) /g++\1 /'`
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+@@ -5527,10 +5537,17 @@
+ fi
+
# Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
@@ -42,3 +104,5 @@
+ ;;
+ esac
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list