Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616140 - x11-libs/libX11-1.6.5 : couldn't open /usr/include/X11/keysymdef.h
Summary: x11-libs/libX11-1.6.5 : couldn't open /usr/include/X11/keysymdef.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-20 16:58 UTC by Toralf Förster
Modified: 2019-06-17 15:25 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,4.87 KB, text/plain)
2017-04-20 16:58 UTC, Toralf Förster
Details
config.log.tbz2 (config.log.tbz2,13.11 KB, application/x-bzip)
2017-04-20 16:59 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,18.77 KB, text/plain)
2017-04-20 16:59 UTC, Toralf Förster
Details
environment (environment,141.01 KB, text/plain)
2017-04-20 16:59 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,22.32 KB, application/x-bzip)
2017-04-20 16:59 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,41.16 KB, application/x-bzip)
2017-04-20 16:59 UTC, Toralf Förster
Details
x11-libs:libX11-1.6.5:20170420-040115.log (x11-libs:libX11-1.6.5:20170420-040115.log,143.27 KB, text/plain)
2017-04-20 16:59 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-04-20 16:58:55 UTC
makekeys: failed to find small enough hash!
Try increasing KTNUM in makekeys.c
make[1]: *** [Makefile:1422: ks_tables.h] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src'

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

  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]   python2.7 (fallback)
Comment 1 Toralf Förster gentoo-dev 2017-04-20 16:58:58 UTC
Created attachment 470478 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-04-20 16:59:02 UTC
Created attachment 470480 [details]
config.log.tbz2
Comment 3 Toralf Förster gentoo-dev 2017-04-20 16:59:05 UTC
Created attachment 470482 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-04-20 16:59:08 UTC
Created attachment 470484 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-04-20 16:59:11 UTC
Created attachment 470486 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-04-20 16:59:14 UTC
Created attachment 470488 [details]
temp.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-04-20 16:59:18 UTC
Created attachment 470490 [details]
x11-libs:libX11-1.6.5:20170420-040115.log
Comment 8 Toralf Förster gentoo-dev 2017-07-16 15:58:27 UTC
seems to be an ABI=32 problem, occurred today at tinderbox image 
13.0-desktop-plasma_abi32+64_20170716-132501
too
Comment 9 Toralf Förster gentoo-dev 2018-04-15 15:52:12 UTC
and today again at 17.0-desktop-gnome-systemd_libressl-abi32+64_20180415-103854

FWIW the make.conf:

USE="
  16bit-indices a52 acl activefilter -adobe-cff a-like-o aqbanking -attica
  bibutils cdrom chromecast cinder debug-malloc enigma fits -freewnn
  -glide google handbook -hdaps icarus irda -lxml pbkdf2 qmail-spp quote
  system-jpeg -telepathy usrmerge utmp visio warmstarts xetex xfce
  zemberek zstd

  ssp -cdinstall -oci8 -pax_kernel -valgrind -symlink
"
Comment 10 Toralf Förster gentoo-dev 2018-05-02 18:06:08 UTC
This seems to be an ABI_X86="32 64" problem b/c it doesn't occur at other images then those,
Comment 11 Alexander Tsoy 2019-06-08 10:38:52 UTC
This is likely a problem with large file support in sandbox. I get the same errors on 3Tb XFS filesystem:

../src/util/makekeys /usr/include/X11/keysymdef.h /usr/include/X11/XF86keysym.h /usr/include/X11/Sunkeysym.h /usr/include/X11/DECkeysym.h /usr/include/X11/HPkeysym.h > ks_tables_h                                                          
couldn't open /usr/include/X11/keysymdef.h
couldn't open /usr/include/X11/XF86keysym.h
couldn't open /usr/include/X11/Sunkeysym.h
couldn't open /usr/include/X11/DECkeysym.h
couldn't open /usr/include/X11/HPkeysym.h
makekeys: failed to find small enough hash!
Try increasing KTNUM in makekeys.c


