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

build_cudaq.sh tries to build the project even if configuration fails. #2410

Open
3 of 4 tasks
boschmitt opened this issue Nov 25, 2024 · 0 comments
Open
3 of 4 tasks
Labels
build The issue related to the CUDA Quantum build

Comments

@boschmitt
Copy link
Collaborator

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

When trying to debug #2409, I noticed that the build script will try do build the project even if configuration fails:

-- Configuring incomplete, errors occurred!
Building CUDA-Q with configuration Release...
ninja: error: loading 'build.ninja': No such file or directory
Error: Build failed. Please check the console output or the files in the /workspace/build/logs directory.

Steps to reproduce the bug

N/A

Expected behavior

If configuration fails, there is not reason to try building the project.

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

Suggestions

Check if the configuration step was successful in here:

if $verbose; then
echo $cmake_args | xargs cmake
else
echo $cmake_args | xargs cmake \
2> logs/cmake_error.txt 1> logs/cmake_output.txt
fi
# Build and install CUDA-Q
echo "Building CUDA-Q with configuration $build_configuration..."
logs_dir=`pwd`/logs
if $verbose; then
ninja install
status=$?
else
echo "The progress of the build is being logged to $logs_dir/ninja_output.txt."
ninja install 2> "$logs_dir/ninja_error.txt" 1> "$logs_dir/ninja_output.txt"
status=$?
fi

@schweitzpgi schweitzpgi added the build The issue related to the CUDA Quantum build label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The issue related to the CUDA Quantum build
Projects
None yet
Development

No branches or pull requests

2 participants