Description of problem: The llvm5.0 compatibility package no longer builds in rawhide. The previous successful build is here: https://koji.fedoraproject.org/koji/buildinfo?buildID=1013148 My guess is that this is caused by Fedora changing the default C_FLAGS and CXX_FLAGS. Version-Release number of selected component (if applicable): llvm5.0-5.0.1-1.fc28 How reproducible: Always Steps to Reproduce: 1. fedpkg clone llvm5.0 2. cd llvm5.0 3. fedpkg scratch-build Actual results: Build fails. Expected results: Build succeeds.
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.