Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I meet problem when I build it on aarch64 #304

Open
MCredbear opened this issue May 19, 2019 · 9 comments
Open

I meet problem when I build it on aarch64 #304

MCredbear opened this issue May 19, 2019 · 9 comments

Comments

@MCredbear
Copy link

MCredbear commented May 19, 2019

(sorry,because I speak a poor English,so I have to speak Chinese)
如果我使用git命令下载源码,编译时会提示不支持aarch64架构,而下载源码包(zip)的话,不会提示这个问题,但编译时会因没有hotspot目录而失败

Google translate:
If I use the git command to download the source code, the compiler will prompt that the aarch64 architecture is not supported. If the source package (zip) is downloaded, the problem will not be prompted, but the compilation will fail because there is no hotspot directory.

@DanHeidinga
Copy link
Contributor

@MCredbear Can you provide some details on what the issue is?

fyi @0xdaryl @knn-k

@0xdaryl
Copy link

0xdaryl commented May 20, 2019

The work to support and build AArch64 in OpenJ9 has (so far) been with OpenJDK 11 and beyond (not OpenJDK 8). Build instructions for OpenJDK 11 are here.

@knn-k
Copy link
Contributor

knn-k commented May 20, 2019

@MCredbear Are you compiling the source code on an aarch64 Linux machine or not? Please show the commands you typed and the error messages.

@MCredbear
Copy link
Author

here is my log,is there any help?

p@localhost:~/Desktop/openj9-openjdk-jdk8-openj9$ ./configure --with-freemarker-jar=/root/freemarker.jar
fatal: 不是一个 git 仓库(或者任何父目录):.git
fatal: 不是一个 git 仓库(或者任何父目录):.git
fatal: 不是一个 git 仓库(或者任何父目录):.git
fatal: 不是一个 git 仓库(或者任何父目录):.git
Running custom generated-configure.sh
configure: Configuration created at Wed May 22 00:15:07 CST 2019.
configure: configure script generated at timestamp 1557935888.
checking for basename... /usr/bin/basename
checking for bash... /bin/bash
checking for cat... /bin/cat
checking for chmod... /bin/chmod
checking for cmp... /usr/bin/cmp
checking for comm... /usr/bin/comm
checking for cp... /bin/cp
checking for cut... /usr/bin/cut
checking for date... /bin/date
checking for gdiff... no
checking for diff... /usr/bin/diff
checking for dirname... /usr/bin/dirname
checking for echo... /bin/echo
checking for expr... /usr/bin/expr
checking for file... /usr/bin/file
checking for find... /usr/bin/find
checking for head... /usr/bin/head
checking for ln... /bin/ln
checking for ls... /bin/ls
checking for mkdir... /bin/mkdir
checking for mktemp... /bin/mktemp
checking for mv... /bin/mv
checking for nawk... /usr/bin/nawk
checking for printf... /usr/bin/printf
checking for rm... /bin/rm
checking for sh... /bin/sh
checking for sort... /usr/bin/sort
checking for tail... /usr/bin/tail
checking for tar... /bin/tar
checking for tee... /usr/bin/tee
checking for touch... /usr/bin/touch
checking for tr... /usr/bin/tr
checking for uname... /bin/uname
checking for uniq... /usr/bin/uniq
checking for wc... /usr/bin/wc
checking for which... /usr/bin/which
checking for xargs... /usr/bin/xargs
checking for gawk... no
checking for mawk... mawk
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for a sed that does not truncate output... /bin/sed
checking for cygpath... no
checking for greadlink... no
checking for readlink... /bin/readlink
checking for df... /bin/df
checking for SetFile... no
checking for cpio... /bin/cpio
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking openjdk-build os-cpu... linux-aarch64
checking openjdk-target os-cpu... linux-aarch64
checking compilation type... native
checking for top-level directory... /home/p/Desktop/openj9-openjdk-jdk8-openj9
checking for presence of closed sources... no
checking if closed source is suppressed (openjdk-only)... no
checking which variant of the JDK to build... normal
checking which interpreter of the JVM to build... template
checking which variants of the JVM to build... server
checking which debug level to use... release
configure: error: unsupported OpenJ9 cpu aarch64
configure exiting with result code 1

@JasonFengJ9
Copy link
Member

./configure --with-freemarker-jar=/root/freemarker.jar

Did you try bash configure --with-freemarker-jar=/root/freemarker.jar? In addition, was there any error during bash get_source.sh?
fatal: 不是一个 git 仓库(或者任何父目录):.git suggests some git initialization problem.

As per #304 (comment), the work to support and build AArch64 in OpenJ9 has (so far) been with OpenJDK 11 and beyond (not OpenJDK 8).

@knn-k
Copy link
Contributor

knn-k commented May 21, 2019

@MCredbear To build OpenJ9 OpenJDK 8 for aarch64, you will need to port aarch64-related code in custom-hook.m4 (and maybe some other files) from openj9-openjdk-jdk11 to openj9-openjdk-jdk8.

See PRs ibmruntimes/openj9-openjdk-jdk11#94, ibmruntimes/openj9-openjdk-jdk11#126, and ibmruntimes/openj9-openjdk-jdk11#149 for the aarch64 changes in openj9-openjdk-jdk11.

@DanHeidinga
Copy link
Contributor

@JasonFengJ9 Can you port those Extensions repos PRs to the JDK11 repo? That repo isn't part of OpenJ9 as we prefer OpenJDK changes be made upstream when possible and has a limited set of committers

@MCredbear
Copy link
Author

here is a new problem,see at my log
log.txt

@JasonFengJ9
Copy link
Member

common/libargs.c:338:3: error: #error "Must define an architecture"
  #error "Must define an architecture"
   ^~~~~

This was caused by https://github.com/eclipse/openj9/blob/22cfe037dd717379cc338c0c0e70d58ddbb232c3/runtime/exelib/common/libargs.c#L311-L341

aarch64 is not defined accordingly.

Note: due to other workload, porting to JDK 8 work was paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants