It sounds like building for the Mac is just causing more and more problems.  I need a new OS :(  I'll definitely look to install a GNU system to play around with this.  I'll get that installed in the next few days and then install PHash do I don't spam the email list serv with Mac stuff.<br>
<br>If you have the desire to waste the hours away on a Mac box, I can give you SSH access to an old Mac.  Just direct e-mail me.<br><br>Right now, I'm only putting CImg.h in the pHash build folder.<br>
<br>Under pHash-0.7.2<br>When using CImg 1.3.2<br><br>This is the tail of the output for make ( full output here: <a href="http://gist.github.com/262925" target="_blank">http://gist.github.com/262925</a> ):<br>audiophash.cpp: In function 'uint32_t* ph_audiohash(float*, int, int, int&)':<br>

audiophash.cpp:242: error: missing template arguments before 'double'<br>audiophash.cpp:242: error: expected `;' before 'double'<br>audiophash.cpp:305: error: 'pF' was not declared in this scope<br>

audiophash.cpp:310: error: 'pF' was not declared in this scope<br>audiophash.cpp:310: error: 'cabs' was not declared in this scope<br>audiophash.cpp:347: error: 'pF' was not declared in this scope<br>

make[2]: *** [audiophash.lo] Error 1<br>make[1]: *** [all-recursive] Error 1<br>make: *** [all] Error 2<br><br><br>Under pHash-0.7.1<br><br>When using CImg 1.3.1, I'd get almost the same exact errors Harald got ( <a href="http://gist.github.com/262914" target="_blank">http://gist.github.com/262914</a> )<br>

<br>When using CImg 1.3.2, I'd only get the last error from Harald's output<br>Making all in src<br>/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include -DHAVE_IMAGE_HASH=1 -DHAVE_VIDEO_HASH=1 -DHAVE_AUDIO_HASH=1 -Dcimg_use_jpeg  -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c -o pHash.lo pHash.cpp<br>

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -DHAVE_IMAGE_HASH=1 -DHAVE_VIDEO_HASH=1 -DHAVE_AUDIO_HASH=1 -Dcimg_use_jpeg -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo -c pHash.cpp  -fno-common -DPIC -o .libs/pHash.o<br>

pHash.cpp: In function 'MVPRetCode ph_query_mvptree(MVPFile*, DP*, int, float, DP**, int*)':<br>pHash.cpp:1224: error: 'struct ph_mvp_file' has no member named 'int_pgsize'<br>make[2]: *** [pHash.lo] Error 1<br>

make[1]: *** [all-recursive] Error 1<br>make: *** [all] Error 2<br><br><br><div class="gmail_quote">On Wed, Dec 23, 2009 at 4:18 PM, Evan Klinger <span dir="ltr"><<a href="mailto:eklinger@phash.org" target="_blank">eklinger@phash.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Great news, I'm glad that is working now.<br>
<br>
In regards to the Java bindings, you should pass --enable-java to the<br>
pHash configure script to build java support. You will need a Java SDK<br>
present on the system, mainly the jni.h file.<br>
You shouldn't try to build the Java bindings by directly running make<br>
in its directory, only from the top level make.<br>
<br>
On Wed, Dec 23, 2009 at 12:50 PM, Sebastian Gallese<br>
<div><div></div><div><<a href="mailto:sebastiangallese@gmail.com" target="_blank">sebastiangallese@gmail.com</a>> wrote:<br>
> Wow, that was almost... too easy.  Thanks!<br>
><br>
> Just built FFMpeg with the "--enable-shared" option and things fell into<br>
> place.<br>
><br>
> One final question (sorry for bugging y'all so much).  My Java experience<br>
> heavily outweighs the almost nothing I know about C, and I see that you have<br>
> recently added "Java bindings" in the Java folder of PHash.<br>
><br>
> Is there anything special I need to do to get this to work?<br>
><br>
> I tried to run "sudo make" in that directory, but I received this error<br>
><br>
> pHash-jni.cpp:578: error: 'JNIEXPORT' does not name a type<br>
> make: *** [pHash-jni.lo] Error<br>
><br>
> ( Full output @ <a href="http://gist.github.com/262764" target="_blank">http://gist.github.com/262764</a> )<br>
><br>
> I then just added the pHash.java file to my Eclipse Java project along with<br>
> the other files in that java folder.<br>
><br>
> I went ahead and tried to run the following Java code "pHash mypHash = new<br>
> pHash();" and I received this error:<br>
><br>
> java.lang.UnsatisfiedLinkError: no pHash-jni in java.library.path<br>
><br>
> I have a feeling this part might be over my head, and it might require too<br>
> much explanation to get this to work, so no worries if this is beyond my<br>
> current skill level.  I'll take a read at<br>
> <a href="http://developer.apple.com/java/jniuniversal.html" target="_blank">http://developer.apple.com/java/jniuniversal.html</a> and see where that gets<br>
> me.<br>
><br>
> If you have any pointers or tips, that would be incredible.  Sorry for<br>
> fumbling around in the dark.<br>
><br>
> Thanks again,<br>
><br>
> Seb<br>
><br>
> On Wed, Dec 23, 2009 at 2:26 PM, Evan Klinger <<a href="mailto:eklinger@phash.org" target="_blank">eklinger@phash.org</a>> wrote:<br>
>><br>
>> Sebastian,<br>
>> I believe FFmpeg needs to be built specifically with shared libraries<br>
>> enabled (as part of the ./configure). That is probably why you are<br>
>> missing the .so files but you do have the static archives (.a) files.<br>
>> Can you see if the package you installed contains the shared<br>
>> libraries?<br>
>><br>
>><br>
>> On Wed, Dec 23, 2009 at 11:14 AM, Sebastian Gallese<br>
>> <<a href="mailto:sebastiangallese@gmail.com" target="_blank">sebastiangallese@gmail.com</a>> wrote:<br>
>> > Thank you for your response!<br>
>> ><br>
>> > Let me pretext the following by saying that I am OK with running PHash<br>
>> > without video support (I'd like to play around with images).<br>
>> ><br>
>> > I'm also open to using a Windows or Linux system if this is a problem<br>
>> > with<br>
>> > FFMpeg on the Mac.  If you know of a specific version of Windows or a<br>
>> > distribution of Linux that works well with this, I can install that.<br>
>> ><br>
>> > Lastly, let me know if you compile FFMpeg with any special options (I<br>
>> > just<br>
>> > did the default install).<br>
>> ><br>
>> > And now onto my snooping around....<br>
>> ><br>
>> > On Macs, I found out we have .dylibs instead of .so files.<br>
>> ><br>
>> > I found a libavcodec.dylib which points to libavcodec.52.20.0.dylib<br>
>> > This is from the FFMpeg files I installed from MacPorts, located in<br>
>> > /opt/local/var/macports/software/ffmpeg/0.5_5/opt/local/lib<br>
>> ><br>
>> > Nothing shows up when I run "strings libavcodec.dylib | grep<br>
>> > avcodec_alloc_frame"<br>
>> ><br>
>> > When I run "strings libavcodec.dylib | grep avcodec", I get the<br>
>> > following:<br>
>> ><br>
>> > macbook-de-sebastian-gallese:lib kdge$ strings libavcodec.dylib | grep<br>
>> > avcodec<br>
>> > Compiler did not align stack variables. Libavcodec has been miscompiled<br>
>> > and may be very slow or crash. This is not a bug in libavcodec,<br>
>> > pic->data[0]!=NULL in avcodec_default_get_buffer<br>
>> > insufficient thread locking around avcodec_open/close()<br>
>> > libavcodec/motion_est.c<br>
>> > libavcodec/motion_est_template.c<br>
>> > libavcodec/ratecontrol.c<br>
>> > libavcodec/dvdsubenc.c<br>
>> > libavcodec/flacdec.c<br>
>> > FFmpeg v%d.%d.%d / libavcodec build: %d<br>
>> > libavcodec/mpegvideo_xvmc.c<br>
>> > libavcodec/qcelpdec.c<br>
>> > libavcodec/snow.c<br>
>> > libavcodec/svq1enc.c<br>
>> > libavcodec/vc1.c<br>
>> > libavcodec/vorbis_dec.c<br>
>> > libavcodec/vorbis_enc.c<br>
>> > libavcodec/wmaenc.c<br>
>> > libavcodec/libdiracenc.c<br>
>> ><br>
>> > I found nothing similar to libavcodec in /usr/lib<br>
>> ><br>
>> > In the directory /usr/local/lib, I found libavcodec.a, which outputs the<br>
>> > following:<br>
>> ><br>
>> > macbook-de-sebastian-gallese:lib kdge$ strings libavcodec.a | grep<br>
>> > avcodec_alloc_frame<br>
>> > _avcodec_alloc_frame<br>
>> > avcodec_alloc_frame<br>
>> > avcodec_alloc_frame<br>
>> ><br>
>> > These are the other files I found in /usr/local/lib:<br>
>> ><br>
>> > macbook-de-sebastian-gallese:lib kdge$ pwd<br>
>> > /usr/local/lib<br>
>> > macbook-de-sebastian-gallese:lib kdge$ ls -l<br>
>> > total 60920<br>
>> > drwxr-xr-x  84 root  wheel      2856 Nov 17 03:20 codecs<br>
>> > -rw-r--r--   1 root  wheel  22336032 Dec 23 10:32 libavcodec.a<br>
>> > -rw-r--r--   1 root  wheel     31424 Dec 23 10:32 libavdevice.a<br>
>> > -rw-r--r--   1 root  wheel   6686464 Dec 23 10:32 libavformat.a<br>
>> > -rw-r--r--   1 root  wheel    226080 Dec 23 10:32 libavutil.a<br>
>> > -rwxr-xr-x   1 root  wheel    254036 Dec 22 20:05 libjpeg.7.dylib<br>
>> > -rw-r--r--   1 root  wheel   1160680 Dec 22 20:05 libjpeg.a<br>
>> > lrwxr-xr-x   1 root  wheel        15 Dec 22 20:05 libjpeg.dylib -><br>
>> > libjpeg.7.dylib<br>
>> > -rwxr-xr-x   1 root  wheel       912 Dec 22 20:05 <a href="http://libjpeg.la" target="_blank">libjpeg.la</a><br>
>> > -rw-r--r--   1 root  wheel    469592 Dec 23 10:32 libswscale.a<br>
>> > drwxr-xr-x   8 root  wheel       272 Dec 23 10:32 pkgconfig<br>
>> ><br>
>> > I also found the shared library in a folder for MPlayer on my computer,<br>
>> > but<br>
>> > I received an odd response (perhaps that is the response I should get?):<br>
>> ><br>
>> > macbook-de-sebastian-gallese:lib kdge$ pwd<br>
>> > /Applications/MPlayer OSX<br>
>> ><br>
>> > Extended.app/Contents/Resources/External_Binaries/mplayer.app/Contents/MacOS/lib<br>
>> > macbook-de-sebastian-gallese:lib kdge$ strings libavcodec.dylib | grep<br>
>> > avcodec_alloc_frame<br>
>> > strings: for architecture x86_64 object: libavcodec.dylib malformed<br>
>> > object<br>
>> > (unknown load command 5)<br>
>> ><br>
>> > After searching for all of these libavcodec, I figured it couldn't hurt<br>
>> > to<br>
>> > try to place a couple of them in the /usr/lib path and try to<br>
>> > ./configure<br>
>> > pHash again.  So I placed each of the libavcodec's, one at a time, in<br>
>> > /usr/lib using the following type of commands:<br>
>> ><br>
>> > macbook-de-sebastian-gallese:lib kdge$ cd<br>
>> > /opt/local/var/macports/software/ffmpeg/0.5_5/opt/local/lib<br>
>> > macbook-de-sebastian-gallese:lib kdge$ sudo ln -s libavcodec.dylib<br>
>> > /usr/lib/libavcodec.so && sudo ln -s libavcodec.dylib<br>
>> > /usr/lib/libavcodec.dylib<br>
>> ><br>
>> > and for each different libavcodec, I still received this in the pHash<br>
>> > ./configure<br>
>> ><br>
>> > checking whether FFmpeg is present... checking for avcodec_alloc_frame<br>
>> > in<br>
>> > -lavcodec... no<br>
>> > configure: error:<br>
>> ><br>
>> > *** libavcodec not found.<br>
>> ><br>
>> > Thanks,<br>
>> > -Seb<br>
>> ><br>
>> > On Wed, Dec 23, 2009 at 12:13 PM, Evan Klinger <<a href="mailto:eklinger@phash.org" target="_blank">eklinger@phash.org</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Sebastian,<br>
>> >> Can you please locate the libavcodec.so library on your system and run:<br>
>> >><br>
>> >> strings libavcodec.so|grep avcodec_alloc_frame<br>
>> >><br>
>> >> If that string is present, please also make sure the library is in a<br>
>> >> standard system path where the linker can find it. In Linux this is<br>
>> >> usually /usr/lib or /usr/local/lib, although the latter requires a<br>
>> >> change to /etc/ld.so.conf to recognize libraries in /usr/local/lib.<br>
>> >><br>
>> >> Thanks<br>
>> >> Evan<br>
>> >><br>
>> >> On Wed, Dec 23, 2009 at 8:14 AM, Sebastian Gallese<br>
>> >> <<a href="mailto:sebastiangallese@gmail.com" target="_blank">sebastiangallese@gmail.com</a>> wrote:<br>
>> >> > Hello,<br>
>> >> ><br>
>> >> > I'm having trouble compiling Phase 0.7.1 on Mac OS X 10.5.8<br>
>> >> ><br>
>> >> > Please excuse me if I'm missing something obvious.<br>
>> >> ><br>
>> >> > I first installed FFMpeg from MacPorts.  I then downloaded CImg 1.3.2<br>
>> >> > and<br>
>> >> > placed CImg.h and the plugins and resources folders inside the Phase<br>
>> >> > 0.7.1<br>
>> >> > folder.<br>
>> >> ><br>
>> >> > Upon compiling, I was then prompted to install FFMpeg.  I figured the<br>
>> >> > path<br>
>> >> > that MacPort installs to can be funky, so I just downloaded the<br>
>> >> > FFMpeg<br>
>> >> > source and installed it from the GIT code.  While compiling, the<br>
>> >> > program<br>
>> >> > returned the output below.<br>
>> >> ><br>
>> >> > If you need any more information about where things are installed or<br>
>> >> > output,<br>
>> >> > I'll post it to the list-serv.<br>
>> >> ><br>
>> >> > It looks like people have had problems compiling with Mac OS X in the<br>
>> >> > past.<br>
>> >> > I'd be happy to try to resolve this issue, but I can also move to a<br>
>> >> > Windows<br>
>> >> > machine or install a flavor of Linux if you think that might be<br>
>> >> > easier<br>
>> >> > to<br>
>> >> > get this to work.<br>
>> >> ><br>
>> >> > Any help is great!<br>
>> >> ><br>
>> >> > Thanks,<br>
>> >> ><br>
>> >> > Seb<br>
>> >> ><br>
>> >> > I received the following error:<br>
>> >> ><br>
>> >> > [...]<br>
>> >> ><br>
>> >> > checking whether the gcj linker<br>
>> >> > (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared<br>
>> >> > libraries...<br>
>> >> > yes<br>
>> >> > checking how to hardcode library paths into programs... immediate<br>
>> >> ><br>
>> >> > *** Configuring image hash ***<br>
>> >> ><br>
>> >> > checking CImg.h usability... no<br>
>> >> > checking CImg.h presence... no<br>
>> >> > checking for CImg.h... no<br>
>> >> > checking whether CImg.h is in the current or src directory.... yes<br>
>> >> ><br>
>> >> > *** Configuring video Hash ***<br>
>> >> ><br>
>> >> > checking whether FFmpeg is present... checking for<br>
>> >> > avcodec_alloc_frame<br>
>> >> > in<br>
>> >> > -lavcodec... no<br>
>> >> > configure: error:<br>
>> >> ><br>
>> >> > *** libavcodec not found.<br>
>> >> > You need FFmpeg. Get it at <<a href="http://ffmpeg.org/" target="_blank">http://ffmpeg.org/</a>><br>
>> >> ><br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > pHash-support mailing list<br>
>> >> > <a href="mailto:pHash-support@lists.phash.org" target="_blank">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>
>> >> ><br>
>> >> _______________________________________________<br>
>> >> pHash-support mailing list<br>
>> >> <a href="mailto:pHash-support@lists.phash.org" target="_blank">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>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>