[pHash-support] 2 compilation errors
Ricky Huang
rhuang.work at gmail.com
Fri Apr 26 18:31:44 PDT 2013
Hello all,
I am currently running an amd64 based FreeBSD 9.0. While compiling the pHash-0.9.6 I came across the following compilation errors:
Build with:
# ./configure --enable-video-hash=no --enable-audio-hash=no
# make
I get
pHash.cpp:44: error: 'HW_AVAILCPU' was not declared in this scope
My workaround was to run "sysctl hw.ncpu" on the command line, edit src/pHash.cpp, and replace HW_AVAILCPU with that value.
---
After the above is fixed, I get the following error when I "make"
libtool: link: g++ -O2 -ffast-math -O3 -o .libs/test_texthash test_texthash.o -L/usr/local/lib ../src/.libs/libpHash.so -lpng /usr/local/lib/libjpeg.so /usr/local/lib/libfftw3.so -lm -Wl,-rpath -Wl,/usr/local/lib
../src/.libs/libpHash.so: undefined reference to `pthread_create'
My workaround for the above is to run configure like the following: ./configure --enable-video-hash=no --enable-audio-hash=no LDFLAGS='-lpthread'
Question are:
1) Is HW_AVAILCPU something available in FreeBSD? Am I missing some header files?
2) Shouldn't the requirement for pthread library be part of the configure and not something I have to provide by hand?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phash.org/pipermail/phash-support-phash.org/attachments/20130426/26245c49/attachment.htm>
More information about the pHash-support
mailing list