You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to build the plugin on my two Debian boxes: one running Stable (which runs GCC 4.9) and another running Testing (which switched to GCC 6 recently). On the Stable box, it builds just fine, but on the Testing/GCC6 it fails with this:
tomman@himawari:~/workbench/tsdx-mbench/vs-filters/VapourSynth-FFT3DFilter$ make
g++ -msse2 -mfpmath=sse -O3 -ffast-math -fomit-frame-pointer -fno-tree-vectorize -Wall -std=c++11 -I. -I. -fPIC -I/opt/tsdx_workbench/include -march=native -fexcess-precision=fast -c fft3dfilter_c.cpp -o fft3dfilter_c.o
fft3dfilter_c.cpp: In function ‘void ApplyWiener2D_C(float (*)[2], int, int, int, int, float, float, float, float, float, const float*, float, const float*, float)’:
fft3dfilter_c.cpp:74:158: error: ‘sqrt’ was not declared in this scope
WienerFactor *= 1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) ); // sharpen factor - changed in v.1.1
^
fft3dfilter_c.cpp:114:158: error: ‘sqrt’ was not declared in this scope
WienerFactor *= 1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) ) *
^
fft3dfilter_c.cpp: In function ‘void Sharpen_C(float (*)[2], int, int, int, int, float, float, float, const float*, float, const float*, float)’:
fft3dfilter_c.cpp:680:151: error: ‘sqrt’ was not declared in this scope
sfact = (1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) ) ) ;
^
fft3dfilter_c.cpp:723:151: error: ‘sqrt’ was not declared in this scope
sfact = (1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) ) ) *
^
fft3dfilter_c.cpp: In function ‘void Sharpen_degrid_C(float (*)[2], int, int, int, int, float, float, float, const float*, float, const float (*)[2], float, const float*, float)’:
fft3dfilter_c.cpp:772:151: error: ‘sqrt’ was not declared in this scope
sfact = (1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ;
^
fft3dfilter_c.cpp:837:151: error: ‘sqrt’ was not declared in this scope
sfact = (1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) *
^
fft3dfilter_c.cpp: In function ‘void ApplyWiener2D_degrid_C(float (*)[2], int, int, int, int, float, float, float, float, float, const float*, float, const float (*)[2], float, const float*, float)’:
fft3dfilter_c.cpp:916:158: error: ‘sqrt’ was not declared in this scope
WienerFactor *= 1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) ); // sharpen factor - changed in v.1.1
^
fft3dfilter_c.cpp:980:158: error: ‘sqrt’ was not declared in this scope
WienerFactor *= 1 + sharpen*wsharpen[w]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) ) *
^
GNUmakefile:27: fallo en las instrucciones para el objetivo 'fft3dfilter_c.o'
make: *** [fft3dfilter_c.o] Error 1
I managed to build on this setup only after including <math.h> on fft3dfilter_c.cpp and FFT3DFilter.cpp. I'm unsure if math.h is the proper header (I'm not a C++ guy) since it appears sqrt() is overloaded on quite a few headers these days, but at least it got the build going on for me (but I've yet to test it!)
To be fair, very few distros are using GCC 6.x now, and I'm not clear on why this change (as I said, the plugin builds just fine without any changes under GCC 4.9!), but that's something to watch out in the future as more distros switch to newer GCC.
UPDATE: It seems that the proper header to include is actually cmath!
The text was updated successfully, but these errors were encountered:
dilworks
changed the title
Building with GCC 6.x requires math.h
Building with GCC 6.x requires cmath
Oct 10, 2016
I tried to build the plugin on my two Debian boxes: one running Stable (which runs GCC 4.9) and another running Testing (which switched to GCC 6 recently). On the Stable box, it builds just fine, but on the Testing/GCC6 it fails with this:
I managed to build on this setup only after including <math.h> on fft3dfilter_c.cpp and FFT3DFilter.cpp. I'm unsure if math.h is the proper header (I'm not a C++ guy) since it appears sqrt() is overloaded on quite a few headers these days, but at least it got the build going on for me (but I've yet to test it!)
To be fair, very few distros are using GCC 6.x now, and I'm not clear on why this change (as I said, the plugin builds just fine without any changes under GCC 4.9!), but that's something to watch out in the future as more distros switch to newer GCC.
UPDATE: It seems that the proper header to include is actually cmath!
The text was updated successfully, but these errors were encountered: