[Phash-support] Phash on Mac OS X

Evan Klinger eklinger at phash.org
Wed Dec 23 09:15:03 PST 2009


Harald,

Please be sure your CImg is 1.3 or later. We have updated the API to
use the latest CImg versions and CImg < 1.3 is no longer supported.
Thank you
Evan

On Wed, Dec 23, 2009 at 8:22 AM, Harald Lapp <harald.lapp at gmail.com> wrote:
>
> i had the same issue as sebastian with pHash 0.6.x and was not able to get
> it to work on OSX. for 0.7.1 this issue is gone (however, i can't remember
> what i installed, if i installed anything to make it gone ...)? i still have
> a problem, though: compiling fails. i wonder, if anybody was ever able to
> compile pHash on osx?
>
>
> /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 -Dcimg_use_png  -O2 -ffast-math -O3 -MT
> pHash.lo -MD -MP -MF .deps/pHash.Tpo -c -o pHash.lo pHash.cpp
> 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
> -Dcimg_use_png -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps/pHash.Tpo
> -c pHash.cpp  -fno-common -DPIC -o .libs/pHash.o
> In file included from pHash.cpp:26:
> ../config.h:68:1: warning: "HAVE_STDLIB_H" redefined
> In file included from /usr/local/include/jpeglib.h:24,
>                 from /usr/local/include/CImg.h:243,
>                 from pHash.h:42,
>                 from pHash.cpp:25:
> /usr/local/include/jconfig.h:12:1: warning: this is the location of the
> previous definition
> pHash.cpp: In function 'int ph_radon_projections(const
> cimg_library::CImg<unsigned char>&, int, Projections&)':
> pHash.cpp:43: error: 'img->cimg_library::CImg<unsigned char>::width' cannot
> be used as a function
> pHash.cpp:44: error: 'img->cimg_library::CImg<unsigned char>::height' cannot
> be used as a function
> pHash.cpp:63: error: 'PI' is not a member of 'cimg_library::cimg'
> pHash.cpp:69: error: 'ptr_radon_map->cimg_library::CImg<unsigned
> char>::data' cannot be used as a function
> pHash.cpp:73: error: 'ptr_radon_map->cimg_library::CImg<unsigned
> char>::data' cannot be used as a function
> pHash.cpp:80: error: 'PI' is not a member of 'cimg_library::cimg'
> pHash.cpp:86: error: 'ptr_radon_map->cimg_library::CImg<unsigned
> char>::data' cannot be used as a function
> pHash.cpp:90: error: 'ptr_radon_map->cimg_library::CImg<unsigned
> char>::data' cannot be used as a function
> pHash.cpp: In function 'int ph_feature_vector(const Projections&,
> Features&)':
> pHash.cpp:108: error: 'projection_map.cimg_library::CImg<unsigned
> char>::height' cannot be used as a function
> pHash.cpp: In function 'int ph_dct(const Features&, Digest&)':
> pHash.cpp:160: error: 'PI' is not a member of 'cimg_library::cimg'
> pHash.cpp: In function 'int ph_image_digest(const
> cimg_library::CImg<unsigned char>&, double, double, Digest&, int)':
> pHash.cpp:229: error: 'const struct cimg_library::CImg<unsigned char>' has
> no member named 'spectrum'
> pHash.cpp:232: error: 'const struct cimg_library::CImg<unsigned char>' has
> no member named 'spectrum'
> pHash.cpp: In function 'cimg_library::CImg<float>* ph_dct_matrix(int)':
> pHash.cpp:317: error: 'ptr_matrix->cimg_library::CImg<float>::data' cannot
> be used as a function
> pHash.cpp:317: error: 'PI' is not a member of 'cimg_library::cimg'
> pHash.cpp: In function 'int ph_dct_imagehash(const char*, ulong64&)':
> pHash.cpp:336: error: 'struct cimg_library::CImg<unsigned char>' has no
> member named 'spectrum'
> pHash.cpp:338: error: 'struct cimg_library::CImg<float>' has no member named
> 'spectrum'
> pHash.cpp: In function 'cimg_library::CImgList<unsigned char>*
> ph_getKeyFramesFromVideo(const char*)':
> pHash.cpp:413: error: 'pframelist->cimg_library::CImgList<unsigned
> char>::size' cannot be used as a function
> pHash.cpp: In function 'ulong64* ph_dct_videohash(const char*, int&)':
> pHash.cpp:551: error: 'keyframes->cimg_library::CImgList<unsigned
> char>::size' cannot be used as a function
> pHash.cpp:560: error: 'keyframes->cimg_library::CImgList<unsigned
> char>::size' cannot be used as a function
> pHash.cpp: In function 'MVPRetCode ph_query_mvptree(MVPFile*, DP*, int,
> float, DP**, int*)':
> pHash.cpp:1224: error: 'struct ph_mvp_file' has no member named 'int_pgsize'
> make[2]: *** [pHash.lo] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
>
> Am 23.12.2009 um 17:14 schrieb Sebastian Gallese:
>
>> Hello,
>>
>> I'm having trouble compiling Phase 0.7.1 on Mac OS X 10.5.8
>>
>> Please excuse me if I'm missing something obvious.
>>
>> I first installed FFMpeg from MacPorts.  I then downloaded CImg 1.3.2 and
>> placed CImg.h and the plugins and resources folders inside the Phase 0.7.1
>> folder.
>>
>> Upon compiling, I was then prompted to install FFMpeg.  I figured the path
>> that MacPort installs to can be funky, so I just downloaded the FFMpeg
>> source and installed it from the GIT code.  While compiling, the program
>> returned the output below.
>>
>> If you need any more information about where things are installed or
>> output, I'll post it to the list-serv.
>>
>> It looks like people have had problems compiling with Mac OS X in the
>> past.  I'd be happy to try to resolve this issue, but I can also move to a
>> Windows machine or install a flavor of Linux if you think that might be
>> easier to get this to work.
>>
>> Any help is great!
>>
>> Thanks,
>>
>> Seb
>>
>> I received the following error:
>>
>> [...]
>>
>> checking whether the gcj linker
>> (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries...
>> yes
>> checking how to hardcode library paths into programs... immediate
>>
>> *** Configuring image hash ***
>>
>> checking CImg.h usability... no
>> checking CImg.h presence... no
>> checking for CImg.h... no
>> checking whether CImg.h is in the current or src directory.... yes
>>
>> *** Configuring video Hash ***
>>
>> checking whether FFmpeg is present... checking for avcodec_alloc_frame in
>> -lavcodec... no
>> configure: error:
>>
>> *** libavcodec not found.
>> You need FFmpeg. Get it at <http://ffmpeg.org/>
>>
>> _______________________________________________
>> pHash-support mailing list
>> pHash-support at lists.phash.org
>> http://lists.phash.org/listinfo.cgi/phash-support-phash.org
>
> _______________________________________________
> pHash-support mailing list
> pHash-support at lists.phash.org
> http://lists.phash.org/listinfo.cgi/phash-support-phash.org
>



More information about the pHash-support mailing list