aetilius / pHash

pHash - the open source perceptual hash library
https://www.phash.org
GNU General Public License v3.0
565 stars 81 forks source link

build issue #17

Open uurtsaikhb opened 4 years ago

uurtsaikhb commented 4 years ago

I am trying to build with cmake from revised branch

cmake . succeeds but I get following error when I run make

➜ pHash git:(revised-v1.0) ✗ make Scanning dependencies of target pHash [ 3%] Building CXX object CMakeFiles/pHash.dir/src/ph_fft.cpp.o /Users/user/workspace/pHash/src/ph_fft.cpp:29:25: error: constexpr function never produces a constant expression [-Winvalid-constexpr] static constexpr double pi(){ ^ /Users/user/workspace/pHash/src/ph_fft.cpp:30:9: note: non-constexpr function 'atan<int>' cannot be used in a constant expression return std::atan(1)*4; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/math.h:806:1: note: declared here atan(_A1 __lcpp_x) _NOEXCEPT {return ::atan((double)__lcpp_x);} ^ 1 error generated. make[2]: *** [CMakeFiles/pHash.dir/src/ph_fft.cpp.o] Error 1 make[1]: *** [CMakeFiles/pHash.dir/all] Error 2 make: *** [all] Error 2

aetilius commented 3 years ago

Hi @uurtsaikhb Were you able to resolve this issue?