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

CMake builder cannot find NMake

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: cmakebuilder-plugin
    • Labels:
      None
    • Environment:
      Host:
      - Debian Wheezy amd64
      - Jenkins ver. 1.625
      - CMake plugin 2.1

      Guest:
      - Windows 7 64 bits
      - Visual Stutio 2010

    • Similar Issues:

      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

          Activity

          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          Hide
          15knots Martin Weber added a comment -
          Show
          15knots Martin Weber added a comment - armin novak 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.
          Hide
          akallabeth armin novak added a comment -

          Martin Weber 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

          Show
          akallabeth armin novak added a comment - Martin Weber 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
          Hide
          15knots Martin Weber added a comment -

          Version 2.3.4 allows to apply the suggested workaround.

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: