Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows CI builds are broken - $ENV{SHELL} path expands Win-style #1590

Closed
alexsavulescu opened this issue Jan 19, 2022 · 6 comments · Fixed by #1591
Closed

Windows CI builds are broken - $ENV{SHELL} path expands Win-style #1590

alexsavulescu opened this issue Jan 19, 2022 · 6 comments · Fixed by #1591
Labels
building Issue related to build/compilation CI Continuous Integration windows

Comments

@alexsavulescu
Copy link
Member

Most probably an update of the VM image.

Issue:

[ 18%] Building CXX object external/iv/src/lib/CMakeFiles/interviews.dir/InterViews/slider.cpp.obj
The system cannot find the file specified
make[2]: *** [src/nrniv/CMakeFiles/nrnversion_h.dir/build.make:70: src/nrniv/CMakeFiles/nrnversion_h] Error 1
make[1]: *** [CMakeFiles/Makefile2:466: src/nrniv/CMakeFiles/nrnversion_h.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
@alexsavulescu alexsavulescu changed the title Windows CI build are broken Windows CI builds are broken Jan 19, 2022
@alexsavulescu alexsavulescu added building Issue related to build/compilation CI Continuous Integration windows labels Jan 19, 2022
@alexsavulescu
Copy link
Member Author

 cd D:/a/nrn/nrn/build/src/nrniv && C:/msys64/mingw64/bin/cmake.exe -E env PROJECT_VERSION=8.0 C:\msys64\usr\bin\bash.exe D:/a/nrn/nrn/git2nrnversion_h.sh D:/a/nrn/nrn
The system cannot find the file specified

@nrnhines
Copy link
Member

2022-01-19T01:14:31.7843905Z The system cannot find the file specified
2022-01-19T01:14:31.7955241Z make[2]: *** [src/nrniv/CMakeFiles/nrnversion_h.dir/build.make:70: src/nrniv/CMakeFiles/nrnversion_h] Error 1
2022-01-19T01:14:31.7977241Z make[1]: *** [CMakeFiles/Makefile2:466: src/nrniv/CMakeFiles/nrnversion_h.dir/all] Error 2

Definitely a puzzle. The build/src/nrniv/CMakeFiles/nrnversion_h.dir folder exists on my last build in my Windows virtualbox guest but CMake seems to have a different build strategy on Linux and that folder does not exist in my linux builds.

@olupton
Copy link
Collaborator

olupton commented Jan 19, 2022

In the live-debug session then

# cd D:/a/nrn/nrn/build/src/nrniv && C:/msys64/mingw64/bin/cmake.exe -E env PROJECT_VERSION=8.0 'C:\msys64\usr\bin\bash.exe' D:/a/nrn/nrn/git2nrnversion_h.sh

works and

# cd D:/a/nrn/nrn/build/src/nrniv && C:/msys64/mingw64/bin/cmake.exe -E env PROJECT_VERSION=8.0 C:\msys64\usr\bin\bash.exe D:/a/nrn/nrn/git2nrnversion_h.sh
The system cannot find the file specified

doesn't (note quotes around the path to bash.exe).

Not sure what this means.

@alexsavulescu
Copy link
Member Author

So the issue is with the bash path. If I change C:\msys64\usr\bin\bash.exe toC:/msys64/usr/bin/bash.exe

runneradmin@fv-az108-760 MINGW64 /d/a/nrn/nrn/build/src/nrniv
# cd D:/a/nrn/nrn/build/src/nrniv && C:/msys64/mingw64/bin/cmake.exe -E env PROJECT_VERSION=8.0 C:/msys64/usr/bin/bash.exe D:/a/nrn/nrn/git2nrnversion_h.sh D:/a/nrn/nrn
#define GIT_DATE "2022-01-19"
#define GIT_BRANCH "HEAD"
#define GIT_CHANGESET "5913d31b+"
#define GIT_DESCRIBE "8.0a-726-g5913d31b+"

@olupton
Copy link
Collaborator

olupton commented Jan 19, 2022

I don't see what's changed, but maybe if this path is being passed to cmake -E env then https://cmake.org/cmake/help/v3.15/command/file.html?highlight=path#to-cmake-path would be appropriate? In the live-debug session I see

-- ENV{SHELL}=C:\msys64\usr\bin\bash.exe
-- TO_NATIVE_PATH=C:\msys64\usr\bin\bash.exe
-- TO_CMAKE_PATH=C:/msys64/usr/bin/bash.exe

@alexsavulescu
Copy link
Member Author

From

add_custom_target(
  nrnversion_h
  COMMAND ${CMAKE_COMMAND} -E env PROJECT_VERSION=${PROJECT_VERSION} $ENV{SHELL} ${PROJECT_SOURCE_DIR}/git2nrnversion_h.sh ${PROJECT_SOURCE_DIR} > nrnversion.h.tmp
  COMMAND ${CMAKE_COMMAND} -E copy_if_different nrnversion.h.tmp ${NRN_NRNOC_SRC_DIR}/nrnversion.h
  DEPENDS ${PROJECT_SOURCE_DIR}/git2nrnversion_h.sh)

$ENV{SHELL} now expands to C:\msys64\usr\bin\bash.exe instead of C:/msys64/usr/bin/bash.exe

alexsavulescu added a commit that referenced this issue Jan 19, 2022
* use `bash` since we launch a bash script
* fixes #1590
@alexsavulescu alexsavulescu changed the title Windows CI builds are broken Windows CI builds are broken - $ENV{SHELL} path expands Win-style Jan 19, 2022
alexsavulescu added a commit that referenced this issue Jan 19, 2022
* use `bash` since we launch a bash script
* fixes #1590
alexsavulescu added a commit that referenced this issue Jan 28, 2022
* use `bash` since we launch a bash script
* fixes #1590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Issue related to build/compilation CI Continuous Integration windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants