Created attachment 1208622 [details] Spec file patch for NOOPT Description of problem: When lapack is compiled, two source files, slaran.f and dlaran.f, are compiled without -fPIC (or any other flags). This has no significant effect on x86_64, armv7hl, or aarch64, where the generated code is already position-independent. For i686, it causes the generation of 8 text relocations in liblapacke.so.3; rpmlint reports this as "lapack.i686: E: shlib-with-non-pic-code /usr/lib/liblapacke.so.3.6.1" The riscv64 and mipsel linkers are stricter and produce a FTBFS, for instance https://mipsdistros.imgtec.com/fedora/development/23/mipsel/stage4/all/lapack-3.5.0-12.fc23/build.log . (I'm working on riscv64 but I didn't save the build log) Version-Release number of selected component (if applicable): lapack-3.6.1-1.fc25 How reproducible: Always Steps to Reproduce: 1. Compile lapack from sources on any platform Actual results: 1. dlaran.f and slaran.f are built without -fPIC or other Fedora compiler options, for instance "gfortran -c dlaran.f" (all platforms) 2. liblapacke.so.3 fails to link due to incompatible relocations (mipsel, riscv64) 3. liblapacke.so.3 links successfully, but has text relocations (i686) Expected results: 1. dlaran.f and slaran.f are built with -fPIC and other Fedora-appropriate compiler flags (testable: everywhere) 2. liblapacke.so.3 links successfully (testable: mipsel, riscv64) 3. liblapacke.so.3 has no text relocations (testable: i686) Additional info: This appears to be caused by the Makefile using $(NOOPT) for those two files, which is set in some make calls but omitted in the make call for tmglib. Applying the attached patch fixes FTBFS on riscv64; I have not tested it on i686 or mipsel.
lapack-3.6.1-2.fc25 has been pushed to the Fedora 25 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-2016-5a5541286a
lapack-3.6.1-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.