Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1307731

Summary: libqalculate: FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: libqalculateAssignee: Mukundan Ragavan <nonamedotc>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dakingun, nonamedotc, rdieter, yselkowi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-20 01:43:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1305208    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2016-02-13 21:47:43 UTC
Your package libqalculate failed to build from source in current rawhide.

http://koji.fedoraproject.org/koji/taskinfo?taskID=12831934

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

Comment 1 Fedora Release Engineering 2016-02-13 21:47:45 UTC
Created attachment 1125254 [details]
build.log

Comment 2 Fedora Release Engineering 2016-02-13 21:47:46 UTC
Created attachment 1125255 [details]
root.log

Comment 3 Fedora Release Engineering 2016-02-13 21:47:48 UTC
Created attachment 1125256 [details]
state.log

Comment 4 Yaakov Selkowitz 2016-02-17 03:17:50 UTC
MathStructure.cc:7166:53: error: no matching function for call to 'MathStructure::gcd(MathStructure&, MathStructure&, MathStructure&, const EvaluationOptions&, bool)'
  MathStructure::gcd(cont_c, cont_d, gamma, eo, false);
                                                     ^

This looks like the "Cannot convert 'bool' to 'T*'" case in the Porting to GCC 6 page.  Change the false to NULL.

Comment 5 Mukundan Ragavan 2016-02-19 01:43:01 UTC
I either messed up the patch or there is another issue ... :(

Looking ...

https://koji.fedoraproject.org/koji/taskinfo?taskID=13016298

Comment 6 Kevin Kofler 2016-02-19 01:59:18 UTC
This now fails due to a missing BuildRequires:
Can't locate Getopt/Long.pm in @INC (you may need to install the Getopt::Long module) (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at ../intltool-merge line 42.

By the way, using NULL in C++ is not that great an idea. It will work in most cases (and should be fine here), but e.g. for varargs functions, on some platforms, you may be in for a surprise. (Though, as far as I know, glibc with g++ defines it to __null, which behaves essentially the same as the C++11 nullptr and is thus safe. Concretely, the issue is that some platforms just define NULL to 0, which then has the wrong size when passed to a varargs function.) For code that requires C++11, nullptr can be used, otherwise, static_cast<Foo *>(0) (with the correct Foo type) is the most portable and safe version.

Comment 7 Yaakov Selkowitz 2016-02-19 02:18:18 UTC
(In reply to Kevin Kofler from comment #6)
> This now fails due to a missing BuildRequires:
> Can't locate Getopt/Long.pm in @INC (you may need to install the
> Getopt::Long module) (@INC contains: /usr/local/lib/perl5
> /usr/local/share/perl5 /usr/lib/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at
> ../intltool-merge line 42.

IOW, add BuildRequires: perl(Getopt::Long)

> By the way, using NULL in C++ is not that great an idea. It will work in
> most cases (and should be fine here), but e.g. for varargs functions, on
> some platforms, you may be in for a surprise. (Though, as far as I know,
> glibc with g++ defines it to __null, which behaves essentially the same as
> the C++11 nullptr and is thus safe. Concretely, the issue is that some
> platforms just define NULL to 0, which then has the wrong size when passed
> to a varargs function.)

In theory, yes, but NULL should be safe with either GCC or Clang regardless of target.  <stddef.h> is provided by GCC, and while the headers may be used by clang they both define __GNUG__ in C++:

#ifdef __GNUG__
#define NULL __null
#else   /* G++ */
#ifndef __cplusplus
#define NULL ((void *)0)
#else   /* C++ */
#define NULL 0
#endif  /* C++ */
#endif  /* G++ */

Comment 8 Mukundan Ragavan 2016-02-19 02:22:10 UTC
(In reply to Kevin Kofler from comment #6)
> This now fails due to a missing BuildRequires:
> Can't locate Getopt/Long.pm in @INC (you may need to install the
> Getopt::Long module) (@INC contains: /usr/local/lib/perl5
> /usr/local/share/perl5 /usr/lib/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at
> ../intltool-merge line 42.


Yup! I just had noticed it going through the build log ... 

Thanks a lot Kevin!

Comment 9 Upstream Release Monitoring 2016-02-19 02:41:59 UTC
nonamedotc's libqalculate-0.9.7-17.fc24 completed http://koji.fedoraproject.org/koji/buildinfo?buildID=736865

Comment 10 Mukundan Ragavan 2016-02-20 01:43:12 UTC
Thanks again Yaakov and Kevin.