Bug 1383081 - dlaran.f and slaran.f built without -fPIC, causing FTBFS on riscv64 & mipsel
Summary: dlaran.f and slaran.f built without -fPIC, causing FTBFS on riscv64 & mipsel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lapack
Version: 25
Hardware: riscv64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-09 17:05 UTC by sorear2
Modified: 2016-10-15 16:10 UTC (History)
4 users (show)

Fixed In Version: lapack-3.6.1-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-15 16:10:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Spec file patch for NOOPT (440 bytes, text/plain)
2016-10-09 17:05 UTC, sorear2
no flags Details

Description sorear2 2016-10-09 17:05:04 UTC
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.

Comment 1 Fedora Update System 2016-10-12 01:54:07 UTC
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

Comment 2 Fedora Update System 2016-10-15 16:10:21 UTC
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.


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