{"id":1076,"date":"2015-10-25T22:44:30","date_gmt":"2015-10-26T03:44:30","guid":{"rendered":"http:\/\/littlesvr.ca\/grumble\/?p=1076"},"modified":"2015-10-25T22:44:30","modified_gmt":"2015-10-26T03:44:30","slug":"building-phash-0-9-6-on-centos-7","status":"publish","type":"post","link":"http:\/\/littlesvr.ca\/grumble\/2015\/10\/25\/building-phash-0-9-6-on-centos-7\/","title":{"rendered":"Building pHash 0.9.6 on CentOS 7"},"content":{"rendered":"<p>For some reason this doesn&#8217;t work out of the box. The official pHash 0.9.6 from <a href=\"http:\/\/www.phash.org\/download\/\">phash.org<\/a> won&#8217;t build on CentOS even though ffmpeg-devel is installed. I don&#8217;t even think this is the fault of pHash, I think the CentOS package is broken.<\/p>\n<p>When trying to build it I get:<\/p>\n<p><code>libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -pthread -I\/usr\/local\/include -I\/usr\/include\/libavcodec -I\/usr\/include\/libavformat -I\/usr\/include\/libswscale -Dcimg_use_png -Dcimg_use_jpeg -Dcimg_use_fftw3 -O2 -ffast-math -O3 -MT pHash.lo -MD -MP -MF .deps\/pHash.Tpo -c pHash.cpp -fPIC -DPIC -o .libs\/pHash.o<br \/>\nIn file included from pHash.cpp:28:0:<br \/>\ncimgffmpeg.h:38:37: fatal error: .\/libavformat\/avformat.h: No such file or directory<br \/>\n#include \".\/libavformat\/avformat.h\"<\/code><\/p>\n<p>What&#8217;s missing is some symbolic links. These are the commands I needed to run:<\/p>\n<p><code>ln -s \/usr\/include\/ffmpeg\/libavformat\/ \/usr\/include\/libavformat<br \/>\nln -s \/usr\/include\/ffmpeg\/libavcodec\/ \/usr\/include\/libavcodec<br \/>\nln -s \/usr\/include\/ffmpeg\/libavutil\/ \/usr\/include\/libavutil<br \/>\nln -s \/usr\/include\/ffmpeg\/libswscale\/ \/usr\/include\/libswscale<\/code><\/p>\n<p>I was worried it would be something more serious, but that was the only problem :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For some reason this doesn&#8217;t work out of the box. The official pHash 0.9.6 from phash.org won&#8217;t build on CentOS even though ffmpeg-devel is installed. I don&#8217;t even think this is the fault of pHash, I think the CentOS package is broken. When trying to build it I get: libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. &hellip; <\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-andrew","4":"post-1076","6":"format-standard","7":"category-creative-commons"},"_links":{"self":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/1076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/comments?post=1076"}],"version-history":[{"count":5,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/1076\/revisions"}],"predecessor-version":[{"id":1081,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/posts\/1076\/revisions\/1081"}],"wp:attachment":[{"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/media?parent=1076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/categories?post=1076"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/littlesvr.ca\/grumble\/wp-json\/wp\/v2\/tags?post=1076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}