Repository navigation
Fix/downstream linking - #87
Merged
olivhoenen merged 3 commits intoOct 14, 2026
Merged
Conversation
Windows has no runtime search path (DLLs are found through PATH) and MSVC's link.exe rejects -Wl,-rpath, which made pkg-config --libs al-core unusable for linking on Windows.
libal is always a shared library linking Boost privately, so the exported target doesn't reference it. find_dependency(Boost) made find_package(al-core) fail where only the Boost runtime is installed, e.g. conda environments without libboost-devel.
SimonPinches
requested review from
olivhoenen and
prasad-sawantdesai
as code owners
October 7, 2026 10:54
Collaborator
Could you point to issue/comment that explains the need for such fix, for proper ref? |
Contributor
Author
Good point. I've expanded the PR description with references to the downstream workarounds this replaces. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix linking for downstream projects here, rather than in every package that builds on IMAS-Core: they no longer need to strip unsupported linker flags from
al-core.pc, or install Boost to use theal-coreCMake package.Changes
al-core.pc: emit-Wl,-rpathonly on non-Windows platforms. Windows has no runtime search path (DLLs are found throughPATH), and MSVC/lld-link rejects-rpath. This completes Drop --defsym in al-core.pc when not accepted #84, which did the same for--defsym(not yet in a release).al-coreConfig.cmake: removefind_dependency(Boost COMPONENTS filesystem).libalis always a shared library that links BoostPRIVATE, so the exportedal-core::altarget never references Boost and consumers don't need it.Why
1. GNU-ld-only flags in
al-core.pc: Apple's ld64 rejects--defsym, and the Windows linker rejects both--defsymand-rpath. Downstream builds currently strip them by hand:pkg_check_modules(al-core)produces link options the Windows linker rejects.2.
find_dependency(Boost)breaksfind_package(al-core):libboostpackage ships no Boost CMake config (onlylibboost-develdoes);BoostDetectToolsetwhen no C++ compiler is enabled. Reproduced with the IMAS-Core 5.7.1 module on SDCC viafind_package(al-fortran)(IMAS-Fortran's new CMake package config).CI
The
macosx_arm64wheel failures are pre-existing ondevelop: Homebrew now ships OpenSSL 4.0, which breaks the-Werrorbuild of UDA. They are fixed separately in #90, with the upstream UDA fix in ukaea/UDA#144.