FEATURES="-sandbox -usersandbox" workarounds this problem for me.
Comment 12 Toralf Förster gentoo-dev 2019-06-08 10:45:28 UTC
(In reply to Alexander Tsoy from comment #11)
> This is likely a problem with large file support in sandbox.
Interesting, here I do use two 1.6 TB file systems (LVM) with BTRFS for the tinderbox.
Comment 13 Alexander Tsoy 2019-06-08 10:54:57 UTC
IIRC btrfs does not reuse inode numbers (if inode_cache is off), so even on a filesystem smaller than 2Tb they could reach 64-bit values.
Comment 14 Alexander Tsoy 2019-06-08 12:06:05 UTC
(In reply to Alexander Tsoy from comment #11)
> This is likely a problem with large file support in sandbox.
Or more likely this is because "makekeys" lacks lfs support. And when sandbox is disabled, it silently fail to open files (due to bug 681790 ?). I'll try to debug this later.
Comment 15 Alexander Tsoy 2019-06-09 14:39:17 UTC
(In reply to Alexander Tsoy from comment #14)
> Or more likely this is because "makekeys" lacks lfs support. And when
> sandbox is disabled, it silently fail to open files (due to bug 681790 ?).
makekeys is indeed compiled without large file support, however it's somehow works without sandbox. By "works" I mean that it actually successfully opens files with inode numbers > 2^32 using fopen():

# ls -1i /usr/include/X11/keysymdef.h /usr/include/X11/XF86keysym.h /usr/include/X11/Sunkeysym.h /usr/include/X11/DECkeysym.h /usr/include/X11/HPkeysym.h
4603511856 /usr/include/X11/DECkeysym.h
4603511855 /usr/include/X11/HPkeysym.h
4603511852 /usr/include/X11/Sunkeysym.h
4603511847 /usr/include/X11/XF86keysym.h
4603511854 /usr/include/X11/keysymdef.h


Adding append-lfs-flags to ebuild fixes this issue. So I think this is a duplicate of bug 550502
Comment 16 Matt Turner gentoo-dev 2019-06-09 23:07:55 UTC
(In reply to Alexander Tsoy from comment #15)
> (In reply to Alexander Tsoy from comment #14)
> > Or more likely this is because "makekeys" lacks lfs support. And when
> > sandbox is disabled, it silently fail to open files (due to bug 681790 ?).
> makekeys is indeed compiled without large file support, however it's somehow
> works without sandbox. By "works" I mean that it actually successfully opens
> files with inode numbers > 2^32 using fopen():
> 
> # ls -1i /usr/include/X11/keysymdef.h /usr/include/X11/XF86keysym.h
> /usr/include/X11/Sunkeysym.h /usr/include/X11/DECkeysym.h
> /usr/include/X11/HPkeysym.h
> 4603511856 /usr/include/X11/DECkeysym.h
> 4603511855 /usr/include/X11/HPkeysym.h
> 4603511852 /usr/include/X11/Sunkeysym.h
> 4603511847 /usr/include/X11/XF86keysym.h
> 4603511854 /usr/include/X11/keysymdef.h
> 
> 
> Adding append-lfs-flags to ebuild fixes this issue. So I think this is a
> duplicate of bug 550502

Thanks for debugging! Anyone want to give https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/14 a try?
Comment 17 Alexander Tsoy 2019-06-10 17:49:26 UTC
(In reply to Matt Turner from comment #16)
> Thanks for debugging! Anyone want to give
> https://gitlab.freedesktop.org/xorg/lib/libx11/merge_requests/14 a try?
Thanks! It works for me. I've also applied the following patch:
https://gitlab.freedesktop.org/xorg/lib/libx11/commit/a121b7b0c210efe10bf93453b29050282324c906
Comment 18 Larry the Git Cow gentoo-dev 2019-06-17 15:25:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e63e33be6eb1f152b27c00a81494e85b3152709

commit 6e63e33be6eb1f152b27c00a81494e85b3152709
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2019-06-17 14:54:52 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2019-06-17 15:18:51 +0000

    x11-libs/libX11: Version bump to 1.6.8
    
    Closes: https://bugs.gentoo.org/299654
    Closes: https://bugs.gentoo.org/550502
    Closes: https://bugs.gentoo.org/616140
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-libs/libX11/Manifest            |  1 +
 x11-libs/libX11/libX11-1.6.8.ebuild | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)