/var/tmp/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31/backend/escl/escl_png.c: In function ‘get_PNG_data’: /var/tmp/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31/backend/escl/escl_png.c:63:2: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 63 | fread (magic, 1, sizeof (magic), scanner->tmp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /var/tmp/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31/backend/escl/escl_pdf.c:39: /usr/include/poppler/glib/poppler.h:22:10: fatal error: glib-object.h: No such file or directory 22 | #include <glib-object.h> | ^~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [Makefile:4835: escl/libescl_la-escl_pdf.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile:3326: all] Error 2 make: *** [Makefile:591: all-recursive] Error 1 * ERROR: media-gfx/sane-backends-1.0.31::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=media-gfx/sane-backends-1.0.31::gentoo'`, * the complete build log and the output of `emerge -pqv '=media-gfx/sane-backends-1.0.31::gentoo'`. * The complete build log is located at '/var/tmp/portage/media-gfx/sane-backends-1.0.31/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-gfx/sane-backends-1.0.31/temp/environment'. * Working directory: '/var/tmp/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31-abi_x86_32.x86' * S: '/var/tmp/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31' >>> Failed to emerge media-gfx/sane-backends-1.0.31, Log file: Reproducible: Always Steps to Reproduce: 1. emerge --sync 2. emerge -auvDN world Actual Results: Failed Expected Results: Build
Created attachment 682783 [details] build.log
Created attachment 682786 [details] emerge -pqv '=media-gfx/sane-backends-1.0.31::gentoo'
Created attachment 682789 [details] emerge --info '=media-gfx/sane-backends-1.0.31::gentoo'
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d09842f4db2651a779797177ec6f842a2964d1e commit 7d09842f4db2651a779797177ec6f842a2964d1e Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2021-01-14 07:51:19 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2021-01-14 07:51:25 +0000 media-gfx/sane-backends: Another attempt to fix poppler-glib issue Bug: https://bugs.gentoo.org/765379 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> media-gfx/sane-backends/sane-backends-1.0.31.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I just tried it, and it still fails with -------- In file included from /data/portage/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31/backend/escl/escl_pdf.c:39: /usr/include/poppler/glib/poppler.h:22:10: fatal error: glib-object.h: No such file or directory 22 | #include <glib-object.h> | ^~~~~~~~~~~~~~~ compilation terminated. -------- I then added "-I/usr/include/glib-2.0" to AM_CPPFLAGS in configure.ac (after ebuild unpack) and now it fails with: -------- In file included from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/glib-2.0/gobject/gbinding.h:28, from /usr/include/glib-2.0/glib-object.h:22, from /usr/include/poppler/glib/poppler.h:22, from /data/portage/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31/backend/escl/escl_pdf.c:39: /usr/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory 32 | #include <glibconfig.h> | ^~~~~~~~~~~~~~ compilation terminated. -------- GLIB on my system: -------- sed-m7550 ~ # LC_ALL=C eix -I -e glib [I] dev-libs/glib Available versions: (2) 2.62.6^t 2.64.5^t (~)2.66.2^t (~)2.66.3^t (~)2.66.4^t {dbus debug fam gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" ELIBC="glibc" KERNEL="linux"} Installed versions: 2.66.4(2)^t(21:25:22 12/18/20)(dbus mime xattr -debug -fam -gtk-doc -selinux -static-libs -sysprof -systemtap -test -utils ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32" ELIBC="glibc" KERNEL="linux") Homepage: https://www.gtk.org/ Description: The GLib library of C routines -------- After configuring dev-libs/glib-2.66.4 I find: -------- sed-m7550 ~ # find /data/portage/ -name 'glibconfig.h' /data/portage/portage/dev-libs/glib-2.66.4/work/glib-2.66.4-abi_x86_64.amd64/glib/glibconfig.h /data/portage/portage/dev-libs/glib-2.66.4/work/glib-2.66.4-abi_x86_32.x86/glib/glibconfig.h -------- Why arent't these installed? After copying the abi_x86_64.amd64 glibconfig.h to /usr/include/glib-2.0, I could force compile (ebuild compile) sane backends with disabled abi_x86_32. Unfortunately I need abi_x86_32 for wine, and with them installed, the abi_x86_64 glibconfig.h causes the abi_x86_32 build of the sane backends to fail. So, that is how far I got.
(In reply to Sven Eden from comment #5) > I just tried it, and it still fails with > > -------- > In file included from > /data/portage/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31/ > backend/escl/escl_pdf.c:39: > /usr/include/poppler/glib/poppler.h:22:10: fatal error: glib-object.h: No > such file or directory > 22 | #include <glib-object.h> > | ^~~~~~~~~~~~~~~ > compilation terminated. > -------- > > I then added "-I/usr/include/glib-2.0" to AM_CPPFLAGS in configure.ac (after > ebuild unpack) and now it fails with: > > -------- > In file included from /usr/include/glib-2.0/glib/galloca.h:32, > from /usr/include/glib-2.0/glib.h:30, > from /usr/include/glib-2.0/gobject/gbinding.h:28, > from /usr/include/glib-2.0/glib-object.h:22, > from /usr/include/poppler/glib/poppler.h:22, > from > /data/portage/portage/media-gfx/sane-backends-1.0.31/work/backends-1.0.31/ > backend/escl/escl_pdf.c:39: > /usr/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No > such file or directory > 32 | #include <glibconfig.h> > | ^~~~~~~~~~~~~~ > compilation terminated. > -------- > > GLIB on my system: > > -------- > sed-m7550 ~ # LC_ALL=C eix -I -e glib > [I] dev-libs/glib > Available versions: (2) 2.62.6^t 2.64.5^t (~)2.66.2^t (~)2.66.3^t > (~)2.66.4^t > {dbus debug fam gtk-doc +mime selinux static-libs sysprof systemtap > test utils xattr ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" > ELIBC="glibc" KERNEL="linux"} > Installed versions: 2.66.4(2)^t(21:25:22 12/18/20)(dbus mime xattr > -debug -fam -gtk-doc -selinux -static-libs -sysprof -systemtap -test -utils > ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32" > ELIBC="glibc" KERNEL="linux") > Homepage: https://www.gtk.org/ > Description: The GLib library of C routines > -------- > > After configuring dev-libs/glib-2.66.4 I find: > -------- > sed-m7550 ~ # find /data/portage/ -name 'glibconfig.h' > /data/portage/portage/dev-libs/glib-2.66.4/work/glib-2.66.4-abi_x86_64.amd64/ > glib/glibconfig.h > /data/portage/portage/dev-libs/glib-2.66.4/work/glib-2.66.4-abi_x86_32.x86/ > glib/glibconfig.h > -------- > > Why arent't these installed? > After copying the abi_x86_64.amd64 glibconfig.h to /usr/include/glib-2.0, I > could force compile (ebuild compile) sane backends with disabled abi_x86_32. > > Unfortunately I need abi_x86_32 for wine, and with them installed, the > abi_x86_64 glibconfig.h causes the abi_x86_32 build of the sane backends to > fail. > > So, that is how far I got. pkg-config --cflags glib-2.0 gives me: -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include. This gets further and fails with cairo now
Looking into this more, we need to disable the escl backend when compiling 32-bit ABI or add multilib support for app-text/poppler.
Okay, so I tried to make poppler multilib, but that required making qtcore multilib as well (and others, guess if you didn't compile poppler with qt5 useflag you'd be fine?), so I gave up. Instead I just filtered out escl of non native ABIs, which works fine, but if you need escl on non-native ABIs, you're screwed.
Created attachment 683260 [details, diff] Diff to filter out escl for non-native ABIs No idea if this is an acceptable solution, but it works here.
(In reply to Michael Cook from comment #8) > Okay, so I tried to make poppler multilib, but that required making qtcore > multilib as well (and others, guess if you didn't compile poppler with qt5 > useflag you'd be fine?), so I gave up. Instead I just filtered out escl of > non native ABIs, which works fine, but if you need escl on non-native ABIs, > you're screwed. Well, I need escl for my Canon TR8550. But the only result of filtering out escl on non-native ABIs would be wine applications not being able to use the scanner. At least that is what I suspect to happen. I do not have any programs running under wine that need a scanner, so I can not test this in detail. In the meantime, filtering out escl on non-native ABIs seems to be the viable way to go until a better solution is found.
*** Bug 766483 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13139e37b007d32a4715b77dc7213459a75d33a5 commit 13139e37b007d32a4715b77dc7213459a75d33a5 Author: Michael Cook <mcook@mackal.net> AuthorDate: 2021-01-29 12:57:23 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2021-01-29 12:57:48 +0000 media-gfx/sane-backends: Don't enable escl backend for non-native ABI Closes: https://bugs.gentoo.org/765379 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> media-gfx/sane-backends/sane-backends-1.0.31.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)