[Bug libgcj/33278] New: [4.3 Regression] libjava fails to compile if configure argument contains "version"

belyshev at depni dot sinp dot msu dot ru gcc-bugzilla@gcc.gnu.org
Sun Sep 2 11:00:00 GMT 2007


When gcc is configured with, for example, "--without-pkgversion", this part of
libjava configure script parses "gcj -v" output incorrectly, thus encoding
garbage as preprocessor macro and failing:

gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`

An obvious fix would be:

Index: gcc43/libjava/configure.ac
===================================================================
--- gcc43.orig/libjava/configure.ac
+++ gcc43/libjava/configure.ac
@@ -1369,7 +1369,7 @@ AC_SUBST(toolexecmainlibdir)
 AC_SUBST(toolexeclibdir)

 # Determine gcj and libgcj version number.
-gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
+gcjversion=`$GCJ -v 2>&1 | awk '/^gcc version/ { print $3 }'`
 libgcj_soversion=`awk -F: '/^[[^#]].*:/ { print $1 }' $srcdir/libtool-version`
 GCJVERSION=$gcjversion
 AC_SUBST(GCJVERSION)


Introduced by:

r127025 | doko | 2007-07-29 00:32:27 +0400 (Sun, 29 Jul 2007) | 6 lines
2007-07-28  Matthias Klose  <doko@ubuntu.com>

        * configure.ac: Encode the libgcj soversion in dbexecdir,
        pass --with-native-libdir to classpath configure.
        * configure: Regenerate.


-- 
           Summary: [4.3 Regression] libjava fails to compile if configure
                    argument contains "version"
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33278



More information about the Gcc-bugs mailing list