Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 523980

Summary: x11-themes/qtcurve - build fixes for sys-libs/uclibc
Product: Gentoo Linux Reporter: René Rhéaume <rene.rheaume>
Component: [OLD] LibraryAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED FIXED    
Severity: normal CC: qt
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 570544    
Attachments: qtcurve-1.8.17-uclibc.patch
qtcurve-1.8.18-uclibc.patch
qtcurve-1.8.18-uclibc-r1.patch

Description René Rhéaume 2014-09-29 01:01:28 UTC
qtcurve does not build as is on uClibc. It uses the the isnan function. Attached are quick patches for both versions in portage tree.

Reproducible: Always

Steps to Reproduce:
1. Install Lilblue
2. emerge >=x11-themes/qtcurve-1.8.17-r1

Actual Results:  
emake failed

Expected Results:  
qtcurve installed on system
Comment 1 René Rhéaume 2014-09-29 01:02:27 UTC
Created attachment 385694 [details, diff]
qtcurve-1.8.17-uclibc.patch
Comment 2 René Rhéaume 2014-09-29 01:03:00 UTC
Created attachment 385696 [details, diff]
qtcurve-1.8.18-uclibc.patch
Comment 3 Ben de Groot (RETIRED) gentoo-dev 2015-03-29 02:01:51 UTC
(In reply to René Rhéaume from comment #2)
> Created attachment 385696 [details, diff] [details, diff]
> qtcurve-1.8.18-uclibc.patch

Is this supposed to be a conditional patch? Because after applying this, I get an error with glibc:

/var/tmp/portage/x11-themes/qtcurve-1.8.18/work/qtcurve-1.8.18_build/.cmake_utils_base/cmake_c_macros/include_fix/qtcurve-utils/color.h: In function ‘QColor qtcColorTint(const QColor*, const QColor*, double)’:
/var/tmp/portage/x11-themes/qtcurve-1.8.18/work/qtcurve-1.8.18_build/.cmake_utils_base/cmake_c_macros/include_fix/qtcurve-utils/color.h:253:21: error: expected unqualified-id before ‘(’ token
     } else if (std::isnan(amount)) {


(and the same error for the second hunk of the patch)
Comment 4 René Rhéaume 2015-04-03 11:33:15 UTC
Created attachment 400466 [details, diff]
qtcurve-1.8.18-uclibc-r1.patch

It was not intended to be a conditional patch. Here is an updated version for version 1.8.18 that should also work with glibc.
Comment 5 Anthony Basile gentoo-dev 2015-04-21 13:38:57 UTC
(In reply to Ben de Groot from comment #3)
> (In reply to René Rhéaume from comment #2)
> > Created attachment 385696 [details, diff] [details, diff] [details, diff]
> > qtcurve-1.8.18-uclibc.patch
> 
> Is this supposed to be a conditional patch? Because after applying this, I
> get an error with glibc:
> 
> /var/tmp/portage/x11-themes/qtcurve-1.8.18/work/qtcurve-1.8.18_build/.
> cmake_utils_base/cmake_c_macros/include_fix/qtcurve-utils/color.h: In
> function ‘QColor qtcColorTint(const QColor*, const QColor*, double)’:
> /var/tmp/portage/x11-themes/qtcurve-1.8.18/work/qtcurve-1.8.18_build/.
> cmake_utils_base/cmake_c_macros/include_fix/qtcurve-utils/color.h:253:21:
> error: expected unqualified-id before ‘(’ token
>      } else if (std::isnan(amount)) {
> 
> 
> (and the same error for the second hunk of the patch)

My understanding is that isnan() has been deprecated in favor of std::isnan() so I'm not sure why you are getting this failure.  I tested the following code (from the link below) on both glibc and uclibc.

#include <iostream>
#include <cmath>
#include <cfloat>
 
int main()
{
    std::cout << std::boolalpha
              << "isnan(NaN) = " << std::isnan(NAN) << '\n'
              << "isnan(Inf) = " << std::isnan(INFINITY) << '\n'
              << "isnan(0.0) = " << std::isnan(0.0) << '\n'
              << "isnan(DBL_MIN/2.0) = " << std::isnan(DBL_MIN/2.0) << '\n'
              << "isnan(0.0 / 0.0)   = " << std::isnan(0.0/0.0) << '\n'
              << "isnan(Inf - Inf)   = " << std::isnan(INFINITY - INFINITY) << '\n';
}

This compiles and runs correctly when built using either c++98 or c++11:

    g++ -std=gnu++98 -o isnan-test isnan-test.cpp
    g++ -std=gnu++11 -o isnan-test isnan-test.cpp

I'm using gcc-4.8.4.  The error tends to suggest that there is some macro munging things up.

See: http://en.cppreference.com/w/cpp/numeric/math/isnan
Comment 6 Michael Palimaka (kensington) gentoo-dev 2017-08-26 08:16:49 UTC
In qtcurve-1.9.0-rc1 all instances of isnan are qualified with std::.