Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 616264

Summary: media-gfx/hp2xx-3.4.4-r1 : to_x11.c:47:22: fatal error: X11/Xlib.h: No such file or directory
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Konstantin Münning <konstantin>
Status: RESOLVED DUPLICATE    
Severity: normal CC: printing, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
media-gfx:hp2xx-3.4.4-r1:20170421-235157.log
x.txt
x.txt

Description Toralf Förster gentoo-dev 2017-04-22 06:27:41 UTC
rm -f to_x11.o
cc -DUNIX -DHAS_UNIX_X11  -DPNG -DTIF -DJPG -DPIC_PAC -DEPSON -c -O2 -pipe -march=native -Wall -I.             to_x11.c
to_x11.c:47:22: fatal error: X11/Xlib.h: No such file or directory
 #include <X11/Xlib.h>
                      ^
compilation terminated.

  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named 13.0-libressl-abi32+64_20170419-212006) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python3.5 (fallback)
  [3]   python2.7 (fallback)
Comment 1 Toralf Förster gentoo-dev 2017-04-22 06:27:45 UTC
Created attachment 470610 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-04-22 06:27:48 UTC
Created attachment 470612 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-04-22 06:27:51 UTC
Created attachment 470614 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-04-22 06:27:55 UTC
Created attachment 470616 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-04-22 06:27:58 UTC
Created attachment 470618 [details]
media-gfx:hp2xx-3.4.4-r1:20170421-235157.log
Comment 6 Konstantin Münning 2017-04-22 11:36:17 UTC
To compile for X11 you need the X11 header files which are in x11-libs/libX11. Apparently this is currently not installed/available in your chroot image.
Comment 7 Toralf Förster gentoo-dev 2017-04-22 13:16:46 UTC
(In reply to Konstantin Münning from comment #6)
indeed - so mising dep ?
Comment 8 Konstantin Münning 2017-04-22 13:27:42 UTC
Latest version in tree (hp2xx-3.4.4-r1) depends on x11-libs/libX11 when the X use flag is set. Without this use flag it does not try to compile to_x11. Your report shows the error when you manually invoke GCC to compile to_x11. If you do it manually because emerge skipped that it may be due to missing X use flag.
Comment 9 Toralf Förster gentoo-dev 2017-04-22 13:43:29 UTC
(In reply to Konstantin Münning from comment #8)
There's no "manual" interaction. This is a tinderbox :

https://zwiebeltoralf.de/tinderbox.html

helping to detect missing USE flags dep handling in ebuilds and other static build issues.

You're sure there's so room to improve the ebuild ?
Comment 10 Konstantin Münning 2017-04-22 14:20:11 UTC
On first glance it looked as a manual invocation of GCC.

So to sum up
- you do have X use flag set for media-gfx/hp2xx-3.4.4-r1
- x11-libs/libX11 is not present in your installation
- x11-libs/libX11 is not pulled in when compiling media-gfx/hp2xx-3.4.4-r1
- your portage tree is rather recent
- your emerge command does not include --nodeps
- there are no error or warning messages from emerge command while resolving dependencies

If all above is true then it seems to be a dependency resolution problem of emerge and I don't know what I can do to fix this.

On my system I checked the output of emerge -pv --emptytree hp2xx with only X flag set and libX11 was pulled in so here the dependency resolution does what I expect. Maybe you could somehow trace why on your tinderbox why it doesn't.
Comment 11 Toralf Förster gentoo-dev 2017-04-22 14:40:21 UTC
Created attachment 470658 [details]
x.txt

emerge -pv --emptytree hp2xx 1>/tmp/x.txt 2>&1
Comment 12 Konstantin Münning 2017-04-22 16:07:41 UTC
OK, here it's media-gfx/hp2xx-3.4.4, not -r1 as in the subject for that bug. The older ebuild does not have the libX11 dependency but -r1 has. Please try with media-gfx/hp2xx-3.4.4-r1.
Comment 13 Toralf Förster gentoo-dev 2017-04-22 16:23:14 UTC
Created attachment 470678 [details]
x.txt

-r1: emerge -pv --emptytree hp2xx 1>/tmp/x.txt 2>&1
Comment 14 Konstantin Münning 2017-04-22 17:46:57 UTC
The X use flag is disabled and therefore libX11 is not pulled in. But then to_x11 should not be compiled. I'll have to look into that. Is USE="-X" intentional? If not, please try with USE="X".
Comment 15 Toralf Förster gentoo-dev 2017-04-22 18:23:00 UTC
(In reply to Konstantin Münning from comment #14)
>Is USE="-X" intentional?

Yes, and zillions others USE flag combos - that's what the tinderbox was designed for.
Comment 16 Konstantin Münning 2017-04-22 19:01:02 UTC
This could have been shorter if you had said so to comment #8 or said no to the first item of comment #10. Please don't ignore things I write because they all have a purpose.

I checked the build system and the patch applied and it seems that the build process doesn't fully respect the X use flag. I'll look into this and report.
Comment 17 Konstantin Münning 2017-04-23 09:41:13 UTC
This bug is fixed in versions -r2 (bug #408307) and -r3 (bug #529800) but as of now none has been merged in tree. Sorry, I'm just a proxy maintainer and if the devs don't merge my fixes the bugs stay around.

*** This bug has been marked as a duplicate of bug 408307 ***