Trying to compile chromeprint 1.0, I get this error: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FFMPEG_LIBSWRESAMPLE_INCLUDE_DIRS used as include directory in directory /var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0/examples Reproducible: Always Steps to Reproduce: 1. emerge chromeprint disabling LTO does not help.
Created attachment 362550 [details] build.log
That CMakeOutput.log might be of interest, check also what does virtual/ffmpeg resolves to.
Created attachment 362592 [details] CMake output log
I attached the requested file, HTH. How do I check to which package virtual/ffmpeg resolves? I have both - libav and ffmpeg - installed. # qlist -Iv ffmpeg media-plugins/gst-plugins-ffmpeg-0.10.13_p201211-r1 virtual/ffmpeg-9 # qlist -Iv libav media-plugins/gst-plugins-libav-1.2.0 media-video/libav-9.10 # equery g virtual/ffmpeg * Searching for ffmpeg in virtual ... * dependency graph for virtual/ffmpeg-0.10.3 `-- virtual/ffmpeg-0.10.3 amd64 `-- media-video/ffmpeg-1.2.4 (>=media-video/ffmpeg-0.10.3) ~amd64 [X? encode? gsm? jpeg2k? mp3? sdl? speex? theora? threads? truetype? vaapi? vdpau? x264?] `-- media-video/libav-9.10 (>=media-video/libav-0.8.4) ~amd64 [X? encode? gsm? jpeg2k? mp3? sdl? speex? theora? threads? truetype? vaapi? vdpau? x264?] [ virtual/ffmpeg-0.10.3 stats: packages (3), max depth (1) ] * dependency graph for virtual/ffmpeg-9 `-- virtual/ffmpeg-9 ~amd64 `-- media-video/libav-9.10 (>=media-video/libav-9) ~amd64 [X? encode? gsm? jpeg2k? mp3? opus? sdl? speex? theora? threads? truetype? vaapi? vdpau? x264?] `-- media-video/ffmpeg-1.2.4 (>=media-video/ffmpeg-1.0) ~amd64 [X? encode? gsm? jpeg2k? mp3? opus? sdl? speex? theora? threads? truetype? vaapi? vdpau? x264?] [ virtual/ffmpeg-9 stats: packages (3), max depth (1) ]
The question was if it resolves to media-video/libav or to media-video/ffmpeg. For completeness, add 'emerge -1pv media-video/libav' to show useflags libav was build with. Probably either chromeprint prefers other option or disagrees with this version.
I only have libav installed, and I have this bug.
Here are the use flags of libav. [ebuild R ] media-video/libav-9.10:0/9 USE="X aac alsa avx bzip2 encode gpl hardcoded-tables mmx mmxext mp3 opus pulseaudio sdl ssl ssse3 threads truetype vaapi vorbis x264 xvid zlib -3dnow -3dnowext (-altivec) -amr -bindist -cdio -cpudetection -custom-cflags -debug -doc -faac -fdk -frei0r -gsm -ieee1394 -jack -jpeg2k (-neon) -network -openssl -oss -pic -rtmp -schroedinger -speex -static-libs {-test} -theora -tools -v4l -vdpau (-vis) -vpx" 0 kB
I have also only libav and get the same error. Here are my useflags media-video/libav-9.10:0/9 USE="3dnow 3dnowext X aac alsa bzip2 encode gpl hardcoded-tables mmx mmxext mp3 opus sdl ssl ssse3 threads truetype vaapi vorbis x264 xvid zlib (-altivec) -amr -avx -bindist -cdio -cpudetection -custom-cflags -debug -doc -faac -fdk -frei0r -gsm -ieee1394 -jack -jpeg2k (-neon) -network -openssl -oss -pic -pulseaudio -rtmp -schroedinger -speex -static-libs {-test} -theora -tools -v4l -vdpau (-vis) -vpx"
Same here on several machines. * without 'tools' useflag chromaprint builds (but tools useflag is requiered by picard) * the problem seems to be that libswresample header file is named 'swresample.h' in ffmpeg, but 'avresample.h' in libav (/usr/include/libavresample/avresample.h) From /var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0/cmake/modules/FindFFmpeg.cmake : FFMPEG_FIND(LIBSWRESAMPLE swresample swresample.h) # not sure about the header to look for here.
Created attachment 363002 [details, diff] libavresample patches It is more than a filename change. examples/fpcalc.c uses swr_convert, while libav provides avresample_convert; these functions have different signatures. Somebody more familiar with libav/ffmpeg will need to provide a larger patch for fpcalc. fpcalc.c in chromaprint-1.0 includes IFDEFs for libswresample. The attached replacement for chromaprint-1.0-libav9.patch fixes the CMake files to differentiate between ffmpeg and libav for the resample library. The package will now compile, but fpcalc will, AFAIK, be non-functional with libav. I have added appropriate IFDEF #include to fpcalc.c, but somebody who is more familiar with ffmpeg and libav will still need to provide a patch to fpcalc.c using the added HAVE_AVRESAMPLE define.
Correction to my previous comment: It functions fine on my library of FLAC and MP3, but doesn't work on Ogg.
Created attachment 363078 [details] chromaprint-1.0-libav9.patch.out (In reply to Gordon Pettey from comment #10) > Created attachment 363002 [details, diff] [details, diff] > libavresample patches This patch also fails. Attached is /var/tmp/media-libs/chromaprint-1.0/tmp/chromaprint-1.0-libav9.patch.out
(In reply to Nicholas O'Connor from comment #12) > Created attachment 363078 [details] > chromaprint-1.0-libav9.patch.out > > (In reply to Gordon Pettey from comment #10) > > Created attachment 363002 [details, diff] [details, diff] [details, diff] > > libavresample patches > > This patch also fails. Attached is > /var/tmp/media-libs/chromaprint-1.0/tmp/chromaprint-1.0-libav9.patch.out Of course it doesn't work. "PWD: /var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0" It applies from /var/tmp/portage/media-libs/chromaprint-1.0/work, just like the ebuild would apply it.
(In reply to Gordon Pettey from comment #13) > Of course it doesn't work. > "PWD: /var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0" > > It applies from /var/tmp/portage/media-libs/chromaprint-1.0/work, just like > the ebuild would apply it. How would someone correct this? I'm getting sick of typing "--exclude chromaprint", and I don't want to mask it just in case it gets fixed.
(In reply to Nicholas O'Connor from comment #14) > (In reply to Gordon Pettey from comment #13) > > Of course it doesn't work. > > "PWD: /var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0" > > > > It applies from /var/tmp/portage/media-libs/chromaprint-1.0/work, just like > > the ebuild would apply it. > > How would someone correct this? I'm getting sick of typing "--exclude > chromaprint", and I don't want to mask it just in case it gets fixed. As long as you don't need to use it on ogg files, just cp -R /usr/portage/media-libs/chromaprint into an overlay and replace the original chromaprint-1.0-libav9.patch with attachment 363002 [details, diff]
Patch works for me too. There's also some improvement upstream: https://bitbucket.org/acoustid/chromaprint/commits/5c803bc06e01e0c70255e62b1e635d0bbbfe1ec2 Discussion about libav https://bitbucket.org/acoustid/chromaprint/commits/c17e6c5fc126254586d9cff6567d9399f23487d8
(In reply to Fabio Bonfante from comment #16) > Patch works for me too. There's also some improvement upstream: > > https://bitbucket.org/acoustid/chromaprint/commits/ > 5c803bc06e01e0c70255e62b1e635d0bbbfe1ec2 > > Discussion about libav > https://bitbucket.org/acoustid/chromaprint/commits/ > c17e6c5fc126254586d9cff6567d9399f23487d8 The first is just a bug fix, not really related to libav or ffmpeg. As it was before, it would attempt to compile after finding ffmpeg .so files, even if it failed to find headers. The second is the IFDEF stuff I mention in comment 10.
Same problem here..... Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.15-r3, 3.10.7-gentoo-r1.custom x86_64) ================================================================= System uname: Linux-3.10.7-gentoo-r1.custom-x86_64-Intel-R-_Core-TM-_i7-3517U_CPU_@_1.90GHz-with-gentoo-2.2 KiB Mem: 8056440 total, 918772 free KiB Swap: 4534396 total, 4489236 free Timestamp of tree: Wed, 20 Nov 2013 23:15:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 distcc 3.1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5-r3, 3.2.5-r3 dev-util/cmake: 2.8.11.2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.13.4 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo my_local_overlay ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth branding bzip2 cairo caps cdda cdr cli cracklib crypt cups cxx dbus directfb dri dts dvd dvdr egl emboss encode exif fam firefox flac fontconfig fortran gdbm gif gmp gnutls gstreamer gtk gtk2 iconv icu imagemagick ipv6 jpeg kerberos lcms libnotify mad mmx mmxext mng modules mp3 mp4 mpeg mtp mudflap multilib mysql ncurses nls nptl nvidia ogg opencl opengl openmp orc pam pango pcre pdf png ppds qt3support qt4 readline samba sdl session spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 startup-notification svg tiff truetype udev udisks unicode upower usb v4l vdpau vim-syntax vorbis wayland wxwidgets x264 x2apic xattr xcb xinerama xml xmp xmpp xv xvid xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="nvidia intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ------------------------------------------------------------------------------ CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FFMPEG_LIBSWRESAMPLE_INCLUDE_DIRS used as include directory in directory /var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0/examples -- Configuring incomplete, errors occurred! * ERROR: media-libs/chromaprint-1.0::gentoo failed (configure phase): * cmake failed * * Call stack: * ebuild.sh, line 93: Called src_configure * environment, line 2844: Called cmake-utils_src_configure * environment, line 632: Called _execute_optionaly 'src_configure' * environment, line 234: Called enable_cmake-utils_src_configure * environment, line 990: Called die * The specific snippet of code: * "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"; * * If you need support, post the output of `emerge --info '=media-libs/chromaprint-1.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=media-libs/chromaprint-1.0::gentoo'`. * The complete build log is located at '/var/tmp/portage/media-libs/chromaprint-1.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-libs/chromaprint-1.0/temp/environment'. * Working directory: '/var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0_build' * S: '/var/tmp/portage/media-libs/chromaprint-1.0/work/chromaprint-1.0'
Upstream has merged fixes for this; just have to wait for a new release (or make a 9999 git ebuild). I've marked my modified patch as obsolete.
https://oxygene.sk/2013/11/chromaprint-1-1-released/ A new version of Chromaprint has been released. There are a few bug fixes, fixed compilation error on OS X 10.9 and added support for compilation with libav (FFmpeg is still the preferred library to use with Chromaprint).
*chromaprint-1.1 (24 Nov 2013) 24 Nov 2013; Justin Lecher <jlec@gentoo.org> -chromaprint-1.0.ebuild, +chromaprint-1.1.ebuild, +files/chromaprint-1.1-gtest.patch, metadata.xml: Version Bump and drop old (Changelog says: "Fixed potential DoS attack in fingerprint decompression code."), fixes #490364; fix gtest detection, #490852