| Summary: | Digikam build fails in matrix.cpp with gcc7 | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Ray Vine <ray-v> |
| Component: | non-core programs | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | bugwatch, ray-v |
| Priority: | P5 | ||
| Version: | R14.0.x [Trinity] | ||
| Hardware: | All | ||
| OS: | Slackware 14 | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
I think I've found a solution but I'm not a programmer so this is just my interpretation of https://gcc.gnu.org/gcc-7/porting_to.html#cmath Digikam built with gcc-7.2.0 and gcc-5.4.0 using this patch. The sharpen filter works so I guess it's OK. --- applications/digikam/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/f2c.h +++ applications/digikam/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/f2c.h @@ -157 +156,0 @@ -#define abs(x) ((x) >= 0 ? (x) : -(x)) --- applications/digikam/digikam/imageplugins/coreplugin/sharpnesseditor/matrix.cpp +++ applications/digikam/digikam/imageplugins/coreplugin/sharpnesseditor/matrix.cpp @@ -32,0 +33,5 @@ +// C++ includes. +#include <stdlib.h> +#include <cmath> +using ::abs; + @@ -38,4 +42,0 @@ - -// C++ includes. - -#include <cmath> |
This build error occurs building digikam R14.0.4 In file included from ../../../../../digikam/imageplugins/coreplugin/sharpnesseditor/matrix.cpp:35:0: /usr/include/stdlib.h:751:12: error: expected unqualified-id before ‘int’ extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ /usr/include/stdlib.h:751:12: error: expected ‘)’ before ‘int’ /usr/include/stdlib.h:751:12: error: expected ‘)’ before ‘int’ In file included from /usr/include/c++/7.2.0/cmath:47:0, from ../../../../../digikam/imageplugins/coreplugin/sharpnesseditor/matrix.cpp:41: /usr/include/c++/7.2.0/bits/std_abs.h:52:11: error: ‘::abs’ has not been declared using ::abs; ^~~ Builds ok with gcc-5.4.0