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

Bug 650332

Summary: app-editors/emacs-25.3-r3 with media-libs/fontconfig-2.13.0: Getting the error message 'char-displayable-p: Invalid hash table rehash size: 1.0'
Product: Gentoo Linux Reporter: Mats Lidell <matsl>
Component: Current packagesAssignee: GNU Emacs project <gnu-emacs>
Status: RESOLVED FIXED    
Severity: major CC: creideiki+gentoo-bugzilla, fonts, ivanhoe
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://debbugs.gnu.org/30788
https://bugs.freedesktop.org/show_bug.cgi?id=105492
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for media-libs/fontconfig-2.13.0
Patch for media-libs/fontconfig-2.13.0

Description Mats Lidell gentoo-dev 2018-03-12 22:35:09 UTC
Steps to reproduce: 
 - Start 'emacs -Q'
 - M-x list-packages

Filed as upstream bug: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30788 Slight difference for the tip version of Emacs where this error occur after only starting with emacs -Q. For 25.3.1 some activity related to hash tables need to be done hence the list-packages.

$ emerge --info
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-7.3.0, glibc-2.26-r6, 4.15.9-gentoo x86_64)
=================================================================
System uname: Linux-4.15.9-gentoo-x86_64-Intel-R-_Core-TM-_i7-4500U_CPU_@_1.80GHz-with-gentoo-2.4.1
KiB Mem:    16340924 total,   8807624 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Mon, 12 Mar 2018 17:45:01 +0000
Head commit of repository gentoo: 238eaeb1245f965ce01b4a9a7519bc135b7a410a
sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p1) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.10.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1::gentoo
sys-devel/binutils:       2.30::gentoo
sys-devel/gcc:            7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r2::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://91.121.189.201/gentoo-distfiles/"
LANG="sv_SE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="sv en sv_SE"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv icu introspection ipv6 jpeg lcms ldap libnotify libsecret mad mmx mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt5 readline sdl seccomp spell sse sse2 ssl startup-notification svg systemd tcpd tiff tk tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" 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="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias suexec cgi mod_unixd authz_core authn_core unixd socache_shmcb" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" L10N="sv" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel i965" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andrzej Rybczak 2018-03-13 01:06:57 UTC
Same here. The culprit seems to be fontconfig-2.13.0 as downgrading to fontconfig-2.12.6 solves the problem.
Comment 2 Ulrich Müller gentoo-dev 2018-03-13 11:35:41 UTC
@matsl: Can you confirm that this is related to the fontconfig version?
Comment 3 Mats Lidell gentoo-dev 2018-03-13 17:00:59 UTC
@ulm: Yes. Downgrading to fontconfig-2.12.6 clears the issue.
Comment 4 Ivan Iraci 2018-03-13 17:48:27 UTC
I temporarily solved the issue by aliasing emacs to 'LC_ALL=C emacs'.
Comment 5 Ulrich Müller gentoo-dev 2018-03-13 18:17:50 UTC
(In reply to Mats Lidell from comment #3)
> @ulm: Yes. Downgrading to fontconfig-2.12.6 clears the issue.

Hm, media-libs/fontconfig should be linked against only with USE="xft", but I don't see that flag in your emerge --info output.
Comment 6 Ivan Iraci 2018-03-13 18:35:16 UTC
(In reply to Ulrich Müller from comment #5)

> I don't see that flag in your emerge --info output.

It's not even in my 'emerge --info', but it's in my package.use.
Maybe the same applies for him.

Anyway, the problem exists and has to do with the locale.
Comment 7 Ulrich Müller gentoo-dev 2018-03-13 19:08:49 UTC
(In reply to Ivan Iraci from comment #6)
> Anyway, the problem exists and has to do with the locale.

I can reproduce it with LC_NUMERIC=de_DE.UTF-8 but not with LC_NUMERIC=en_US.UTF-8.
Comment 8 Ulrich Müller gentoo-dev 2018-03-13 19:39:12 UTC
Created attachment 523822 [details, diff]
Patch for media-libs/fontconfig-2.13.0

Removing the locale initialisation code (which was not present in fontconfig-2.12.6) from function FcConfigEnsure seems to fix it here.
Comment 9 Ulrich Müller gentoo-dev 2018-03-13 21:21:00 UTC
Reported upstream:
https://bugs.freedesktop.org/show_bug.cgi?id=105492
Comment 10 Ulrich Müller gentoo-dev 2018-03-13 21:44:55 UTC
@Fonts team: This is major breakage. So unless you raise objections, I am going to package.mask =media-libs/fontconfig-2.13.0 tomorrow.
Comment 11 Ulrich Müller gentoo-dev 2018-03-14 07:53:06 UTC
Created attachment 523862 [details, diff]
Patch for media-libs/fontconfig-2.13.0

Patch from upstream.
Please test if this fixes the problem.
Comment 12 Ivan Iraci 2018-03-14 09:28:48 UTC
(In reply to Ulrich Müller from comment #11)

> Created attachment 523862 [details, diff] [details, diff]
> Patch for media-libs/fontconfig-2.13.0
> 
> Patch from upstream.
> Please test if this fixes the problem.

Ok, it works for me.

Thanks.
Comment 13 Larry the Git Cow gentoo-dev 2018-03-14 12:33:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34fb871502ff7941c54b6058727caf3ef563dc39

commit 34fb871502ff7941c54b6058727caf3ef563dc39
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2018-03-14 12:31:50 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2018-03-14 12:31:50 +0000

    media-libs/fontconfig: Fix handling of locale and of font weights.
    
    Non-maintainer commit. Patches from upstream.
    
    Closes: https://bugs.gentoo.org/650332
    Closes: https://bugs.gentoo.org/650370
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/fontconfig-2.13.0-locale.patch           |  37 +++++
 .../fontconfig/files/fontconfig-2.13.0-names.patch |  93 ++++++++++++
 media-libs/fontconfig/fontconfig-2.13.0-r1.ebuild  | 164 +++++++++++++++++++++
 3 files changed, 294 insertions(+)
Comment 14 Ulrich Müller gentoo-dev 2018-03-14 13:30:35 UTC
@Andrzej, @Ivan: Thank you for your feedback on fontconfig and locale. This was really helpful for resolving this bug.
Comment 15 Ivan Iraci 2018-03-14 15:14:22 UTC
(In reply to Ulrich Müller from comment #14)

> @Andrzej, @Ivan: Thank you for your feedback on fontconfig and locale. This
> was really helpful for resolving this bug.

Thank you for your commitment!
Comment 16 Ulrich Müller gentoo-dev 2018-03-14 21:22:17 UTC
Reopening. The following will still trigger the bug:

   $ unset LANG LC_ALL
   $ LC_NUMERIC=de_DE.UTF-8 emacs -Q
Comment 17 Larry the Git Cow gentoo-dev 2018-03-15 05:22:00 UTC
The bug has been closed via the following commit(s):

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

commit af2a402ec7449348b50332919a66e54b552d6da0
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2018-03-15 05:19:23 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2018-03-15 05:20:00 +0000

    media-libs/fontconfig: Do not call setlocale in the library.
    
    Patch from upstream.
    https://bugs.freedesktop.org/show_bug.cgi?id=105492
    
    Closes: https://bugs.gentoo.org/650332
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/fontconfig-2.13.0-locale.patch           | 200 +++++++++++++++++----
 ....13.0-r1.ebuild => fontconfig-2.13.0-r2.ebuild} |   0
 2 files changed, 170 insertions(+), 30 deletions(-)