[aarch64-port-dev ] Could not find all X11 headers when cross compile jdk8u-aarch64

Leslie Zhai zhaixiang at loongson.cn
Tue Aug 4 11:56:08 UTC 2020


Hi,

When cross compile jdk8u-aarch64:

sh configure \
   --with-sys-root=/chroots/aarch64_rootfs \
   --openjdk-target=aarch64-linux-gnu \
   --with-debug-level=fastdebug

It thrown such error:

checking for X... libraries /chroots/aarch64_rootfs/usr/lib64, headers 
/chroots/aarch64_rootfs/usr/include
checking whether -R must be followed by a space... neither works
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for X11/extensions/shape.h... no
configure: error: Could not find all X11 headers (shape.h Xrender.h 
XTest.h Intrinsic.h). You might be able to fix this by running 'sudo 
apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev 
libxt-dev'.

--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--

But there are X11 headers, for example: 
/chroots/aarch64_rootfs/usr/include/X11/extensions/shape.h

Workaround:

diff -r 3d495dd0314f common/autoconf/libraries.m4
--- a/common/autoconf/libraries.m4      Thu Aug 23 01:55:22 2018 +0100
+++ b/common/autoconf/libraries.m4      Tue Aug 04 19:53:30 2020 +0800
@@ -155,7 +155,7 @@
    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be 
compiled" warnings on Solaris 10
    AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h 
X11/extensions/XTest.h X11/Intrinsic.h],
        [X11_A_OK=yes],
-      [X11_A_OK=no; break],
+      [X11_A_OK=yes],
        [
          # include <X11/Xlib.h>
          # include <X11/Xutil.h>


Thanks,

Leslie Zhai




More information about the aarch64-port-dev mailing list