Khanattila / KNLMeansCL

An optimized OpenCL implementation of the Non-local means de-noising algorithm
GNU General Public License v3.0
107 stars 22 forks source link

fail build with GCC 6.1.1(?) #18

Closed sl1pkn07 closed 8 years ago

sl1pkn07 commented 8 years ago
g++ -O2 -std=c++11 -Wall -Wno-unused-local-typedefs -I. -I./shared -I./include -march=native -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2  -fPIC  -I/usr/include/vapoursynth -c KNLMeansCL/KNLMeansCL.cpp -o KNLMeansCL/KNLMeansCL.o
In file included from /usr/include/CL/cl.h:30:0,
                 from KNLMeansCL/KNLMeansCL.h:37,
                 from KNLMeansCL/KNLMeansCL.cpp:36:
KNLMeansCL/KNLMeansCL.cpp:789:37: error: exponent has no digits
         const cl_float pattern_u3 = CL_FLT_EPSILON;
                                     ^
KNLMeansCL/KNLMeansCL.cpp: In function 'const VSFrameRef* VapourSynthPluginGetFrame(int, int, void**, void**, VSFrameContext*, VSCore*, const VSAPI*)':
KNLMeansCL/KNLMeansCL.cpp:789:37: error: unable to find numeric literal operator 'operator""f'
         const cl_float pattern_u3 = CL_FLT_EPSILON;
                                     ^
KNLMeansCL/KNLMeansCL.cpp:789:37: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
KNLMeansCL/KNLMeansCL.cpp:813:42: warning: '_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)' is deprecated [-Wdeprecated-declarations]
         cl_command_queue command_queue = clCreateCommandQueue(d->context, d->deviceID, 0, NULL);
                                          ^~~~~~~~~~~~~~~~~~~~
In file included from KNLMeansCL/KNLMeansCL.h:37:0,
                 from KNLMeansCL/KNLMeansCL.cpp:36:
/usr/include/CL/cl.h:1422:1: note: declared here
 clCreateCommandQueue(cl_context                     /* context */,
 ^~~~~~~~~~~~~~~~~~~~
KNLMeansCL/KNLMeansCL.cpp:813:95: warning: '_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)' is deprecated [-Wdeprecated-declarations]
         cl_command_queue command_queue = clCreateCommandQueue(d->context, d->deviceID, 0, NULL);
                                                                                               ^
In file included from KNLMeansCL/KNLMeansCL.h:37:0,
                 from KNLMeansCL/KNLMeansCL.cpp:36:
/usr/include/CL/cl.h:1422:1: note: declared here
 clCreateCommandQueue(cl_context                     /* context */,
 ^~~~~~~~~~~~~~~~~~~~
make: *** [GNUmakefile:24: KNLMeansCL/KNLMeansCL.o] Error 1
Khanattila commented 8 years ago

CL_FLT_EPSILON's error? What the hell have they done?

sl1pkn07 commented 8 years ago

IDK xd

killhellokitty commented 8 years ago

Your most recent commit fixed the issue. It built without errors. However the packaged version still pumps out the errors listed above.

sl1pkn07 commented 8 years ago

not at all

g++ -O2 -std=c++11 -Wall -Wno-unused-local-typedefs -I. -I./shared -I./include -march=native -O2 -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2  -fPIC  -I/usr/include/vapoursynth -c KNLMeansCL/KNLMeansCL.cpp -o KNLMeansCL/KNLMeansCL.o
In file included from KNLMeansCL/KNLMeansCL.h:41:0,
                 from KNLMeansCL/KNLMeansCL.cpp:36:
KNLMeansCL/kernel.h:341:119: warning: backslash-newline at end of file
 "                                                                                                                 \n" \

In file included from /usr/include/CL/cl.h:30:0,
                 from KNLMeansCL/KNLMeansCL.h:38,
                 from KNLMeansCL/KNLMeansCL.cpp:36:
KNLMeansCL/KNLMeansCL.cpp:789:37: error: exponent has no digits
         const cl_float pattern_u3 = CL_FLT_EPSILON;
                                     ^
KNLMeansCL/KNLMeansCL.cpp: In function 'const VSFrameRef* VapourSynthPluginGetFrame(int, int, void**, void**, VSFrameContext*, VSCore*, const VSAPI*)':
KNLMeansCL/KNLMeansCL.cpp:789:37: error: unable to find numeric literal operator 'operator""f'
         const cl_float pattern_u3 = CL_FLT_EPSILON;
                                     ^
KNLMeansCL/KNLMeansCL.cpp:789:37: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
make: *** [GNUmakefile:24: KNLMeansCL/KNLMeansCL.o] Error 1

but if add '-std=gnu++11' to cxxflags build ok(?) (idk why, because https://github.com/Khanattila/KNLMeansCL/blob/master/configure#L91) EDIT: add '-fext-numeric-literals' instead of '-std=gnu++11' also fails EDIT2: change 'c++11' to 'gnu++11' fix build packaged and GIT version O_o (doh!)