Summary: | devel/shiboken2: picks up wrong llvm, registers wrong dependency, causes unnecessary rebuilds | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Christoph Moench-Tegeder <cmt> | ||||||
Component: | Individual Port(s) | Assignee: | Christoph Moench-Tegeder <cmt> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Some People | CC: | cmt, lbartoletti | ||||||
Priority: | --- | Keywords: | easy, patch, patch-ready | ||||||
Version: | Latest | Flags: | lbartoletti:
maintainer-feedback+
|
||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241490 | ||||||||
Attachments: |
|
Description
Christoph Moench-Tegeder
2021-02-21 21:16:49 UTC
Created attachment 222709 [details]
fix llvm detection and nail dependency in place
Turns out I was too quick on this one: pkg also does it's best to sabotage our efforts and registers the dependency on the highest versioned libclang.so available, not on the libclang.so we're actually linking to (and there I was, only poking at the binaries...) or let alone the package origin we specified in the Makefile.
To fix that, we also have to do a little dance with LLVM_DEFAULT the get the correct libclang.so. AS LLVM_DEFAULT is "90" for llvm 9.0 and "10" for llvm 10.0 (etc, note single digit vs two digits) I used a regexp which will work for llvm versions between 6 and 59 (I hope that I don't have to care about this anymore when llvm hits 60).
Good catch. LGTM. A commit references this bug: Author: cmt Date: Tue Feb 23 19:35:32 UTC 2021 New revision: 566424 URL: https://svnweb.freebsd.org/changeset/ports/566424 Log: devel/shiboken2: depend on correct llvm port between shiboken2's build system picking the highest versioned llvm-config available and pkg registering a dependency on the highest versioned libclang.so available, we need to - pass the correct llvm-config via cmake variable and not via environment, as the environment variable is not used by shiboken's build system - specify the dependency on libclang.so with it's version number; and to avoid breaking (or requiring manual intervention) with the next LLVM_DEFAULT switch, extract that version number from LLVM_DEFAULT in a way that should be working for llvm versions from 6 to 59 (unless we choose to change our llvm port naming scheme), which seems to give us some safety margin. PR: 253749 Approved by: lbartoletti (kde@) Changes: head/devel/shiboken2/Makefile committed ports r566424 |