Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499070 - x11-libs/libX11 for abi_x86_32 - ../src/util/makekeys: failed to find small enough hash!
Summary: x11-libs/libX11 for abi_x86_32 - ../src/util/makekeys: failed to find small e...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
Depends on:
Reported: 2014-01-23 19:27 UTC by Austin English (RETIRED)
Modified: 2017-05-26 11:18 UTC (History)
1 user (show)

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

build.log (build.log,156.84 KB, text/plain)
2014-01-23 19:27 UTC, Austin English (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Austin English (RETIRED) gentoo-dev 2014-01-23 19:27:29 UTC
Created attachment 368582 [details]

I searched for similar bugs, I noticed bug 299654 which is similar, but this issue is slightly different:

../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
make[1]: *** [ks_tables.h] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/libX11-1.6.2/work/libX11-1.6.2-x86/src'
make: *** [all-recursive] Error 1

dev-multilib-9999999999 x11-libs # emerge -pqv =x11-libs/libX11-1.6.2::gentoo
[ebuild   R   ] x11-libs/libX11-1.6.2  USE="ipv6 -doc -static-libs {-test}" ABI_X86="32 (64) (-x32)"

dev-multilib-9999999999 x11-libs # emerge --info '=x11-libs/libX11-1.6.2::gentoo'
Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.17, 3.12.5-gentoo-base-1 x86_64)
                         System Settings
System uname: Linux-3.12.5-gentoo-base-1-x86_64-Intel-R-_Xeon-R-_CPU_E7-_8837_@_2.67GHz-with-gentoo-2.2
KiB Mem:   528387040 total,   7824864 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Thu, 23 Jan 2014 01:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r4, 3.3.3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -march=corei7 -g -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=corei7 -g -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
INSTALL_MASK="/usr/lib/systemd/system /lib/systemd"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="X aac acl acpi alsa amd64 apng avx bash-completion bzip2 cairo caps cdda cdio cli consolekit cracklib crypt cups curl cxx dbus device-mapper dri dvd egl exif ffmpeg fftw flac fuse gif git gmp gnome-keyring gpm gtk iconv ipv6 ithreads jbit jpeg jpeg2k lcms libffi libnotify lzma lzo mad mmap mmx mmxext mng modules mp3 mtp multilib ncurses networking nptl ogg openal opengl openmp openssl openvg opus pam pcre pdf png pnm policykit python readline session sndfile spell sqlite sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg theora threads tiff truetype udev unicode usb usbredir vaapi vdpau vim vim-syntax vorbis vpx x264 xattr xcb xinerama xorg xv zlib zsh-completion" ABI_X86="64 32" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy nvidia qxl v4l" 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"
USE_PYTHON="2.7 3.3"

                        Package Settings

x11-libs/libX11-1.6.2 was built with the following:
USE="ipv6 -doc -static-libs -test" ABI_X86="32 64 -x32"
CFLAGS="-O2 -march=corei7 -pipe"
CXXFLAGS="-O2 -march=corei7 -pipe"

as a workaround, I installed a multilib binary package from another desktop.
Comment 1 Matt Turner gentoo-dev 2015-02-22 02:21:43 UTC
I haven't seen this before. Can you still reproduce?
Comment 2 Austin English (RETIRED) gentoo-dev 2015-02-24 00:09:37 UTC
(In reply to Matt Turner from comment #1)
> I haven't seen this before. Can you still reproduce?

No, worksforme.
Comment 3 Jerzy Borkowski 2017-05-26 11:18:25 UTC
I have the same issue. After some tests, it appears that the culprit
is the sandbox not supporting 64bit inode numbers for 32 executables.

In my case (AMD64 in multilib, 4TB XFS filesystem mounted with inode64) 
I have inode numbers bigger than 2^32 :

ls -lai /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

13123005750 -rw-r--r-- 1 root root   2820 May 26 00:45 /usr/include/X11/DECkeysym.h
13123005751 -rw-r--r-- 1 root root   6046 May 26 00:45 /usr/include/X11/HPkeysym.h
13123005752 -rw-r--r-- 1 root root 175257 May 26 00:45 /usr/include/X11/keysymdef.h
13123005754 -rw-r--r-- 1 root root   4022 May 26 00:45 /usr/include/X11/Sunkeysym.h
13123005759 -rw-r--r-- 1 root root  13065 May 26 00:45 /usr/include/X11/XF86keysym.h

and re-running sandbox by hand (from the point last emerge fails) I get :

# cd /var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src
# SANDBOX_DEBUG=1 sandbox
#../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
 * absolute_path: /var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src/util/makekeys
 * resolved_path: /var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src/util/makekeys
 * ACCESS ALLOWED:  execve:       /var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src/util/makekeys
 * absolute_path: /var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src/util/makekeys
 * resolved_path: /var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src/util/makekeys
 * ACCESS ALLOWED:  open_rd:      /var/tmp/portage/x11-libs/libX11-1.6.5/work/libX11-1.6.5-abi_x86_32.x86/src/util/makekeys
 * EARLY FAIL: fopen(/usr/include/X11/keysymdef.h): Value too large for defined data type
couldn't open /usr/include/X11/keysymdef.h
 * EARLY FAIL: fopen(/usr/include/X11/XF86keysym.h): Value too large for defined data type
couldn't open /usr/include/X11/XF86keysym.h
 * EARLY FAIL: fopen(/usr/include/X11/Sunkeysym.h): Value too large for defined data type
couldn't open /usr/include/X11/Sunkeysym.h
 * EARLY FAIL: fopen(/usr/include/X11/DECkeysym.h): Value too large for defined data type
couldn't open /usr/include/X11/DECkeysym.h
 * EARLY FAIL: fopen(/usr/include/X11/HPkeysym.h): Value too large for defined data type
couldn't open /usr/include/X11/HPkeysym.h
/* This file is generated from keysymdef.h. */
/* Do not edit. */

makekeys: failed to find small enough hash!
Try increasing KTNUM in makekeys.c

If I create copies of the 5 *.h files in /usr/include/X11 with inode numbers in 32bit range
and move (via /bin/mv) the copies back to /usr/include/X11 than the command 

./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

works ok.

I was running emerge with multilib enabled :

[ebuild   R    ] x11-libs/libX11-1.6.5::gentoo  USE="doc ipv6 -static-libs {-test}" ABI_X86="32 (64) (-x32)" 0 KiB

so, the bug is likely in sandbox.