go-phash
go-phash copied to clipboard
During build process of go-phash fails
During the build I get the following error I am not sue if this is incompatibility with new CImg.h or not.
In file included from /usr/include/pHash.h:50:0, from ../.go_workspace/src/github.com/kavu/go-phash/phash.cpp:7: /usr/include/CImg.h: In member function ‘cimg_library::CImg<T>& cimg_library::CImg<T>::draw_spline(int, int, float, float, int, int, float, float, const cimg_library::CImg<t>&, int, int, int, int, float, float, unsigned int, bool)’: /usr/include/CImg.h:27246:18: error: declaration of ‘float t’ for (float t = 0; t<1; t+=_precision) { ^ /usr/include/CImg.h:27222:14: error: shadows template parm ‘class t’ template<typename t>
Do you know what version of pHash is installed? And did you installed CImg separately?
I installed latest cimg-dev on ubuntu. I am currently using the version provided in this library, here is the H file that the error is referring to though is in the include directory.
I have also install latest libphash0 and libphash-dev
@myusuf3 can you provide the following information:
- Ubuntu disto version
- How CImg installed?
libcimg-devfrom Ubuntu packages? What version? - What version of
libphash0andlibphash-dev?
i am on 12.04 I am installing it as libcimg-dev from apt the most current versions.
@myusuf3, I just ran tests on fresh Ubuntu 12.04.5 Digital Ocean droplet with this script:
#!/bin/sh
wget https://godeb.s3.amazonaws.com/godeb-amd64.tar.gz
tar xzvf godeb-amd64.tar.gz
./godeb install 1.5.2
dpkg -i go_1.5.2-godeb1_amd64.deb
aptitude update
aptitude upgrade -y
aptitude install -y libphash0-dev cimg-dev git pkg-config graphicsmagick graphicsmagick-imagemagick-compat build-essential gcc
mkdir GOPATH
export GOPATH=/root/GOPATH
go get github.com/kavu/go-phash
cd /root/GOPATH/src/github.com/kavu/go-phash/
go test -v ./...
You could try yourself, tuning it appropriately.
Unfortunately, later (15.04, for example) Ubuntu versions are missing libpash completely, and even ./configure && make && make install method for pHash source is not working for me. So, if you really need to make my package working, we need to debug it on your system somehow, I need your help here. But in my personal opinion, you should try https://github.com/azr/phash package, it may help you. Or abandon pHash, as it deeply unmaintained…