I'm attempting to merge media-libs/openimageio-2.2.10.1. This ebuild depends on media-libs/openjpeg-1.5.2, which I've installed with no issues. However, OpenImageIO still throws a fatal error during its CMake build, starting with "/var/tmp/portage/media-libs/openimageio-2.2.10.1/work/oiio-Release-2.2.10.1/src/jpeg2000.imageio/jpeg2000input.cpp:97:5: error: ‘opj_codec_t’ does not name a type; did you mean ‘opj_poc_t’?" Reproducible: Always Steps to Reproduce: emerge "=openimageio-2.2.10.1" Actual Results: CMake appears to correctly locate my OpenJpeg package: -- Found OpenJpeg: /usr/include (found version "1.5") -- Found OpenJpeg: v1.5 /usr/lib64/libopenjpeg.so -- Found OpenJpeg 1.5 -- OPENJPEG_INCLUDES = /usr/include -- OPENJPEG_INCLUDE_DIR = /usr/include -- OPENJPEG_LIBRARIES = /usr/lib64/libopenjpeg.so However, when it reaches the end of the build: FAILED: src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/jpeg2000.imageio/jpeg2000input.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DEMBED_PLUGINS=1 -DOpenImageIO_EXPORTS -DUSE_BOOST_ASIO=1 -DUSE_EXTERNAL_PUGIXML=1 -DUSE_FFMPEG -DUSE_FREETYPE=1 -DUSE_GIF -DUSE_HEIF=1 -DUSE_JPEG_TURBO=1 -DUSE_LIBRAW=1 -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -DUSE_OPENCV=1 -DUSE_OPENJPEG -DUSE_OPENVDB=1 -DUSE_STD_REGEX -DUSE_TBB=1 -DUSE_WEBP=1 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Iinclude/OpenImageIO -Iinclude -Isrc/include -I/var/tmp/portage/media-libs/openimageio-2.2.10.1/work/oiio-Release-2.2.10.1/src/include -I/var/tmp/portage/media-libs/openimageio-2.2.10.1/work/oiio-Release-2.2.10.1/src/dds.imageio/squish -I/usr/include/opencv4 -I/usr/include/freetype2 -isystem /usr/include/OpenEXR -O2 -pipe -fPIC -Wall -Wno-unused-local-typedefs -Wno-unused-result -Wno-aligned-new -Wno-noexcept-type -fno-math-errno -maes -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -std=c++14 -MD -MT src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/jpeg2000.imageio/jpeg2000input.cpp.o -MF src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/jpeg2000.imageio/jpeg2000input.cpp.o.d -o src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/jpeg2000.imageio/jpeg2000input.cpp.o -c /var/tmp/portage/media-libs/openimageio-2.2.10.1/work/oiio-Release-2.2.10.1/src/jpeg2000.imageio/jpeg2000input.cpp /var/tmp/portage/media-libs/openimageio-2.2.10.1/work/oiio-Release-2.2.10.1/src/jpeg2000.imageio/jpeg2000input.cpp:97:5: error: ‘opj_codec_t’ does not name a type; did you mean ‘opj_poc_t’? 97 | opj_codec_t* m_codec; | ^~~~~~~~~~~ | opj_poc_t /var/tmp/portage/media-libs/openimageio-2.2.10.1/work/oiio-Release-2.2.10.1/src/jpeg2000.imageio/jpeg2000input.cpp:98:5: error: ‘opj_stream_t’ does not name a type 98 | opj_stream_t* m_stream; | ^~~~~~~~~~~~ Expected Results: The media-libs/openimageio-2.2.10.1 ebuild would finish building and installing with no fatal errors Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.2.0, glibc-2.32-r7, 5.4.75-gentoo-x86_64 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.4.75-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-2500_CPU_@_3.30GHz-with-glibc2.2.5 KiB Mem: 14335260 total, 1316484 free KiB Swap: 16777212 total, 16774908 free Timestamp of repository gentoo: Fri, 15 Jan 2021 14:30:01 +0000 Head commit of repository gentoo: 962b5e1626f4ca5b564d49fba5ee422b5c46901d Timestamp of repository gig: Tue, 12 Jan 2021 18:35:25 +0000 Head commit of repository gig: 9483081aa0fb6d17e788047740fb4af302c886fb sh bash 5.1_p4 ld GNU ld (Gentoo 2.35.1 p2) 2.35.1 app-shells/bash: 5.1_p4::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.32.0-r1::gentoo dev-lang/python: 2.7.18-r5::gentoo, 3.6.12-r1::gentoo, 3.7.9-r1::gentoo, 3.8.7::gentoo, 3.9.1::gentoo dev-util/cmake: 3.19.3::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7-r1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.3-r1::gentoo sys-devel/binutils: 2.35.1-r1::gentoo sys-devel/gcc: 10.2.0-r5::gentoo sys-devel/gcc-config: 2.3.2-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: gig location: /var/db/repos/gig sync-type: git sync-uri: https://github.com/gentoo-mirror/gig.git masters: gentoo local location: /usr/local/portage masters: gentoo priority: 10 cg location: /var/lib/layman/cg sync-type: laymansync sync-uri: https://github.com/brothermechanic/cg.git masters: gentoo priority: 50 linxon location: /var/lib/layman/linxon sync-type: laymansync sync-uri: https://github.com/linxon/gentoo-overlay.git masters: gentoo priority: 50 pentoo location: /var/lib/layman/pentoo sync-type: laymansync sync-uri: https://github.com/pentoo/pentoo-overlay.git masters: gentoo priority: 50 science location: /var/lib/layman/science sync-type: laymansync sync-uri: https://anongit.gentoo.org/git/proj/sci.git masters: gentoo priority: 50 torbrowser location: /var/lib/layman/torbrowser sync-type: laymansync sync-uri: https://github.com/MeisterP/torbrowser-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps 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.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j1" 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 --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac accessibility acl acpi activities alsa amd64 apache2 atm audit berkdb bittorrent bluetooth branding brightness-control bzip2 cairo caps cdda cdr cgroups chm cli crypt cups curl dbus declarative designer dga dhcpcd djvu dri dri3 dts dvd dvdr egl elfutils emboss emoji encode epoll epub evdev exif expat fam fbcon ffmpeg filecaps firmware flac fontconfig fontforge fortran gdbm geoclue geolocation gif git glamor gles gles2 gmp gpg gpm gtk gtk3 gui guile hardened http iconv icu ieee1394 imlib ipv6 jack jbig jit jpeg jpeg2k json kde kerberos keyinder kipi kwallet lcms ldap libffilibglvnd libidn2 libnotify libtirpc lm-sensors lua lzma mad markdown matroska mdnsresponder-compat messages mms mng mobi mobile mono mp3 mp4 mpeg mpi mtp multilib mysql mysqli nas nat natspec ncurses networkmanager nls nptl numpy offensive ogg openal opencv opengl openmp openssl openvdb pam pango pcre pdf phonon plasma plugins png policykit portaudio portmidi postgres postproc postscript ppdspulseaudio python qml qrcode qt5 rar raw rdp readline samba sddm sdl seccomp secure-delete semantic-desktop share sndfile socks5 speech speex spell split-usr sqlite ssl startup-notification svg syslog systemd systray taglib tcl tcmalloc tcpd theora threads thumbnail tiff tk touchpad truetype udev udisks unicode upnp upower usb user-session vnc vorbis vpx wayland webp widevine widgets wmf wxwidgets x264 xattr xcb xcomposite xinerama xkb xml xv xvfb xvid zeroconf zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 3dnow 3dnowext aes sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="x86 WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_7 python3_8 python3_9" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="vesa fbdev" 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: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= media-libs/openimageio-2.2.9.0-r1::gentoo was built with the following: USE="X ffmpeg gif jpeg2k opencv opengl openvdb python qt5 raw truetype -dicom -doc -field3d -ptex" ABI_X86="(64)" CPU_FLAGS_X86="aes sse2 sse3 sse4_1 sse4_2 ssse3 -avx -avx2 -avx512f -f16c" PYTHON_SINGLE_TARGET="python3_7 (-python3_6) -python3_8 -python3_9"
My emerge -pv looks like this: These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] media-libs/openimageio-2.2.10.1:0/2.2::gentoo [2.2.9.0-r1:0/2.2::gentoo] USE="X ffmpeg gif jpeg2k opencv opengl openvdb python qt5 raw truetype -dicom -doc -field3d -ptex" CPU_FLAGS_X86="aes sse2 sse3 sse4_1 sse4_2 ssse3 -avx -avx2 -avx512f -f16c" PYTHON_SINGLE_TARGET="python3_8* (-python3_6) -python3_7* -python3_9" 0 KiB Total: 1 package (1 upgrade), Size of downloads: 0 KiB
In the future please attach full build.log even if it doesn't seem needed (contains other useful information). That aside, it seems to be detecting the old library: -- Found OpenJpeg: v1.5 /usr/lib64/libopenjpeg.so I managed to reproduce by having both openjpeg-1.5.2-r1:0 and openjpeg-2.4.0:2 installed simultaneously and it interestingly doesn't happen with 2.3.1-r1.
Thanks Ionen, that helped me track it down -- it's not openimageio that requires libjpeg-1.5.2, but actually blender-9999::cg that requires media-libs/openjpeg:0 Looks like this one falls outside of the main gentoo repo so I'll close it!
Still a valid bug given shouldn't fail because 2 valid slots are installed.
Hm, I suspected the issue could be with openjpeg but seems openimageio tries to find openjpeg.h in: /usr/include/openjpeg-2.3 (no -2.4) /usr/include/openjpeg-2.2 /usr/include/openjpeg-2.1 /usr/include/openjpeg /usr/include last will be a symlink to openjpeg-1.5/openjpeg.h
Yeah, you're right: https://github.com/OpenImageIO/oiio/blob/12d81bd84a6e92e3cb14c2b19c7bb3b862898fe4/src/cmake/modules/FindOpenJpeg.cmake I'll go ahead and open an issue with oiio, maybe this would need a patch in the meantime
https://github.com/OpenImageIO/oiio/pull/2829
Hardcoding versions into paths... oof that hurts. Seems like we would need the patch in gentoo until next release, though they do seem to be doing some frequent releases, so maybe hold off for a week or so? If no release, we can add this patch.
(In reply to Aisha Tammy from comment #8) > Hardcoding versions into paths... oof that hurts. > > Seems like we would need the patch in gentoo until next release, though they > do seem to be doing some frequent releases, so maybe hold off for a week or > so? If no release, we can add this patch. +1
*** Bug 766309 has been marked as a duplicate of this bug. ***
What about older versions? Stable is hitting this as well.
This bug also affects 2.2.9.0-r1. The patch has been merged into 2.11.1.0 upstream, which works for me.
(In reply to Adrian from comment #12) > This bug also affects 2.2.9.0-r1. The patch has been merged into 2.11.1.0 > upstream, which works for me. Excellent.