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

fix library-loading issues in editable installs #553

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

jameslamb
Copy link
Member

Contributes to rapidsai/build-planning#118

The pattern introduced in #551 breaks editable installs in devcontainers. In that type of build, libkvikio.so is built outside of the wheel but not installed, so it can't be found by ld. Extension modules in kvikio are able to find it via RPATHs instead.

This proposes:

  • try-catching the entire library-loading attempt, to silently do nothing in cases like that
  • adding an import of the kvikio Python library in the devcontainers CI job, as a smoke test to catch issues like this in the future

Notes for Reviewers

How I tested this

Reproduced that with the CUDA 12.5 pip devcontainers today:

build-all
python -c "import kvikio"
# OSError: libkvikio.so: cannot open shared object file: No such file or directory

Confirmed that the changes in this PR fix that.

@jameslamb jameslamb added bug Something isn't working non-breaking Introduces a non-breaking change labels Nov 15, 2024
@jameslamb jameslamb requested review from a team as code owners November 15, 2024 16:39
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About as good as we can do for now. Let's revisit in 25.02.

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks James

@jameslamb
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 75a69cc into rapidsai:branch-24.12 Nov 15, 2024
57 checks passed
@jameslamb jameslamb deleted the fix-load-library branch November 15, 2024 17:51
rapids-bot bot pushed a commit to rapidsai/cuspatial that referenced this pull request Nov 15, 2024
Contributes to rapidsai/build-planning#118

The pattern introduced in #1483 breaks editable installs in devcontainers. In that type of build, `libcuspatial.so` is built outside of the wheel but **not installed**, so it can't be found by `ld`. Extension modules in `cuspatial` are able to find it via RPATHs instead.

This proposes:

* try-catching the entire library-loading attempt, to silently do nothing in cases like that
* ~adding an import of the `cuspatial` Python library in the `devcontainers` CI job, as a smoke test to catch issues like this in the future~ *(edit: removed those, [`devcontainer` builds run on CPU nodes](https://github.com/rapidsai/shared-workflows/blob/4e84062f333ce5649bc65029d3979569e2d0a045/.github/workflows/build-in-devcontainer.yaml#L19))*

## Notes for Reviewers

### How I tested this

Tested this approach on rapidsai/kvikio#553

#

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #1484
rapids-bot bot pushed a commit to rapidsai/cudf that referenced this pull request Nov 19, 2024
Contributes to rapidsai/build-planning#118

The pattern introduced in #17316 breaks editable installs in devcontainers. In that type of build, `libcudf.so` is built outside of the wheel but **not installed**, so it can't be found by `ld`. Extension modules in `cudf` and `pylibcudf` are able to find it via RPATHs instead.

This proposes:

* try-catching the entire library-loading attempt, to silently do nothing in cases like that
* ~adding imports of the `cudf` and `pylibcudf` libraries in the `devcontainers` CI job, as a smoke test to catch issues like this in the future~ *(edit: removed those, [`devcontainer` builds run on CPU nodes](https://github.com/rapidsai/shared-workflows/blob/4e84062f333ce5649bc65029d3979569e2d0a045/.github/workflows/build-in-devcontainer.yaml#L19))*

## Notes for Reviewers

### How I tested this

Tested this approach on rapidsai/kvikio#553

#

Authors:
  - James Lamb (https://github.com/jameslamb)
  - Matthew Murray (https://github.com/Matt711)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Matthew Murray (https://github.com/Matt711)

URL: #17338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants