Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

During build process of go-phash fails #4

Open
myusuf3 opened this issue Dec 28, 2015 · 6 comments
Open

During build process of go-phash fails #4

myusuf3 opened this issue Dec 28, 2015 · 6 comments

Comments

@myusuf3
Copy link

myusuf3 commented Dec 28, 2015

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 functioncimg_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 offloat tfor (float t = 0; t<1; t+=_precision) { ^ /usr/include/CImg.h:27222:14: error: shadows template parmclass ttemplate<typename t>
@kavu
Copy link
Owner

kavu commented Dec 28, 2015

Do you know what version of pHash is installed? And did you installed CImg separately?

@myusuf3
Copy link
Author

myusuf3 commented Jan 8, 2016

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.

@myusuf3
Copy link
Author

myusuf3 commented Jan 10, 2016

I have also install latest libphash0 and libphash-dev

@kavu
Copy link
Owner

kavu commented Jan 11, 2016

@myusuf3 can you provide the following information:

  • Ubuntu disto version
  • How CImg installed? libcimg-dev from Ubuntu packages? What version?
  • What version of libphash0 and libphash-dev?

@myusuf3
Copy link
Author

myusuf3 commented Jan 11, 2016

i am on 12.04 I am installing it as libcimg-dev from apt the most current versions.

@kavu
Copy link
Owner

kavu commented Jan 11, 2016

@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…

@kavu kavu closed this as completed May 30, 2017
@kavu kavu reopened this May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants