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

cmake installation on osx: missing files & strange layout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: cmakebuilder-plugin
    • Labels:
      None
    • Environment:
      OSX 10.10.5, jenkins 1.609.3, cmakebuilder plugin 2.3.2, JDK 1.7.0_80-b15
    • Similar Issues:

      Description

      on osx, our jenkins jobs fail when trying to build with the automatically installed cmake:

      ...
           [exec] CMake Error: Could not find cmake module file: CMakeSystemSpecificInitialize.cmake
           [exec] CMake Error at /Volumes/data/tools/cmake/share/cmake-3.3/Modules/CMakeCompilerIdDetection.cmake:38 (list):
           [exec]   list sub-command REMOVE_ITEM requires two or more arguments.
           [exec] Call Stack (most recent call first):
           [exec]   /Volumes/data/tools/cmake/share/cmake-3.3/Modules/CMakeDetermineCompilerId.cmake:108 (compiler_id_detection)
           [exec]   /Volumes/data/tools/cmake/share/cmake-3.3/Modules/CMakeDetermineCompilerId.cmake:126 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
           [exec]   /Volumes/data/tools/cmake/share/cmake-3.3/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
           [exec]   /Volumes/data/tools/cmake/share/cmake-3.3/Modules/CMakeDetermineCCompiler.cmake:109 (CMAKE_DETERMINE_COMPILER_ID)
           [exec]   CMakeLists.txt:8 (project)
      

      the error message indicates missing cmake files:
      the installed cmake has a strange layout and some files seem to be missing. observe the difference (e.g. missing *-DetermineCompiler.cmake files) between the jenkins-installed cmake and the one installed via "port":

      PORT

      zrh-jnk-osx10-64-b1:~ root# ls /opt/local/share/cmake-3.3/Modules/Compiler/
      ADSP-DetermineCompiler.cmake               GNU.cmake                                  QCC-C.cmake
      Absoft-Fortran.cmake                       HP-ASM.cmake                               QCC-CXX.cmake
      AppleClang-ASM.cmake                       HP-C-DetermineCompiler.cmake               QCC.cmake
      AppleClang-C-FeatureTests.cmake            HP-C.cmake                                 SCO-C.cmake
      AppleClang-C.cmake                         HP-CXX-DetermineCompiler.cmake             SCO-CXX.cmake
      AppleClang-CXX-FeatureTests.cmake          HP-CXX.cmake                               SCO-DetermineCompiler.cmake
      AppleClang-CXX.cmake                       HP-Fortran.cmake                           SCO.cmake
      AppleClang-DetermineCompiler.cmake         IAR-ASM.cmake                              SDCC-C-DetermineCompiler.cmake
      Borland-DetermineCompiler.cmake            IAR-C.cmake                                SunPro-ASM.cmake
      

      JENKINS CMAKEBUILDER

      zrh-jnk-osx10-64-b1:~ root# ls /Volumes/data/tools/cmake/share/cmake-3.3/Modules/Compiler/
      Absoft-Fortran.cmake    GHS-CXX.cmake           IAR.cmake               PGI.cmake               SunPro-Fortran.cmake
      AppleClang-ASM.cmake    GNU-ASM.cmake           Intel-ASM.cmake         PathScale-C.cmake       TI-ASM.cmake
      AppleClang-C.cmake      GNU-C.cmake             Intel-C.cmake           PathScale-CXX.cmake     TI-C.cmake
      AppleClang-CXX.cmake    GNU-CXX.cmake           Intel-CXX.cmake         PathScale.cmake         TI-CXX.cmake
      Clang-ASM.cmake         GNU-Fortran.cmake       Intel-Fortran.cmake     QCC-C.cmake             TinyCC-C.cmake
      Clang-C.cmake           GNU.cmake               MIPSpro-C.cmake         QCC-CXX.cmake           VisualAge-C.cmake
      Clang-CXX.cmake         HP-ASM.cmake            MIPSpro-CXX.cmake       QCC.cmake               VisualAge-CXX.cmake
      

      also, the whole package layout seems weird, compare the unpacked tar ball vs the cmake installed by cmakebuilder:

      UNPACKED

      cmake-3.3.2-Darwin-x86_64
      └── CMake.app
          └── Contents
              ├── Frameworks
              ├── Info.plist
              ├── MacOS
              ├── Resources
              ├── bin
              ├── doc
              ├── man
              └── share
      

      CMAKEBUILDER

      /Volumes/data/tools/cmake/
      ├── Frameworks
      │   ├── QtCore.framework
      │   └── QtGui.framework
      ├── Info.plist
      ├── MacOS
      │   └── CMake
      ├── Resources
      │   └── CMakeSetup.icns
      ├── bin
      │   ├── ccmake
      │   ├── cmake
      │   ├── cmake-gui -> ../MacOS/CMake
      │   ├── cmakexbuild
      │   ├── cpack
      │   └── ctest
      ├── cmake-3.3.2-Darwin-x86_64
      │   └── CMake.app
      └── share
          ├── aclocal
          └── cmake-3.3
      

      why the differences?

        Attachments

          Issue Links

            Activity

            Hide
            15knots Martin Weber added a comment -

            This directory:

            /Volumes/data/tools/cmake/share/cmake-3.3/
            

            is not the directory where the plugin places the downloaded cmake.

            Like any other tool-installer, it places the files under

            ${JENKINS_HOME}/tools/hudson.plugins.cmake.CmakeTool/3.3.2/
            

            Have a look at the build log, it will tell you exactly, which cmake is invoked, e.g.

            /home/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.2.3/bin/cmake -G "Unix Makefiles"...
            
            Show
            15knots Martin Weber added a comment - This directory: /Volumes/data/tools/cmake/share/cmake-3.3/ is not the directory where the plugin places the downloaded cmake. Like any other tool-installer, it places the files under ${JENKINS_HOME}/tools/hudson.plugins.cmake.CmakeTool/3.3.2/ Have a look at the build log, it will tell you exactly, which cmake is invoked, e.g. /home/jenkins/tools/hudson.plugins.cmake.CmakeTool/3.2.3/bin/cmake -G "Unix Makefiles"...
            Hide
            mistafunk mistafunk added a comment - - edited

            thanks for looking into this. i made a small change by setting the "path to cmake" in the jenkins global config to empty string, this should be nearer to what you expect.

            i removed cmake from the jenkins tool directory and tried again, here is the jenkins job log section regarding the automatic cmake installation:

            Install from cmake.org [cmake-automatic]: Unpacking http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-x86_64.tar.gz to /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2 on zrh-jnk-osx10-64-b1...
            Install from cmake.org [cmake-automatic]: Inspecting unpacked files at /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2...
            Setting CMAKE_AUTOMATIC_HOME=/Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake
            

            so the settings are:

            • ${JENKINS_HOME} is set to /Volumes/data
            • Jenkins System CMake Installation Settings:
            • Name: cmake-automatic (-> results in CMAKE_AUTOMATIC_HOME env var in job)
            • Path to cmake: (empty)

            i confirmed that our job uses the correct cmake executable - from the job log:

            /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake -E chdir <redacted> /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake "-GUnix Makefiles" ...
            

            so the problem persists. the installed cmake layout still looks like this:

            root# /opt/local/bin/tree -L 3 hudson.plugins.cmake.CmakeTool/
            hudson.plugins.cmake.CmakeTool/
            └── 3.3.2
                ├── Frameworks
                │   ├── QtCore.framework
                │   └── QtGui.framework
                ├── Info.plist
                ├── MacOS
                │   └── CMake
                ├── Resources
                │   └── CMakeSetup.icns
                ├── bin
                │   ├── ccmake
                │   ├── cmake
                │   ├── cmake-gui -> ../MacOS/CMake
                │   ├── cmakexbuild
                │   ├── cpack
                │   └── ctest
                ├── cmake-3.3.2-Darwin-x86_64
                │   └── CMake.app
                └── share
                    ├── aclocal
                    └── cmake-3.3
            

            and the cmake-3.3 subdirectory still misses the *-DetermineCompiler.cmake files which lead to the cmake errors in my original comment. it almost looks like some untar step gets confused or gets the wrong "extract to" directory or something...

            Show
            mistafunk mistafunk added a comment - - edited thanks for looking into this. i made a small change by setting the "path to cmake" in the jenkins global config to empty string, this should be nearer to what you expect. i removed cmake from the jenkins tool directory and tried again, here is the jenkins job log section regarding the automatic cmake installation: Install from cmake.org [cmake-automatic]: Unpacking http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-x86_64.tar.gz to /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2 on zrh-jnk-osx10-64-b1... Install from cmake.org [cmake-automatic]: Inspecting unpacked files at /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2... Setting CMAKE_AUTOMATIC_HOME=/Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake so the settings are: ${JENKINS_HOME} is set to /Volumes/data Jenkins System CMake Installation Settings: Name: cmake-automatic (-> results in CMAKE_AUTOMATIC_HOME env var in job) Path to cmake: (empty) i confirmed that our job uses the correct cmake executable - from the job log: /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake -E chdir <redacted> /Volumes/data/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake "-GUnix Makefiles" ... so the problem persists. the installed cmake layout still looks like this: root# /opt/local/bin/tree -L 3 hudson.plugins.cmake.CmakeTool/ hudson.plugins.cmake.CmakeTool/ └── 3.3.2 ├── Frameworks │   ├── QtCore.framework │   └── QtGui.framework ├── Info.plist ├── MacOS │   └── CMake ├── Resources │   └── CMakeSetup.icns ├── bin │   ├── ccmake │   ├── cmake │   ├── cmake-gui -> ../MacOS/CMake │   ├── cmakexbuild │   ├── cpack │   └── ctest ├── cmake-3.3.2-Darwin-x86_64 │   └── CMake.app └── share ├── aclocal └── cmake-3.3 and the cmake-3.3 subdirectory still misses the *-DetermineCompiler.cmake files which lead to the cmake errors in my original comment. it almost looks like some untar step gets confused or gets the wrong "extract to" directory or something...
            Hide
            mistafunk mistafunk added a comment - - edited

            i found a workaround!

            first, i made some tests with the "extract zip/tar.gz" install step instead of the "install from cmake.org" and the same thing happens. i am now pretty conviced that i get hit by this known issue: JENKINS-20693

            so the workaround is this:

            Show
            mistafunk mistafunk added a comment - - edited i found a workaround! first, i made some tests with the "extract zip/tar.gz" install step instead of the "install from cmake.org" and the same thing happens. i am now pretty conviced that i get hit by this known issue: JENKINS-20693 so the workaround is this:
            Hide
            15knots Martin Weber added a comment -

            Thanks for your investigation. I'm glad you found a workaround.

            I tested the automatic download of the MacOS variant of cmake 3.2.3 while I was resolving JENKINS-30070 on my Linux box (with some manual twirking of ${JENKINS_HOME}/updates/hudson.plugins.cmake.CmakeInstaller) and installation worked fine for Jenkins 1.580.3/openjdk-1.6.0. (Of course, the builds failed due to 'exec format error' )

            Installing cmake 3.4.2 for MacOS under Linux with Jenkins 1.580.3/openjdk-1.6.0 I get

            Install from cmake.org [3.3.2-autoinstall]: Unpacking http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-universal.tar.gz to /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2 on Jenkins...
            Install from cmake.org [3.3.2-autoinstall]: Inspecting unpacked files at /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2...
            Cleaning build dir... /home/w/devel/src/cmakebuilder-plugin/work/jobs/aaa/workspace/buld
            [buld] $ /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug /home/w/devel/src/cmakebuilder-plugin/work/jobs/aaa/workspace/testprojects/C-subsrc/src
            /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake: /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake: Kann die Datei nicht ausführen.
            

            Could this be a problem with the JRE on OS X?

            Show
            15knots Martin Weber added a comment - Thanks for your investigation. I'm glad you found a workaround. I tested the automatic download of the MacOS variant of cmake 3.2.3 while I was resolving JENKINS-30070 on my Linux box (with some manual twirking of ${JENKINS_HOME}/updates/hudson.plugins.cmake.CmakeInstaller) and installation worked fine for Jenkins 1.580.3/openjdk-1.6.0. (Of course, the builds failed due to 'exec format error' ) Installing cmake 3.4.2 for MacOS under Linux with Jenkins 1.580.3/openjdk-1.6.0 I get Install from cmake.org [3.3.2-autoinstall]: Unpacking http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-universal.tar.gz to /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2 on Jenkins... Install from cmake.org [3.3.2-autoinstall]: Inspecting unpacked files at /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2... Cleaning build dir... /home/w/devel/src/cmakebuilder-plugin/work/jobs/aaa/workspace/buld [buld] $ /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug /home/w/devel/src/cmakebuilder-plugin/work/jobs/aaa/workspace/testprojects/C-subsrc/src /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake: /home/w/devel/src/cmakebuilder-plugin/work/tools/hudson.plugins.cmake.CmakeTool/3.3.2/bin/cmake: Kann die Datei nicht ausführen. Could this be a problem with the JRE on OS X?

              People

              • Assignee:
                15knots Martin Weber
                Reporter:
                mistafunk mistafunk
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: