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

Implement build.sh #185

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Implement build.sh #185

merged 3 commits into from
Mar 28, 2023

Conversation

madsbk
Copy link
Member

@madsbk madsbk commented Mar 27, 2023

Implement the build.sh that other RAPIDS projects use.

Need Help

Running ./build.sh libkvikio kvikio legate now works and cleaning the environment also works ./build.sh clean.

However, after a clean, installing legate doesn't work.

$ ./build.sh clean legate
CMake Error at /home/mkristensen/apps/miniconda3/envs/legate-0227/lib/cmake/legate_core/legate_core-config.cmake:332 (add_library):
  add_library cannot create ALIAS target "legate::legate_kvikio_python"
  because another target with the same name already exists.
Call Stack (most recent call first):
  CMakeLists.txt:36 (legate_default_python_install)

If I delete the installed cmake files from the conda environment, it works again:

$ rm -R /home/mkristensen/apps/miniconda3/envs/legate-0227/lib/cmake/legate_kvikio
$ ./build.sh clean legate

Anyone knows what is going on?

@madsbk madsbk added help wanted Extra attention is needed improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Mar 27, 2023
@robertmaynard
Copy link
Contributor

You are adding the legate::legate_kvikio_python target on line 32 and the legate_add_cpp_subdirectory is also trying to add the target which fails.

This occurs since the legate_add_cpp_subdirectory only checks for an existing legate::legate_kvikio_python target when invoked from scikit-build. To work around this you will need to do something like:

find_package(legate_kvikio QUIET)
find_package(legate_core REQUIRED)

if(NOT TARGET legate::legate_kvikio_python)
  legate_add_cpp_subdirectory(cpp TARGET legate_kvikio EXPORT legate_kvikio-export)
  legate_default_python_install(legate_kvikio EXPORT legate_kvikio-export)
endif()

@madsbk madsbk marked this pull request as ready for review March 28, 2023 06:12
@madsbk
Copy link
Member Author

madsbk commented Mar 28, 2023

Thanks @robertmaynard, it works now. Can I ask you to review this PR?

@madsbk
Copy link
Member Author

madsbk commented Mar 28, 2023

/merge

@rapids-bot rapids-bot bot merged commit 7320b52 into rapidsai:branch-23.04 Mar 28, 2023
@madsbk madsbk deleted the build_script branch March 29, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants