Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627562 - media-video/ffmpeg[jpeg2k]- does not configure with =media-libs/openjpeg-2.2.0
Summary: media-video/ffmpeg[jpeg2k]- does not configure with =media-libs/openjpeg-2.2.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-11 19:50 UTC by David Kredba
Modified: 2017-08-27 09:23 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log file (config.log,406.90 KB, text/plain)
2017-08-11 19:51 UTC, David Kredba
Details
Have ffmpeg search for libopenjpeg-2.2 (ffmpeg-libopenjpeg.patch,4.43 KB, patch)
2017-08-15 23:50 UTC, sluidfoe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kredba 2017-08-11 19:50:00 UTC
config.log:
openjpeg_2_1_openjpeg_h
openjpeg_2_0_openjpeg_h
openjpeg_1_5_openjpeg_h

check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC
check_func_headers openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC
check_ld cc -lopenjp2 -DOPJ_STATIC
check_cc -DOPJ_STATIC
BEGIN /var/tmp/portage/media-video/ffmpeg-3.3.3/temp/ffconf.Lpxd7fdj.c
    1   #include <openjpeg-2.1/openjpeg.h>
    2   #include <stdint.h>
    3   long check_opj_version(void) { return (long) opj_version; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_opj_version) & 0xFFFF;
    6   return ret; }
END /var/tmp/portage/media-video/ffmpeg-3.3.3/temp/ffconf.Lpxd7fdj.c
x86_64-pc-linux-gnu-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -O2 -g -std=c11 -fomit-frame-pointer -fPIC -pthread -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/freetype2 -I/usr/include/freetype2 -I/usr/include/openh264 -DOPJ_STATIC -c -o /var/tmp/portage/media-video/ffmpeg-3.3.3/temp/ffconf.JzalR5HC.o /var/tmp/portage/media-video/ffmpeg-3.3.3/temp/ffconf.Lpxd7fdj.c
/var/tmp/portage/media-video/ffmpeg-3.3.3/temp/ffconf.Lpxd7fdj.c:1:10: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory
 #include <openjpeg-2.1/openjpeg.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Ditto
/var/tmp/portage/media-video/ffmpeg-3.3.3/temp/ffconf.Lpxd7fdj.c:1:10: fatal error: openjpeg-2.0/openjpeg.h: No such file or directory
 #include <openjpeg-2.0/openjpeg.h>

/var/tmp/portage/media-video/ffmpeg-3.3.3/temp/ffconf.Lpxd7fdj.c:1:10: fatal error: openjpeg-1.5/openjpeg.h: No such file or directory
 #include <openjpeg-1.5/openjpeg.h>

emerge --info ffmpeg:
media-video/ffmpeg-3.3.2::gentoo was built with the following:
USE="X alsa amr amrenc bluray bzip2 cdio celt chromaprint encode fontconfig frei0r gme gmp gpl gsm hardcoded-tables iconv iec61883 ieee1394 jpeg2k ladspa libass libilbc librtmp libsoxr lzma modplug mp3 network opengl openh264 openssl opus postproc pulseaudio samba schroedinger sdl sofalizer speex ssh theora threads truetype vdpau vorbis vpx wavpack webp x264 x265 xcb xvid zimg zlib zvbi (-altivec) -bs2b -cpudetection -debug -doc -fdk -flite -fribidi -gcrypt -gnutls -jack -kvazaar -libcaca -libv4l (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -nvenc -openal -oss -pic -rubberband -snappy -static-libs -test -twolame -v4l -vaapi -zeromq" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3 -3dnow -3dnowext -aes -avx -avx2 -fma3 -fma4 -sse4_2 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher
Comment 1 David Kredba 2017-08-11 19:50:32 UTC
emerge --info
Portage 2.3.6 (python 2.7.13-final-0, default/linux/amd64/13.0/no-multilib, gcc-7.1.0, glibc-2.25-r2, 4.12.0-gentoo x86_64)
=================================================================
System uname: Linux-4.12.0-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.4.1
KiB Mem:     8169292 total,   2251168 free
KiB Swap:    8396796 total,   8396796 free
Timestamp of repository gentoo: Fri, 11 Aug 2017 08:30:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.5.3::gentoo
dev-util/cmake:           3.9.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r1::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.9.6-r4::gentoo, 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15.1::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r3::gentoo, 6.3.0::gentoo, 7.1.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -g"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -g"
GENTOO_MIRRORS="ftp://gentoo.mirror.web4u.cz/"
LANG="cs_CZ.utf8"
LC_ALL="cs_CZ.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS=""
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl alsa amd64 berkdb blas branding bzip2 cairo caps cdda cddb cdparanoia cdr cli cracklib crypt cups cxx dbus declarative djvu dri dts dv dvb dvd dvdr encode exif ffmpeg fftw flac fontconfig fortran ftp gd gdbm geoip gif gmp gnuplot graphviz gsl gsm gstreamer hdf5 iconv icu idn ieee1394 imagemagick imlib ipv6 ithreads javascript jbig jpeg jpeg2k kde ladspa lame lapack lcms libass libsamplerate lzma lzo mad matroska mms mmx mmxext mng modplug modules mp3 mp4 mpeg mtp musepack musicbrainz ncurses netcdf nls nptl ogg openexr opengl openmp pam pch pcre pdf perl plotutils png postscript pulseaudio python qt3support qt5 quicktime rdp readline seccomp semantic-desktop session slang smp sndfile sox speex spell sse sse2 ssl ssse3 svg szip taglib tcpd theora threads tidy tiff truetype udev unicode usb vdpau vorbis wavpack wmf x264 xattr xcb xft xinerama xml xosd xpm xscreensaver xv xvid xvmc 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 adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a jl2005c kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 pentax polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh ricoh_g3 samsung sierra sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z topfield toshiba_pdrm11 tp6801" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1" CURL_SSL="gnutls" ELIBC="glibc" FFTOOLS="aviocat cws2fws ffescape ffeval fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart trasher ffhash sidxindex" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" L10N="cs en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer scripting-beanshell scripting-javascript nlpsolver" LINGUAS="cs en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="nouveau" 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"
USE_PYTHON="2.7 3.5"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 David Kredba 2017-08-11 19:51:39 UTC
Created attachment 488612 [details]
config.log file
Comment 3 Conrad Kostecki gentoo-dev 2017-08-11 21:34:28 UTC
Same problem here.
Comment 4 Klaus Kusche 2017-08-12 10:40:33 UTC
Same problem here.

