如何在 Linux 上使用 OpenJ9 编译 OpenJDK 而不会出现 NUMA 错误?

How to compile OpenJDK with OpenJ9 on Linux without a NUMA error?

你好 Whosebugers!
我正在尝试在 Linux 上使用 OpenJ9 构建 OpenJDK,但是当我 运行 configure 脚本时,出现错误:

configure: error: Could not find numa! 

通常它应该刚刚创建配置并让我构建,因为我没有 多个 CPU

我已经用谷歌搜索错误信息并仔细查看并遵循项目文档 Github(https://github.com/ibmruntimes/openj9-openjdk-jdk17/blob/openj9/doc/building.md and https://github.com/eclipse-openj9/openj9/blob/master/doc/build-instructions/Build_Instructions_V17.md).

这是我使用的命令:

bash configure --with-boot-jdk=/home/USER/bootjdk16

如果需要,这里是完整的输出:

configure: Configuration created at Sun Nov 21 14:08:05 CET 2021.
checking for basename... /usr/bin/basename
checking for dirname... /usr/bin/dirname
checking for file... /usr/bin/file
checking for ldd... /usr/bin/ldd
checking for bash... /usr/bin/bash
checking for cat... /usr/bin/cat
checking for chmod... /usr/bin/chmod
checking for cp... /usr/bin/cp
checking for cut... /usr/bin/cut
checking for date... /usr/bin/date
checking for gdiff... [not found]
checking for diff... /usr/bin/diff
checking for echo... echo [builtin]
checking for expr... /usr/bin/expr
checking for find... /usr/bin/find
checking for gunzip... /usr/bin/gunzip
checking for pigz... [not found]
checking for gzip... /usr/bin/gzip
checking for head... /usr/bin/head
checking for ln... /usr/bin/ln
checking for ls... /usr/bin/ls
checking for gmkdir... [not found]
checking for mkdir... /usr/bin/mkdir
checking for mktemp... /usr/bin/mktemp
checking for mv... /usr/bin/mv
checking for gawk... /usr/bin/gawk
checking for printf... printf [builtin]
checking for rm... /usr/bin/rm
checking for rmdir... /usr/bin/rmdir
checking for sh... /usr/bin/sh
checking for sort... /usr/bin/sort
checking for tail... /usr/bin/tail
checking for gtar... [not found]
checking for tar... /usr/bin/tar
checking for tee... /usr/bin/tee
checking for touch... /usr/bin/touch
checking for tr... /usr/bin/tr
checking for uname... /usr/bin/uname
checking for wc... /usr/bin/wc
checking for xargs... /usr/bin/xargs
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for a sed that does not truncate output... /usr/bin/sed
checking for df... /usr/bin/df
checking for nice... /usr/bin/nice
checking for greadlink... [not found]
checking for readlink... /usr/bin/readlink
checking for cygpath... [not found]
checking for wslpath... [not found]
checking for lsb_release... [not found]
checking for cmd.exe... [not found]
checking for cmp... /usr/bin/cmp
checking for uniq... /usr/bin/uniq
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking openjdk-build os-cpu... linux-x86_64
checking openjdk-build C library... gnu
checking openjdk-target os-cpu... linux-x86_64
checking openjdk-target C library... gnu
checking compilation type... native
checking for top-level directory... /home/USER/openj9-openjdk-jdk17
checking if custom source is suppressed (openjdk-only)... disabled, default
checking for --enable-debug... disabled, default
checking which debug level to use... release
checking which variants of the JVM to build... server
checking for m4... /usr/bin/m4
checking for cmake... /usr/bin/cmake
checking for CRIU support... no (default)
checking for cuda... no (default)
checking for ddr... yes (default for xa64)
checking if demos should be included in jdk image... no
checking checking for numa... no
configure: error: Could not find numa! 
configure exiting with result code 1

提前致谢!

看来我出于某种原因没有安装包“numactl”。

只需仔细检查您是否安装了这些软件包 (基于 Archbased)

sudo pacman -Q  numactl

(基于 Debain)

sudo dpkg -l numactl-devel

来源:Stephen C