Bug 295104 - sdt namespace ambiguity in BlurFilter [patch]
Summary: sdt namespace ambiguity in BlurFilter [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Filters (show other bugs)
Version: 2.5.0
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 22:52 UTC by tropikhajma
Modified: 2012-06-27 07:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.6.0


Attachments
patch (560 bytes, patch)
2012-02-29 22:52 UTC, tropikhajma
Details
patch (4.90 KB, patch)
2012-02-29 23:17 UTC, tropikhajma
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2012-02-29 22:52:11 UTC
Created attachment 69196 [details]
patch

Version:           2.5.0 (using KDE 4.8.0) 
OS:                Solaris

building digikam 2.5 fails with the below error

Reproducible: Always

Steps to Reproduce:
try to build digikam

Actual Results:  
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/core/libs/dimg/filters/fx/blurfilter.cpp", line 213: Error: Overloading ambiguity between "std::sqrt(double)" and "std::sqrt(float)".


Expected Results:  
builds fine

Solaris 11, Solaris Studio 12.3, amd64
Comment 1 caulier.gilles 2012-02-29 23:12:53 UTC
Git commit 5f28bbb8fcf32a3f2914414928c3c0493667d4cd by Gilles Caulier.
Committed on 01/03/2012 at 00:11.
Pushed by cgilles into branch 'master'.

apply patch #69196 to compile fine under Solaris

M  +9    -5    libs/dimg/filters/fx/blurfilter.cpp
M  +12   -7    libs/dimg/filters/fx/blurfilter.h

http://commits.kde.org/digikam/5f28bbb8fcf32a3f2914414928c3c0493667d4cd
Comment 2 tropikhajma 2012-02-29 23:17:22 UTC
Created attachment 69197 [details]
patch

actually there's more of such issues in nearby files.
Also on e occurence of 
...
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/core/libs/dimg/filters/lc/localcontrastcontainer.cpp", line 68: Error: The function "pow" must have a prototype.
"/opt/test2/packages/BUILD/digikam-2.5.0/i386/digikam-2.5.0/core/libs/dimg/filters/lc/localcontrastcontainer.cpp", line 80: Error: The function "pow" must have a prototype
Comment 3 caulier.gilles 2012-03-01 08:21:03 UTC
Git commit e5742da0aefce01ab6d05757fe3a4ac4688c8da7 by Gilles Caulier.
Committed on 01/03/2012 at 09:19.
Pushed by cgilles into branch 'master'.

apply patch #69197 to compile fine under Solaris

M  +11   -9    libs/dimg/filters/fx/blurfilter.cpp
M  +14   -16   libs/dimg/filters/fx/blurfxfilter.cpp
M  +11   -6    libs/dimg/filters/fx/blurfxfilter.h
M  +13   -15   libs/dimg/filters/fx/colorfxfilter.cpp
M  +9    -4    libs/dimg/filters/fx/colorfxfilter.h
M  +58   -87   libs/dimg/filters/fx/distortionfxfilter.cpp
M  +12   -20   libs/dimg/filters/fx/distortionfxfilter.h
M  +37   -39   libs/dimg/filters/fx/raindropfilter.cpp
M  +17   -12   libs/dimg/filters/fx/raindropfilter.h
M  +8    -5    libs/dimg/filters/lc/localcontrastcontainer.cpp
M  +2    -4    libs/dimg/filters/lc/localcontrastcontainer.h
M  +43   -40   libs/dimg/filters/lc/localcontrastfilter.cpp
M  +11   -7    libs/dimg/filters/lc/localcontrastfilter.h

http://commits.kde.org/digikam/e5742da0aefce01ab6d05757fe3a4ac4688c8da7
Comment 4 caulier.gilles 2012-03-01 08:27:36 UTC
tropikhajm,

It's safe to remplace all supported match.h function into qmath.h from Qt4 :

pow => qPow
log => qLn
exp => qExp
sin => qSin
cos => qCos
tan => qTan
floor => qFloor
ceil => qCeil
asin => qAsin
acos => qAcos
fabs => qFabs
atan => qAtan
atan2 => qAtan2
sqrt => qSqrt

Removing cmath.h from file is safe too, because it's included to qmath.h.

If you have more similar patches to apply about this math functions, please follow this way.

Thanks in advance

Gilles Caulier