You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2015/02/26 00:39:22 UTC

svn commit: r1662329 - /subversion/trunk/configure.ac

Author: philip
Date: Wed Feb 25 23:39:22 2015
New Revision: 1662329

URL: http://svn.apache.org/r1662329
Log:
* configure.ac: Don't add -lstdc++ on FreeBSD 10 as it is not needed and
   adding it causes linking to fail.

Modified:
    subversion/trunk/configure.ac

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1662329&r1=1662328&r2=1662329&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Wed Feb 25 23:39:22 2015
@@ -1455,8 +1455,15 @@ if test "$do_javahl_build" = "yes"; then
   # it.
   AC_MSG_CHECKING([for additional flags to link C++ libraries])
   if test "x$ac_compiler_gnu" = "xyes"; then
-    LT_CXX_LIBADD="-lstdc++"
-    AC_MSG_RESULT([$LT_CXX_LIBADD])
+    case "$host" in
+      *freebsd10*)
+        AC_MSG_RESULT([none needed])
+      ;;
+      *)
+        LT_CXX_LIBADD="-lstdc++"
+        AC_MSG_RESULT([$LT_CXX_LIBADD])
+      ;;
+    esac
   else
     AC_MSG_RESULT([none needed])
   fi



Re: svn commit: r1662329 - /subversion/trunk/configure.ac

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Branko Čibej <br...@wandisco.com> writes:
>
>> Alternatively, we could just stop supporting broken 1.x libtool.
>
> Building from tarballs would be unaffected if we bumped the libtool
> requirement.  Only people running autogen.sh would need the newer
> libtool.  Libtool 1.5 dates from 2003.
>
> The current code is bit like magic, it dates back to r850874 and fixes
> issue 2031.  While we have two C++ libraries, libsvnjavahl and
> libsvn_auth_kwallet, the extra library is only used for LINK_JAVAHL_CXX
> not LINK_CXX_LIB.  I think that means nobody builds kwallet with libtool
> 1.4 possibly because such old systems do not have KDE or are server-only
> for Subversion.

This whole bit of code has too much magic.  FreeBSD 10 uses clang and
from the command line this works:

  c++ x.o -o x -lstdc++

because clang converts -lstdc++ to -lc++.  However when libtool invokes
c++ to link it also passes -nostdlib and this fails:

  c++ x.o -o x -nostdlib -lstdc++
  /usr/bin/ld: cannot find -lstdc++

because the conversion doesn't happen.

So to write a runtime check using something like AC_CHECK_LIBS or
AC_LINK_IFELSE the check has to use libtool or use the same flags as
libtool.  I'm not going to try and write that.


-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: svn commit: r1662329 - /subversion/trunk/configure.ac

Posted by Philip Martin <ph...@wandisco.com>.
Branko Čibej <br...@wandisco.com> writes:

> Alternatively, we could just stop supporting broken 1.x libtool.

Building from tarballs would be unaffected if we bumped the libtool
requirement.  Only people running autogen.sh would need the newer
libtool.  Libtool 1.5 dates from 2003.

The current code is bit like magic, it dates back to r850874 and fixes
issue 2031.  While we have two C++ libraries, libsvnjavahl and
libsvn_auth_kwallet, the extra library is only used for LINK_JAVAHL_CXX
not LINK_CXX_LIB.  I think that means nobody builds kwallet with libtool
1.4 possibly because such old systems do not have KDE or are server-only
for Subversion.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: svn commit: r1662329 - /subversion/trunk/configure.ac

Posted by Branko Čibej <br...@wandisco.com>.
On 26.02.2015 09:47, Stefan Sperling wrote:
> On Wed, Feb 25, 2015 at 11:39:22PM -0000, philip@apache.org wrote:
>> Author: philip
>> Date: Wed Feb 25 23:39:22 2015
>> New Revision: 1662329
>>
>> URL: http://svn.apache.org/r1662329
>> Log:
>> * configure.ac: Don't add -lstdc++ on FreeBSD 10 as it is not needed and
>>    adding it causes linking to fail.
> Is there something else we can check for rather than OS and its version?
> That's a very brittle kind of check to do.
>
> For example, if this is related to clang the check should involve clang.

We could add a test for this in compiler.m4 and get the flag into CXXFLAGS.

Alternatively, we could just stop supporting broken 1.x libtool.

-- Brane


Re: svn commit: r1662329 - /subversion/trunk/configure.ac

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Feb 25, 2015 at 11:39:22PM -0000, philip@apache.org wrote:
> Author: philip
> Date: Wed Feb 25 23:39:22 2015
> New Revision: 1662329
> 
> URL: http://svn.apache.org/r1662329
> Log:
> * configure.ac: Don't add -lstdc++ on FreeBSD 10 as it is not needed and
>    adding it causes linking to fail.

Is there something else we can check for rather than OS and its version?
That's a very brittle kind of check to do.

For example, if this is related to clang the check should involve clang.

> Modified:
>     subversion/trunk/configure.ac
> 
> Modified: subversion/trunk/configure.ac
> URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1662329&r1=1662328&r2=1662329&view=diff
> ==============================================================================
> --- subversion/trunk/configure.ac (original)
> +++ subversion/trunk/configure.ac Wed Feb 25 23:39:22 2015
> @@ -1455,8 +1455,15 @@ if test "$do_javahl_build" = "yes"; then
>    # it.
>    AC_MSG_CHECKING([for additional flags to link C++ libraries])
>    if test "x$ac_compiler_gnu" = "xyes"; then
> -    LT_CXX_LIBADD="-lstdc++"
> -    AC_MSG_RESULT([$LT_CXX_LIBADD])
> +    case "$host" in
> +      *freebsd10*)
> +        AC_MSG_RESULT([none needed])
> +      ;;
> +      *)
> +        LT_CXX_LIBADD="-lstdc++"
> +        AC_MSG_RESULT([$LT_CXX_LIBADD])
> +      ;;
> +    esac
>    else
>      AC_MSG_RESULT([none needed])
>    fi
>