Bug 1548750

Summary: openblas: Partial build flags injection
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: openblasAssignee: Susi Lehtola <susi.lehtola>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: susi.lehtola
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openblas-0.2.20-8.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-13 23:11:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1539083    

Description Florian Weimer 2018-02-24 19:06:12 UTC
In several places, the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config are not used for linking DSOs:

gcc  -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DNO_WARMUP -DMAX_CPU_NUMBER=128 -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -I..  -shared -o ../libRblas.so \
-Wl,--whole-archive ../libRblas-r0.2.20.a -Wl,--no-whole-archive \
-Wl,-soname,libRblas.so -lm -lgfortran -lm -lgfortran

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -fPIC -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DNO_WARMUP -DMAX_CPU_NUMBER=128 -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -I..  -shared -o ../libopenblas-r0.2.20.so \
-Wl,--whole-archive ../libopenblas-r0.2.20.a -Wl,--no-whole-archive \
-Wl,-soname,libopenblas.so.0 -lm -lgfortran -lm -lgfortran

Flags such as -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld are missing.

There are just examples from the build log, other DSOs are affected as well.

See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.

Comment 1 Susi Lehtola 2018-02-27 17:00:18 UTC
LDFLAGS should work now properly.

Comment 2 Fedora Update System 2018-02-27 17:13:29 UTC
openblas-0.2.20-8.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-977d3a6bef

Comment 3 Fedora Update System 2018-02-28 18:08:34 UTC
openblas-0.2.20-8.fc27 has been pushed to the Fedora 27 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-2018-977d3a6bef

Comment 4 Fedora Update System 2018-03-13 23:11:55 UTC
openblas-0.2.20-8.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.