Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1388200 - llvm-devel should Requires: llvm-static
Summary: llvm-devel should Requires: llvm-static
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: llvm
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-24 17:52 UTC by Ben Boeckel
Modified: 2017-08-28 16:20 UTC (History)
8 users (show)

Fixed In Version: llvm-4.0.1-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-28 16:20:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ben Boeckel 2016-10-24 17:52:58 UTC
When using find_package(LLVM) with the Fedora packages, without the libLLVMSupport.a library installed, the find_package fails because an imported location does not exist.

Comment 1 Josh Stone 2016-10-24 18:08:20 UTC
The problem with that is that "llvm-config --shared-mode" always uses static if the static libraries are present, which also applies to "llvm-config --libs" etc.

Comment 2 Ben Boeckel 2016-10-24 18:20:34 UTC
Maybe the libLLVMSupport.a library should be moved into the -devel package then (it seems to not have a shared variant)?

Comment 3 Josh Stone 2016-10-24 18:30:50 UTC
This is for cmake, right?  I think libLLVMSupport.a is just the first one it tries to import, but it appears to want all of them.

Maybe llvm-cmake ought to be its own package?  That could require everything, but still leave llvm-devel minimal for non-cmake shared builds.  However, I don't see any precedence where other package split this out.

Comment 4 Ben Boeckel 2016-10-24 19:17:03 UTC
Wait, there are no shared versions of the non-libLLVM (and a few other) libraries at all; that's why llvm-config --shared-mode always uses static libs: there are no shared versions of most of them. The static libs should probably just be part of the -devel package and -static be obsoleted.

Comment 5 Josh Stone 2016-10-24 21:10:13 UTC
AIUI, the shared libLLVM.so is a conglomerate of all components.  When you don't have llvm-static present, then "llvm-config --libs" gives you "-lLLVM-3.9.0".

Comment 6 Josh Stone 2016-10-31 17:55:53 UTC
I just learned via a rust issue[1] that in LLVM 3.9, llvm-config finally gives precedence to shared linking when both shared and static are available.  This solves my main concern with pulling in llvm-static.  It now even has explicit options for forcing a mode, --link-shared or --link-static.

[1] https://github.com/rust-lang/rust/issues/34486#issuecomment-257139448


A smaller concern is that llvm-static bloats the buildroot a bit, currently being a 16MB rpm that's 95MB installed.  By policy *most* Fedora packages should not be using these at all, so it's just a waste of space to require it everywhere.

It would be nicer if the cmake scripts could deal with the static libraries maybe not being present, but I don't know how feasible that is.

Comment 7 Ben Boeckel 2016-10-31 18:12:56 UTC
LLVM would have to use a different export file for the static libraries than the shared libraries and implement some logic in LLVMConfig.cmake to deal with it being optional. It shouldn't be too hard to do; the LLVMConfig.cmake would then probably be best to do a COMPONENTS bit to conditionally expect those to be there or not.

Comment 8 Fedora End Of Life 2017-02-28 10:30:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 9 Fedora Admin XMLRPC Client 2017-05-04 13:58:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Tom Stellard 2017-05-29 10:35:59 UTC
This has been fixed in rahwide by splitting out the cmake export files into a static and non-static exports.  The static export file is now distributed with the llvm-static package, so find_package(LLVM) should work without the llvm-static package.

Comment 11 Fedora Update System 2017-08-25 03:22:24 UTC
clang-4.0.1-4.fc26 compiler-rt-4.0.1-1.fc26 libcxx-4.0.1-3.fc26 libcxxabi-4.0.1-3.fc26 lld-4.0.1-4.fc26 lldb-4.0.1-3.fc26 llvm-4.0.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b0bd12720a

Comment 12 Fedora Update System 2017-08-26 22:35:28 UTC
clang-4.0.1-4.fc26, compiler-rt-4.0.1-1.fc26, libcxx-4.0.1-3.fc26, libcxxabi-4.0.1-3.fc26, lld-4.0.1-4.fc26, lldb-4.0.1-3.fc26, llvm-4.0.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b0bd12720a

Comment 13 Fedora Update System 2017-08-28 16:20:05 UTC
clang-4.0.1-4.fc26, compiler-rt-4.0.1-1.fc26, libcxx-4.0.1-3.fc26, libcxxabi-4.0.1-3.fc26, lld-4.0.1-4.fc26, lldb-4.0.1-3.fc26, llvm-4.0.1-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.