As far as I can tell, the ffmpeg configure script explicitely checks
for libopenjpeg header dir's 1.5, 2.0 or 2.1, but not 2.2.
Comment 5 Conrad Kostecki gentoo-dev 2017-08-12 10:54:39 UTC
(In reply to Klaus Kusche from comment #4)
> Same problem here.
> 
> As far as I can tell, the ffmpeg configure script explicitely checks
> for libopenjpeg header dir's 1.5, 2.0 or 2.1, but not 2.2.

It seems, that in git/HEAeix libopD it has been added:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/078322f33ced4b2db6ac3e5002f98233d6fbf643
Comment 6 sluidfoe 2017-08-15 23:48:03 UTC
It looks like this is a consequence of using only libopenjpeg:2. Any versions in slot 2 install as libopenjp2 rather than libopenjpeg2.

Also, the patch from upstream mentioned in comment 5 doesn't apply cleanly, but with some rejiggering it will get there. Unfortunately this doesn't do anything to help with the slotting and the inability of configure to find openjpeg-2.1/openjpeg.h.

Ideas: (1) Rely on libopenjpeg:1 (2) Install (or symlink) with the full name.
Comment 7 sluidfoe 2017-08-15 23:50:18 UTC
Created attachment 489230 [details, diff]
Have ffmpeg search for libopenjpeg-2.2

Tweaked from upstream's master branch to apply to ffmpeg-3.3.3. Requires libraries installed as "libopenjpeg," not "libopenjp."
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-17 08:48:45 UTC
Heard of pkg-config, anyone?
Comment 9 Vincent-Xavier JUMEL 2017-08-21 09:04:27 UTC
So the bug reside in media-libs/openjpeg which doesn't provide /usr/lib/pkgconfig/libopenjpeg.pc but just only /usr/lib/pkgconfig/libopenjp2.pc
Comment 10 Austin English (RETIRED) gentoo-dev 2017-08-21 20:05:32 UTC
FWIW, a diff of installed files between 2.1.2 and 2.2.0 (I removed .xz docs which don't matter here)

workstation-unstable-2017082101 ~ # cat diff
--- 2.1.2.s.txt	2017-08-21 20:01:33.274396645 +0000
+++ 2.2.0.s.txt	2017-08-21 20:01:41.604857126 +0000
@@ -1,25 +1,27 @@
 /usr/bin/opj_compress
 /usr/bin/opj_decompress
 /usr/bin/opj_dump
-/usr/include/openjpeg-2.1/openjpeg.h
-/usr/include/openjpeg-2.1/opj_config.h
-/usr/include/openjpeg-2.1/opj_stdint.h
-/usr/lib32/libopenjp2.so.2.1.2
-/usr/lib32/libopenjp2.so.7 -> libopenjp2.so.2.1.2
+/usr/include/openjpeg-2.2/openjpeg.h
+/usr/include/openjpeg-2.2/opj_config.h
+/usr/include/openjpeg-2.2/opj_stdint.h
+/usr/lib32/libopenjp2.a
+/usr/lib32/libopenjp2.so.2.2.0
+/usr/lib32/libopenjp2.so.7 -> libopenjp2.so.2.2.0
 /usr/lib32/libopenjp2.so -> libopenjp2.so.7
-/usr/lib32/openjpeg-2.1/OpenJPEGConfig.cmake
-/usr/lib32/openjpeg-2.1/OpenJPEGTargets.cmake
-/usr/lib32/openjpeg-2.1/OpenJPEGTargets-gentoo.cmake
+/usr/lib32/openjpeg-2.2/OpenJPEGConfig.cmake
+/usr/lib32/openjpeg-2.2/OpenJPEGTargets.cmake
+/usr/lib32/openjpeg-2.2/OpenJPEGTargets-gentoo.cmake
 /usr/lib32/pkgconfig/libopenjp2.pc
-/usr/lib64/libopenjp2.so.2.1.2
-/usr/lib64/libopenjp2.so.7 -> libopenjp2.so.2.1.2
+/usr/lib64/libopenjp2.a
+/usr/lib64/libopenjp2.so.2.2.0
+/usr/lib64/libopenjp2.so.7 -> libopenjp2.so.2.2.0
 /usr/lib64/libopenjp2.so -> libopenjp2.so.7
-/usr/lib64/openjpeg-2.1/OpenJPEGConfig.cmake
-/usr/lib64/openjpeg-2.1/OpenJPEGTargets.cmake
-/usr/lib64/openjpeg-2.1/OpenJPEGTargets-gentoo.cmake
+/usr/lib64/openjpeg-2.2/OpenJPEGConfig.cmake
+/usr/lib64/openjpeg-2.2/OpenJPEGTargets.cmake
+/usr/lib64/openjpeg-2.2/OpenJPEGTargets-gentoo.cmake
 /usr/lib64/pkgconfig/libopenjp2.pc
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-08-22 14:49:42 UTC
Bug affects stable ffmpeg as well.
Comment 12 Alexis Ballier gentoo-dev 2017-08-26 13:42:28 UTC
commit 904d190b4714c2d7a2ca9637f45d817a13e69125 (HEAD -> master, origin/master, origin/HEAD)
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Sat Aug 26 15:40:52 2017 +0200

    media-video/ffmpeg: Backport upstream patches to build with openjpeg 2.2, bugs #628302 and #627562
    
    Package-Manager: Portage-2.3.8, Repoman-2.3.3

thanks


(In reply to Michał Górny from comment #8)
> Heard of pkg-config, anyone?

mailto: ffmpeg-devel@ffmpeg.org
Comment 13 Vincent-Xavier JUMEL 2017-08-27 09:23:43 UTC
(In reply to Michał Górny from comment #8)
> Heard of pkg-config, anyone?

ffmpeg doesn't use pkg-config in their configure script