Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4109

Configure Script uses string comparison for versions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.10.0
    • 0.11.0
    • Build Process
    • None

    Description

      I am running the configure script as outlined here for MAC OSx -
      http://thrift.apache.org/docs/install/os_x

      I found that the configure script is doing string based comparison for
      performing version verification which breaks as soon as a version changes from one digit to two. For example, homebrew installs ant version 1.10.x now (as of March 7th, 2017) which is clearly greater than 1.7 which thrift requires. However the thrift configure script fails to detect ant because it thinks the version is wrong.

      This is because this line in the configure script (around line 18844 in
      version 0.9.3) -

      ANT_VALID=expr $($ANT -version 2>/dev/null | sed -n 's/.*version \([0-9\.]*\).*/\1/p') \>= 1.7`
      

      Notice how you are using the >= which is STRING comparison, not version
      comparison. When 1.10.1 compares to 1.7 it is considered LESS than instead
      of greater than.

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              dbavery Devin Avery
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: