Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 765379 - media-gfx/sane-backends-1.0.31 fatal error: glib-object.h: No such file or directory
Summary: media-gfx/sane-backends-1.0.31 fatal error: glib-object.h: No such file or ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 766483 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-14 05:44 UTC by email200202
Modified: 2021-01-29 12:58 UTC (History)
10 users (show)

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


Attachments
build.log (build.log,149.81 KB, text/plain)
2021-01-14 05:46 UTC, email200202
Details
emerge -pqv '=media-gfx/sane-backends-1.0.31::gentoo' (file_765379.txt,881 bytes, text/plain)
2021-01-14 05:48 UTC, email200202
Details
emerge --info '=media-gfx/sane-backends-1.0.31::gentoo' (file_765379.txt,6.34 KB, text/plain)
2021-01-14 05:49 UTC, email200202
Details
Diff to filter out escl for non-native ABIs (sane-backends-1.0.31-escl-fix.diff,661 bytes, patch)
2021-01-17 03:47 UTC, Michael Cook
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2021-01-14 05:44:30 UTC
/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
Comment 1 email200202 2021-01-14 05:46:47 UTC
Created attachment 682783 [details]
build.log
Comment 2 email200202 2021-01-14 05:48:20 UTC
Created attachment 682786 [details]
emerge -pqv '=media-gfx/sane-backends-1.0.31::gentoo'
Comment 3 email200202 2021-01-14 05:49:42 UTC
Created attachment 682789 [details]
emerge --info '=media-gfx/sane-backends-1.0.31::gentoo'
Comment 4 Larry the Git Cow gentoo-dev 2021-01-14 07:51:28 UTC
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(-)
Comment 5 Sven Eden 2021-01-15 16:49:51 UTC
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.
Comment 6 Michael Cook 2021-01-16 18:33:30 UTC
(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
Comment 7 Michael Cook 2021-01-16 19:22:33 UTC
Looking into this more, we need to disable the escl backend when compiling 32-bit ABI or add multilib support for app-text/poppler.
Comment 8 Michael Cook 2021-01-17 03:46:25 UTC
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.
Comment 9 Michael Cook 2021-01-17 03:47:16 UTC
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.
Comment 10 Sven Eden 2021-01-18 09:19:59 UTC
(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.
Comment 11 Lars Wendler (Polynomial-C) gentoo-dev 2021-01-22 07:40:46 UTC
*** Bug 766483 has been marked as a duplicate of this bug. ***
Comment 12 Larry the Git Cow gentoo-dev 2021-01-29 12:58:02 UTC
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(-)