Bug 913929 - cppad: FTBFS in rawhide
Summary: cppad: FTBFS in rawhide
Alias: None
Product: Fedora
Classification: Fedora
Component: cppad
Version: rawhide
Hardware: i686
OS: Unspecified
Target Milestone: ---
Assignee: Brad Bell
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F19FTBFS
TreeView+ depends on / blocked
Reported: 2013-02-22 09:15 UTC by Dennis Gilmore
Modified: 2013-02-28 14:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-28 13:35:15 UTC
Type: ---

Attachments (Terms of Use)

Description Dennis Gilmore 2013-02-22 09:15:18 UTC
Your package cppad failed to build from source in current rawhide.


Build logs:
root.log: http://kojipkgs.fedoraproject.org/work/tasks/9059/4959059/root.log
build.log: http://kojipkgs.fedoraproject.org/work/tasks/9059/4959059/build.log
state.log: http://kojipkgs.fedoraproject.org/work/tasks/9059/4959059/state.log
NOTE: build logs are cleaned up after 1 week

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

Comment 1 Brad Bell 2013-02-26 01:06:57 UTC
The following test failed

Here is the log information:
    buildArch (cppad-20130000.1-3.fc19.src.rpm, i686)
         ... snip ...
         ... snip ...
    [ 82%] Built target test_more
    Scanning dependencies of target check_test_more
    abs                 OK
         ... snip ...
    limits              Error

This may be the the same problem that has occurred on the MAC, and seems to be a bug in how complex division is implemented.

I will begin by reproducing the problem on a machine I have access to.

Comment 2 Brad Bell 2013-02-26 02:59:03 UTC
The link to the source code above has test_mor where is should be test_more; i.e.,

Comment 3 Brad Bell 2013-02-26 13:58:07 UTC
Bug is reproducible as follows:
1. Build a virtual Fedora-18-i686-Live-KDE system
2. fedpkg clone cppad
3. fedpkg mockbuild

contains the text:
    Scanning dependencies of target check_test_more
         ... snip ...
    jacobian            OK
    limits              Error
    Log                 OK

Note the error does not occur in Fedora-18.

Comment 4 Brad Bell 2013-02-27 01:21:14 UTC
Using the following command in the setup section of cppad.spec:

sed \
-e '/limits(void)/,/^}/s/ok *&=.*/std::cout << "limits: ok =" << ok << std::endl;\n&/' \
-e '/check_epsilon(void)/,/^\t}/s/ok *&=.*/std::cout << "epsilon: ok =" << ok << std::endl;\n&/' \
-e '/check_min(void)/,/^\t}/s/ok *&=.*/std::cout << "min: ok =" << ok << std::endl;\n&/' \
     -i test_more/limits.cpp

    fedpkg mockbuild
the following output helps to isolate the problem to the check_min routine:
    epsilon: ok =1
    epsilon: ok =1
    limits: ok =1
    ... snip ...
    epsilon: ok =1
    epsilon: ok =1
    limits: ok =1
    min: ok =1
    min: ok =0
    limits: ok =0

Comment 5 Brad Bell 2013-02-27 14:30:45 UTC
The g++ 4.8.0 compiler is outsmarting the limits.cpp test by keeping result in higher precision and reusing them, instead of using values stored to memory.

The following code snipet for check_min in limits.cpp sets ok to false:

          tmp[0]     = min[0] / hun[0];
          match[0]   = tmp[0] * hun[0];
          ok        &= abs_geq(match[0]/min[0] - one[0], three[0]*eps[0]);

while the following change sets it to true:

          tmp[0]     = min[0] / hun[0];
          match[0]   = tmp[0] * hun[0];
std::cout << "match / min - 1 = " << match[0] / min[0] - one[0] << std::endl;
          ok        &= abs_geq(match[0]/min[0] - one[0], three[0]*eps[0]);

Comment 6 Brad Bell 2013-02-27 21:43:59 UTC
Preliminary testing indicates that this bug is fixed by the changeset

These changes were backported to the 20130000 stable version. A new release of the upstream source, cppad-20130000.2, will be used once this corresponding tarball is automatically generated this evening.

Comment 7 Brad Bell 2013-02-28 13:35:15 UTC
This bug was fixed in the upstream CppAD trunk with the changeset

These changes were backported to the current upstream stable version of CppAD

A new upstream release was created; see

A corresponding upstream source tarball was created and uploaded to fedora
      8f764be6e3bcc8b201bc4b7a59717cde  cppad-20130000.2.gpl.tgz

The new upstream source had a successful build; see

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