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

execute_process fails #8

Open
razaqq opened this issue Feb 12, 2024 · 2 comments
Open

execute_process fails #8

razaqq opened this issue Feb 12, 2024 · 2 comments

Comments

@razaqq
Copy link

razaqq commented Feb 12, 2024

im building qwindowkit in github actions on ubuntu-latest with gcc and ninja (cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++)

however this part keeps erroring

execute_process(
COMMAND ${CMAKE_COMMAND} -S ${_src_dir} -B ${_build_dir}
${_generator} ${_build_type}
"-DCMAKE_INSTALL_PREFIX=${_install_dir}" ${FUNC_CONFIGURE_ARGS}
OUTPUT_FILE ${_log_file}
ERROR_FILE ${_log_file}
RESULT_VARIABLE _code
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

CMake Error at DummyProject/ThirdParty/qwindowkit/qmsetup/cmake/modules/InstallPackage.cmake:108 (message):
  Configure failed, check
  "/home/runner/work/DummyProject/DummyProject/build/_build/qmsetup_configure.log"

qmsetup_configure.log:

Run cat /home/runner/work/DummyProject/DummyProject/build/_build/qmsetup_configure.log
CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

so i went back and added some logging just before

execute_process(COMMAND ninja --version)
message("${CMAKE_COMMAND} -S ${_src_dir} -B ${_build_dir} ${_generator} ${_build_type}")

which yields

1.11.1
/usr/local/bin/cmake -S /home/runner/work/DummyProject/DummyProject/ThirdParty/qwindowkit/qmsetup -B /home/runner/work/DummyProject/DummyProject/build/_build/qmsetup -G Ninja -DCMAKE_BUILD_TYPE=Release

the full command cmake runs is:

execute_process(COMMAND /usr/local/bin/cmake -S /home/runner/work/DummyProject/DummyProject/ThirdParty/qwindowkit/qmsetup -B /home/runner/work/DummyProject/DummyProject/build/_build/qmsetup -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/runner/work/DummyProject/DummyProject/build/_install  OUTPUT_FILE /home/runner/work/DummyProject/DummyProject/build/_build/qmsetup_configure.log ERROR_FILE /home/runner/work/DummyProject/DummyProject/build/_build/qmsetup_configure.log RESULT_VARIABLE _code WORKING_DIRECTORY /home/runner/work/DummyProject/DummyProject/ThirdParty/qwindowkit )

so both ninja is found in PATH, and the command run is perfectly fine. how is this possible?
like i said, this happens only in CI, not locally

@razaqq
Copy link
Author

razaqq commented Feb 12, 2024

Update:
It seems that switching from https://github.com/ashutoshvarma/setup-ninja to just installing ninja with apt fixes it. I have no idea how that is possible since both put ninja is path but whatever

@SineStriker
Copy link
Collaborator

I don't know how this happened as well. https://github.com/ashutoshvarma/setup-ninja just downloads Ninja and adds it to PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants