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

CMake builder cannot find NMake

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • cmakebuilder-plugin
    • None
    • Host:
      - Debian Wheezy amd64
      - Jenkins ver. 1.625
      - CMake plugin 2.1

      Guest:
      - Windows 7 64 bits
      - Visual Stutio 2010

    Description

      I got an issue where i use the CMake Plugins to build on a slave machine on Windows. It's seems the environment is not get when using the builder.

      I can build the project using "NMake Makefiles" generator, but the command "nmake" is not found at compile time, but found before the cmake execution.

      The fact is i'm using dynamic environment, where i inject the environment before the build, it found at the cmake step, but not at the build step.

      Details in the attached file.

      Is there a bug, or i miss something?

      Regards

      Attachments

        1. 0001-A-fix-for-JENKINS-30114.patch
          1 kB
          armin novak
        2. jenkins-build.txt
          11 kB
          Eric Beuque
        3. jenkins-build2.txt
          49 kB
          Eric Beuque

        Activity

          akallabeth armin novak added a comment -

          The problem is that the build tool step discards the environment set up!
          For the configuration step the environment is fine and my injected variables and modified path is there.

          Had a short look at the code, looks like BuildToolStep.getEnvironmentVars is stripping everything and passing on an empty environment to the build tool steps.

          akallabeth armin novak added a comment - The problem is that the build tool step discards the environment set up! For the configuration step the environment is fine and my injected variables and modified path is there. Had a short look at the code, looks like BuildToolStep.getEnvironmentVars is stripping everything and passing on an empty environment to the build tool steps.
          akallabeth armin novak added a comment -

          A patch for this issue.
          Each build tool step now takes the job environment and overrides it with the supplied custom environment instead of only passing on the custom step environment variables.

          akallabeth armin novak added a comment - A patch for this issue. Each build tool step now takes the job environment and overrides it with the supplied custom environment instead of only passing on the custom step environment variables.
          15knots Martin Weber added a comment - akallabeth Thanks for pointing me to the build tool step discarding th environment setup. Please install and test https://jenkins.ci.cloudbees.com/job/plugins/job/cmakebuilder-plugin/org.jenkins-ci.plugins$cmakebuilder/lastSuccessfulBuild/artifact/org.jenkins-ci.plugins/cmakebuilder/2.4-SNAPSHOT/cmakebuilder-2.4-SNAPSHOT.hpi to verify whether it works.
          akallabeth armin novak added a comment -

          15knots Ok, looks like we both were right.
          With the patch the NMake tool works if called by ```cmake --build``` (if the path to NMake is set up with EnvInject)
          If called directly it still fails. Well, better than before I'd say

          akallabeth armin novak added a comment - 15knots Ok, looks like we both were right. With the patch the NMake tool works if called by ```cmake --build``` (if the path to NMake is set up with EnvInject) If called directly it still fails. Well, better than before I'd say
          15knots Martin Weber added a comment -

          Version 2.3.4 allows to apply the suggested workaround.

          15knots Martin Weber added a comment - Version 2.3.4 allows to apply the suggested workaround.

          People

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

            Dates

              Created:
              Updated:
              Resolved: