Skip to content

fix(build): find libomp beside the Clang resource directory - #20

Closed
HaoZeke wants to merge 2 commits into
mainfrom
fix/clang-libomp-dir
Closed

HaoZeke wants to merge 2 commits into
mainfrom
fix/clang-libomp-dir

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 17, 2026

Copy link
Copy Markdown
Member

Building the v0.4.2 tag with system Clang 18 on Ubuntu fails at link time:
libomp-dev puts libomp.so next to the Clang resource directory, and
clang -print-file-name=libomp.so prints the bare name. Meson, CMake and
build.rs now also search that directory, after -print-file-name and
LIBRARY_PATH.

The second commit adds scripts/prove-published-install.sh and a CI job. It
installs linkcell from crates.io, the PyPI wheel, the staged-recipes conda
recipe and the release tag, each in a clean prefix, then builds this tree with
Clang. Every route runs the README quickstart and a periodic k-nearest check
against a brute-force image reference on ortho, sheared and triclinic cells.

Locally, we found that the crates.io 0.4.2 crate, the 0.4.2 PyPI wheel, the
conda recipe built with rattler-build 0.80.2 and the v0.4.2 tag built with gcc
all pass. The same tag fails with Clang 18.1.3, which is the bug fixed here,
while this branch passes with Clang 18.1.3. Every passing route matched the
reference to within 1.8e-14 in dist2.

Ubuntu's libomp-dev leaves the linker name next to the compiler
resource directory, and Clang's -print-file-name prints the bare
name. Meson, CMake, and the crate now search that directory after
-print-file-name and LIBRARY_PATH.
Install the crates.io crate, the PyPI wheel, the staged-recipes
conda recipe, and the release tag, then build this tree with Clang.
@HaoZeke

HaoZeke commented Nov 17, 2026

Copy link
Copy Markdown
Member Author

Superseded by #21. This is the earlier Meson/CMake/build.rs cut of the same libomp search; #21 is the recut on current main after #17 already landed the crate-side fix.

@HaoZeke HaoZeke closed this Nov 17, 2026
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

Successfully merging this pull request may close these issues.

1 participant