Bug 1055053

Summary: package doesn't use optflags
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: perl-PDL-Graphics-PLplotAssignee: Ralf Corsepius <rc040203>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: i, rc040203
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: NotReady
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-13 16:26:27 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:
Attachments:
Description Flags
Comment none

Description Michael Schwendt 2014-01-18 12:04:43 UTC
http://kojipkgs.fedoraproject.org//packages/perl-PDL-Graphics-PLplot/0.67/1.fc20/data/logs/x86_64/build.log

gcc -c  -I/usr/lib64/perl5/vendor_perl/PDL/Core  -I/usr/include/plplot -I/usr/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"0.67\" -DXS_VERSION=\"0.67\" -fPIC "-I/usr/lib64/perl5/CORE"   PLplot.c

Comment 1 Christopher Meng 2014-02-13 08:03:34 UTC
Created attachment 915852 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 2 Christopher Meng 2014-02-13 08:04:02 UTC
Command:

gcc -c  -I/usr/lib/perl5/vendor_perl/PDL/Core  -I/usr/include/plplot -I/usr/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -g   -DVERSION=\"0.67\" -DXS_VERSION=\"0.67\" -fPIC "-I/usr/lib/perl5/CORE"   PLplot.c

Comment 3 Michael Schwendt 2014-02-13 09:10:22 UTC
Was it necessary to cut'n'paste such a huge part of the output into this ticket?

Have you tried _adding_ the optflags without wiping out existing CFLAGS?

Comment 4 Christopher Meng 2014-02-13 09:12:33 UTC
(In reply to Michael Schwendt from comment #3)
> Was it necessary to cut'n'paste such a huge part of the output into this
> ticket?
> 
> Have you tried _adding_ the optflags without wiping out existing CFLAGS?

Not yet, will be done later. I've marked NotReady.

Comment 5 Michael Schwendt 2014-02-13 09:37:35 UTC
NotReady is meaningless for normal bug reports.


Building with

  make %{?_smp_mflags} OPTIMIZE="%{optflags} %{__global_ldflags}"

would be one solution. Of course, adding guard to the spec file that verifies whether the OPTIMIZE variable is still supported would be a good idea.

The many warnings you get are only due to the -Wall option in %optflags.

Comment 6 Ralf Corsepius 2014-07-13 15:55:23 UTC
Taking. This is a trivial packaging bug.

It's an arched packages using a Makefile.PL.

Such packages are supposed to be built
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="${RPM_OPT_FLAGS}"

Passing __global_ldflags usually is not necessary.

However, and this worse: When having fixed this bug, an FTBFS occurs.

I am going to apply patches to fix both.