When libX11's configure script calls `pkg-config --variable=includedir xproto` in a sysrooted environment pkg-config returns "'/usr/armv4tl-softfloat-linux-gnueabi/usr'/include" which is unusable for the configure script as it then double quotes the result, putting the pkg-config single quotes as part of the path. The relevant part from configure.ac is: # # Find keysymdef.h # AC_MSG_CHECKING([keysymdef.h]) dir=`pkg-config --variable=includedir xproto` KEYSYMDEF="$dir/X11/keysymdef.h" if test -f "$KEYSYMDEF"; then AC_MSG_RESULT([$KEYSYMDEF]) else AC_MSG_ERROR([Cannot find keysymdef.h]) fi AC_SUBST(KEYSYMDEF) When I do the commands by hand: # export PKG_CONFIG_PATH="/usr/armv4tl-softfloat-linux-gnueabi/usr/lib/pkgconfig/" # pkg-config --variable=includedir xproto '/usr/armv4tl-softfloat-linux-gnueabi/usr'/include # export dir=`pkg-config --variable=includedir xproto` # export KEYSYMDEF="$dir/X11/keysymdef.h" # echo "$KEYSYMDEF" '/usr/armv4tl-softfloat-linux-gnueabi/usr'/include/X11/keysymdef.h # test -f "$KEYSYMDEF" && echo ok || echo missing missing #test -f '/usr/armv4tl-softfloat-linux-gnueabi/usr'/include/X11/keysymdef.h && echo ok || echo missing ok Reproducible: Always Steps to Reproduce: # armv4tl-softfloat-linux-gnueabi-emerge --info Portage 2.1.7.16 (!/usr/local/portage/openmoko-target/profiles/openmoko, gcc-4.4.2, glibc-2.11-r1, 2.6.30-2-amd64 x86_64) ================================================================= System uname: Linux-2.6.30-2-amd64-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7700_@_1.80GHz-with-gentoo-2.0.1 Timestamp of tree: Mon, 04 Jan 2010 15:00:01 +0000 app-shells/bash: 4.0_p35 dev-lang/python: 2.6.4, 3.1.1-r1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.65 sys-devel/automake: 1.10.3, 1.11.1 sys-devel/binutils: 2.20 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="arm ~arm" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -pipe -march=armv4t -mtune=arm920t -fomit-frame-pointer -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/ -I/usr/armv4tl-softfloat-linux-gnueabi/include/" CHOST="armv4tl-softfloat-linux-gnueabi" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CTARGET="armv4tl-softfloat-linux-gnueabi" CXXFLAGS="-Os -pipe -march=armv4t -mtune=arm920t -fomit-frame-pointer -I/usr/armv4tl-softfloat-linux-gnueabi/usr/include/ -I/usr/armv4tl-softfloat-linux-gnueabi/include/" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests buildpkg distlocks fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS=" http://gentoo.osuosl.org/ http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo " LANG="en_US.UTF-8" LDFLAGS="-L/usr/armv4tl-softfloat-linux-gnueabi/lib -L/usr/armv4tl-softfloat-linux-gnueabi/usr/lib -Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j1" PKGDIR="/var/tmp/portage/packages/openmoko-target" PORTAGE_CONFIGROOT="/usr/armv4tl-softfloat-linux-gnueabi/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp/portage/build/openmoko-target" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/openmoko-target /usr/armv4tl-softfloat-linux-gnueabi/usr/local/portage/hacks" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="arm bash-completion bindist cracklib hal iconv make-symlinks midi minimal multicall ncurses nls nptl pic python readline sqlite ssl unicode zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse tslib" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fbdev glamo dummy" Unset: CPPFLAGS, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to comment #0) > dir=`pkg-config --variable=includedir xproto` I think this should be: dir=`$PKG_CONFIG --variable=includedir xproto` I don't have a system to test.
Fails with the same error: checking keysymdef.h... configure: error: Cannot find keysymdef.h
The only way I'am able to circumvent this is with: -KEYSYMDEF="$dir/X11/keysymdef.h" +eval KEYSYMDEF="$dir/X11/keysymdef.h" But I'm not sure how portable this eval thing will be among all the platforms that libX11 is supposed to compile on.
(In reply to comment #1) > (In reply to comment #0) > > dir=`pkg-config --variable=includedir xproto` > > I think this should be: > > dir=`$PKG_CONFIG --variable=includedir xproto` > > I don't have a system to test. That's been fixed in all upstream Xorg modules, which should help for cross-compiling. Thanks
In the mean time, I was able to manually remove the single quotes around $prefix in the SYSROOT's xproto.pc and the ./configure succeeded.
Upstream actually made the situation worse at least in the 1.4.3
So how does one get around this?
Is this still a problem with current stable?
Created attachment 466086 [details] stable build fail log
Created attachment 466088 [details] testing build fail log
(In reply to Matt Turner from comment #8) > Is this still a problem with current stable? Yes, both stable and testing.
I couldn't reproduce with latest 1.6.7, but it seems the host has to have all kind of headers installed. So basically, emerge libX11 + deps first on the host, and then for the cross-compile chroot.
Please try with: https://gitlab.freedesktop.org/xorg/lib/libx11/commit/a121b7b0c210efe10bf93453b29050282324c906
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(+)