Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30070

Automatic download and installation of cmake from cmake.org

    XMLWordPrintable

Details

    Description

      The same way users do it to install JDK, Maven and Ant.
      Votes are welcome.

      Attachments

        Activity

          The automatic download from cmake.org does not seem to work properly on Mac Slaves.

          Jenkins spits the following error:

          ERROR: Install from cmake.org [Auto Install]: No tool download known for OS `Mac OS X` and arch `x86_64`.

          On the cmake.org website, the Mac OS X distributions are in fact using "Darwin" in their name and not "Mac OS X", so it is probably a very minor fix.

          Thanks in advance.

          gegles Guillaume Egles added a comment - The automatic download from cmake.org does not seem to work properly on Mac Slaves. Jenkins spits the following error: ERROR: Install from cmake.org [Auto Install] : No tool download known for OS ` Mac OS X ` and arch `x86_64`. On the cmake.org website, the Mac OS X distributions are in fact using "Darwin" in their name and not "Mac OS X", so it is probably a very minor fix. Thanks in advance.
          15knots Martin Weber added a comment -

          gegles Thanks for reporting this.

          Which JRE is installed on your system?
          The plugin in fact compares the java system property os.arch against "amd64". IIRC, "amd64" is documented for the 64-bit JRE provided by Apple, but maybe OpenJDK uses a different value.

          A related problem: cmake.org has both binaries for OS "Darwin" and "Darwin64" and uses "universal" and "x86_64" for the architecture value, which is confusing. Maybe you can explain what that mean.

          With your knowledge of java on OS X, please inspect the mapping code at link https://github.com/jenkinsci/cmakebuilder-plugin/blob/master/src/main/java/hudson/plugins/cmake/CmakeInstaller.java#L373 and make suggestions, if you can understand java code.

          15knots Martin Weber added a comment - gegles Thanks for reporting this. Which JRE is installed on your system? The plugin in fact compares the java system property os.arch against "amd64". IIRC, "amd64" is documented for the 64-bit JRE provided by Apple, but maybe OpenJDK uses a different value. A related problem: cmake.org has both binaries for OS "Darwin" and "Darwin64" and uses "universal" and "x86_64" for the architecture value, which is confusing. Maybe you can explain what that mean. With your knowledge of java on OS X, please inspect the mapping code at link https://github.com/jenkinsci/cmakebuilder-plugin/blob/master/src/main/java/hudson/plugins/cmake/CmakeInstaller.java#L373 and make suggestions, if you can understand java code.

          I've just tested, the download part now works. Thank you!

          Sadly, there is now another issue with the path for the cmake binary being different on Mac then on Linux.

          For mac, the cmake CLI binary does not sit in the extracted "bin/" directory (like Unix), but in the "CMake.app/Contents/bin/" of the extracted cmake-3.3.2-Darwin-x86_64.tar.gz.

          Here is the relevant part of the log:

          Unpacking http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-x86_64.tar.gz to /var/tmp/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.3.2 on osx-10_9
          Cleaning build dir... /opt/build/conduit-connect-osx/build
          [build] $ /var/tmp/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/build/conduit-connect-osx/install -DOPENSSL_ROOT_DIR=/aspera/build/3rdparty/trunk/mac-intel-10.9/stable/latest/build/result/BUILD/mac-10.7-64-release/openssl-1.0.1p -DCMAKE_PREFIX_PATH=/opt/build/webrtc-osx/install -DCMAKE_BUILD_TYPE=Release /opt/build/conduit-connect-osx
          ERROR: Cannot run program "/var/tmp/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake" (in directory "/opt/build/conduit-connect-osx/build"): error=2, No such file or directory
          Build step 'CMake Build' marked build as failure
          Archiving artifacts
          Finished: FAILURE

          gegles Guillaume Egles added a comment - I've just tested, the download part now works. Thank you! Sadly, there is now another issue with the path for the cmake binary being different on Mac then on Linux. For mac, the cmake CLI binary does not sit in the extracted "bin/" directory (like Unix), but in the "CMake.app/Contents/bin/" of the extracted cmake-3.3.2-Darwin-x86_64.tar.gz. Here is the relevant part of the log: Unpacking http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-x86_64.tar.gz to /var/tmp/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.3.2 on osx-10_9 Cleaning build dir... /opt/build/conduit-connect-osx/build [build] $ /var/tmp/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/opt/build/conduit-connect-osx/install -DOPENSSL_ROOT_DIR=/aspera/build/3rdparty/trunk/mac-intel-10.9/stable/latest/build/result/BUILD/mac-10.7-64-release/openssl-1.0.1p -DCMAKE_PREFIX_PATH=/opt/build/webrtc-osx/install -DCMAKE_BUILD_TYPE=Release /opt/build/conduit-connect-osx ERROR: Cannot run program "/var/tmp/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake" (in directory "/opt/build/conduit-connect-osx/build"): error=2, No such file or directory Build step 'CMake Build' marked build as failure Archiving artifacts Finished: FAILURE

          Code changed in jenkins
          User: 15knots
          Path:
          src/main/java/hudson/plugins/cmake/CmakeInstaller.java
          http://jenkins-ci.org/commit/cmakebuilder-plugin/9802bbcd95c91da792b97864aaae025aace5aa4c
          Log:
          JENKINS-30070 Fix path to cmake binary for Mac OS X

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: 15knots Path: src/main/java/hudson/plugins/cmake/CmakeInstaller.java http://jenkins-ci.org/commit/cmakebuilder-plugin/9802bbcd95c91da792b97864aaae025aace5aa4c Log: JENKINS-30070 Fix path to cmake binary for Mac OS X
          15knots Martin Weber added a comment - Please download and test the SNAPSHOT version at https://jenkins.ci.cloudbees.com/job/plugins/job/cmakebuilder-plugin/lastBuild/org.jenkins-ci.plugins$cmakebuilder/artifact/org.jenkins-ci.plugins/cmakebuilder/2.3.2-SNAPSHOT/cmakebuilder-2.3.2-SNAPSHOT.hpi If it works, I will release it.

          Thanks for your hard work.

          I did have to do a bit of cleanup (delete previously downloaded versions), but once I had a clean slate, things are working great now. Thanks!

          As far as I'm concerned, you can release it, but folks might encounter the same cleanup issue I had.

          Cheers. G.

          gegles Guillaume Egles added a comment - Thanks for your hard work. I did have to do a bit of cleanup (delete previously downloaded versions), but once I had a clean slate, things are working great now. Thanks! As far as I'm concerned, you can release it, but folks might encounter the same cleanup issue I had. Cheers. G.
          15knots Martin Weber added a comment -

          Thank you for testing it.
          I was concerned, since the installation removes some dirs that come with the archive which might be needed on OS X.

          15knots Martin Weber added a comment - Thank you for testing it. I was concerned, since the installation removes some dirs that come with the archive which might be needed on OS X.

          People

            15knots Martin Weber
            15knots Martin Weber
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: