pHash icon indicating copy to clipboard operation
pHash copied to clipboard

bindings / PHP build

Open AGenchev opened this issue 4 years ago • 2 comments

Trying to build the php extension, on the configure step: ./configure LIBS="-lpthread" --with-pHash="/usr/local" checking for pHash in default path... found in /usr/local .... error: 'pHash.h' header not found.

I verified that: pHash.h is in /usr/local/include/pHash.h and lib is also installed in /usr/local/lib/libpHash.so.1.0.0

AGenchev avatar Jun 04 '20 14:06 AGenchev

It turned that the simple compile guide is missing a lot: To make 'pHash.h' to be "found", we need also: sudo apt-get install libavformat-dev libmpg123-dev libsamplerate-dev libsndfile-dev sudo apt-get install cimg-dev libavcodec-dev ffmpeg libswscale-dev which in turn needs OpenCV, so total of +1 GB worth of dependencies. Now, we have:

..
checking pHash.h usability... yes
checking pHash.h presence... yes
..

Now we have another error:

checking audiophash.h usability... no
checking audiophash.h presence... no

for now I've ran out of Google/ideas.

AGenchev avatar Jun 04 '20 18:06 AGenchev

I found that by copying that .h file from src/ into the include path allows configure to continue: cp src/audiophash.h /usr/local/include/

Xymph avatar Aug 31 '21 15:08 Xymph