Bug 1538318
| Summary: | llvm5.0 compatibility package doesn't build with -Wl,-z,defs | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tom Stellard <tstellar> |
| Component: | llvm5.0 | Assignee: | Tilmann Scheller <tschelle> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | low | ||
| Version: | 28 | CC: | awilliam, tstellar |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-04 22:37:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Tom Stellard
2018-01-24 19:48:26 UTC
I found the root cause of the build failures: "-Wl,-z,defs" was added to the linker flags a couple of days ago (it was added in redhat-rpm-config-84-1.fc28, additional details in bug 1535422). This causes the linker invocation of LLVMHello.so to fail with several undefined references. LLVMHello.so is an example optimization pass that is loaded dynamically by the opt tool. Since LLVMHello.so is effectively a plugin that dynamically links to an executable (opt) when it is loaded it can never be built with "-Wl,-z,defs". I think the pragmatic way forward for the llvm5.0 compatibility package is to just build it with "%undefine _strict_symbol_defs_build" for now (this is the canonical way to disable the linker flag from above). I did a test build and that fixed the build failures. Longer term (e.g. for LLVM 7.0) we should probably inspect every shared object that is part of the package and build it with "-Wl,-z,defs" if possible), I believe that we are already building libLLVM.so with "-Wl,-z,defs" but I need to double check to be sure. I added %undefine _strict_symbol_defs_build in llvm5.0-5.0.1-2.fc28. Leaving this bug open until we have a long term fix. It looks like the "-Wl,-z,defs" change was just reverted again: https://bugzilla.redhat.com/show_bug.cgi?id=1535422#c6 I guess independently of that it would still be good to build as many LLVM shared libraries as possible with "-Wl,-z,defs" in the long term. This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle. Changing version to '28'. adjusting for accuracy. llvm5.0-5.0.1-7.fc28 was successfully built for f28. |