Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-8475

buildall.sh fails with undefined CMAKE_BUILD_TYPE_LIST on Centos

    XMLWordPrintableJSON

Details

    Description

      A recent change added a bash array to keep track of which build types had been specified to buildall.sh. On Ubuntu, everything seems to work. On Centos, this is producing an error:

      15:23:15 /data/jenkins/workspace/impala-asf-master-core/repos/Impala/buildall.sh: line 316: CMAKE_BUILD_TYPE_LIST[0]: unbound variable

      Given that this is on a debug build, that should mean that the CMAKE_BUILD_TYPE_LIST is empty. The current theory is that Ubuntu and Centos treat [[ -v VARNAME ]] differently, so in the following code, we are entering the block even with an empty list:

      if [[ -v CMAKE_BUILD_TYPE_LIST ]]; then
        if [[ ${#CMAKE_BUILD_TYPE_LIST[@]} -gt 1 ]]; then
          echo "ERROR: more than one CMake build type defined: ${CMAKE_BUILD_TYPE_LIST[@]}"
          exit 1
        fi
        CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE_LIST[0]}
      fi
      

      Attachments

        Issue Links

          Activity

            People

              joemcdonnell Joe McDonnell
              joemcdonnell Joe McDonnell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: