-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix libbsd linking problem with builtin_llvm=OFF
#12154
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
Conversation
Can one of the admins verify this patch? |
d5ac8db
to
6d467eb
Compare
Works with |
@phsft-bot build |
Starting build on |
Build failed on ROOT-ubuntu2004/python3. Failing tests:
And 2 more |
Build failed on mac12/noimt. Warnings:
|
05f4fdf
to
7175780
Compare
Starting build on |
7175780
to
f13ccf8
Compare
Starting build on |
Signed-off-by: Stephan Lachnit <[email protected]>
Signed-off-by: Stephan Lachnit <[email protected]>
f13ccf8
to
8929db8
Compare
Starting build on |
I tested this now in a working ROOT install and it seems to work just fine. |
Build failed on ROOT-ubuntu2204/nortcxxmod. |
Build failed on ROOT-debian10-i386/soversion. Failing tests: |
When using this in externals projects, this happens:
Should be reasonably easy to fix. |
Starting build on |
Fixed but closing since not required anymore with #13420. |
Build failed on ROOT-ubuntu2004/python3. Errors:
|
Build failed on windows10/default. Errors:
|
Build failed on ROOT-performance-centos8-multicore/soversion. Errors:
|
Build failed on mac11/noimt. Errors:
|
Build failed on ROOT-ubuntu2204/nortcxxmod. |
Build failed on mac12arm/cxx20. Errors:
|
Signed-off-by: Stephan Lachnit [email protected]
This Pull request:
Changes or fixes:
Fix for #12152. Requires #12153.
The idea is the following:
libbsd
option &find_packge
module definingLIBBSD::libbsd
targetR__USE_LIBBSD
inRConfigure.h
iflibbsd
enabledstrlcpy
to includebsd/string.h
ifR__USE_LIBBSD
definedLIBBSD::libbsd
to the public linking interface ofClib
Unfortunately, this does not work. The reason here is that (for some reason beyond me)
rootcling_stage1
,libCling.so
,bin/root
and probably more don't link toClib
as target but instead fetch the target object directly.Relevant CMake documentation:
$<TARGET_OBJECTS:tgt
Example using
rootcling_stage1
:Currently in CMake:
I link against the
Clib
object library, but ignores any target properties like for example this line:I don't see why using the
Clib
target directly should break anything? It's linked also directly, the only difference is that target properties are ignored which shouldn't be the case.I added a commit with this approach and it seems to work.
Checklist:
This PR fixes #12152.