<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 6:31 PM, Ricky Huang <span dir="ltr"><<a href="mailto:rhuang.work@gmail.com" target="_blank">rhuang.work@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Hello all,<div><br></div><div>I am currently running an amd64 based FreeBSD 9.0.  While compiling the pHash-0.9.6 I came across the following compilation errors:</div>
<div><br></div><div>Build with: </div><div>  # ./configure --enable-video-hash=no --enable-audio-hash=no</div><div>  # make</div><div><br></div><div>I get</div><div>  pHash.cpp:44: error: 'HW_AVAILCPU' was not declared in this scope</div>
<div><br></div><div>My workaround was to run "sysctl hw.ncpu" on the command line, edit src/pHash.cpp, and replace HW_AVAILCPU with that value.</div><div><br></div><div>---</div><div><br></div><div>After the above is fixed, I get the following error when I "make"</div>
<div><br></div><div><div>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</div>
<div>../src/.libs/libpHash.so: undefined reference to `pthread_create'</div></div><div><br></div><div>My workaround for the above is to run configure like the following: ./configure --enable-video-hash=no --enable-audio-hash=no LDFLAGS='-lpthread'</div>
<div><br></div><div><br></div><div>Question are:</div><div>1)  Is HW_AVAILCPU something available in FreeBSD?  Am I missing some header files?</div></div></blockquote><div><br></div><div>It looks like it is not. It should be HW_NCPU. This will be fixed in the next release. Thanks for bringing it up.<br>
<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>2)  Shouldn't the requirement for pthread library be part of the configure and not something I have to provide by hand?</div>
<div><br></div></div></blockquote><div>Yes it should be. We will likely be switching to the cmake build system soon which will simplify the configuration and building process. <br><br></div><div>Evan<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="word-wrap:break-word"><div></div><div><br></div><div><br></div><div>Thanks!</div></div><br>_______________________________________________<br>
pHash-support mailing list<br>
<a href="mailto:pHash-support@lists.phash.org">pHash-support@lists.phash.org</a><br>
<a href="http://lists.phash.org/listinfo.cgi/phash-support-phash.org" target="_blank">http://lists.phash.org/listinfo.cgi/phash-support-phash.org</a><br>
<br></blockquote></div><br></div></div>