thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (THRIFT-4232) ./configure does bad ant version check
Date Thu, 14 Sep 2017 08:14:02 GMT


ASF GitHub Bot commented on THRIFT-4232:

Github user magiccrafter commented on a diff in the pull request:
    --- Diff: aclocal/ax_javac_and_java.m4 ---
    @@ -118,7 +118,7 @@ AC_DEFUN([AX_CHECK_JAVA_CLASS],
               AC_MSG_CHECKING(for ant version > $2)
    -          ANT_VALID=`expr $($1 -version 2>/dev/null | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p')
\>= $2`
    +          ANT_VALID=`expr "x$(printf "$2\n$($1 -version 2>/dev/null | sed -n 's/.*version
\(@<:@0-9\.@:>@*\).*/\1/p')" | sort -t '.' -k 1,1 -k 2,2 -k 3,3 -g | sed -n 1p)" = "x$2"`
    --- End diff --
    The issue that the pull request is fixing is the version comparison part. The ant version
extraction is working like charm and doesn't need to be changed.
    @jeking3, you are not testing accurately. Thats not a bash script file, this is a Autoconf/m4
macro and the following:
    `ant -version | sed -n 's/.*version \(@<:@0-9\.@:>@*\).*/\1/p'`
     at the time of running the bash command will have the 'Quadrigraphs'(@<:@) escaped:
    `ant -version | sed -n 's/.*version \([0-9\.]*\).*/\1/p'`
    For further details check the docs:
    I hope this clears the things a bit.

> ./configure does bad ant version check
> --------------------------------------
>                 Key: THRIFT-4232
>                 URL:
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.10.0
>         Environment: OSX 10.12.5, running ant 1.10.1
>            Reporter: David Woodward
>   Original Estimate: 3h
>  Remaining Estimate: 3h
> On line 18869 of the configure script, it checks that the ant version is >= 1.7. It
uses some kind of string comparison. This breaks for my current ant version (1.10). It seems
to think that 1.10 is not >= 1.7. I think this is because it's comparing strings without
taking into account what the strings actually mean. Something like this might be a possible
> This should be fixed because it means that people with new ant versions can't build the
java thrift library.
> Also it should be checked to see if other parts of the configure process are using these
kinds of faulty version checks.

This message was sent by Atlassian JIRA

View raw message