Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
在Loongson2F小本上安装JDK
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
emtone
n00b
n00b


Joined: 11 Apr 2017
Posts: 46

PostPosted: Sat Aug 06, 2022 1:57 am    Post subject: 在Loongson2F小本上安装JDK Reply with quote

之前一直遇到Bootstrap的问题 直到看到了这个 决定试一下
https://gitlab.com/stikonas/gentoo-bootstrap/
Quote:
We first compile fastjar and jikes java compiler both of which are written in C++.
This is enough to compile an old version of GNU Classpath 0.93. Then we compile an old
version of JamVM 1.5.1. This serves as our initial Java Runtime Environment.
We use this to compile ant 1.8.1 which then allows us to build ecj-3.2. This allows us
to compile GNU Classpath 0.99 which comes with more java tools (e.g. javah). Then we
compile JamVM 2.0.0. This serves as our second Java environment.
Finally, we compile git snapshot of GNU Classpath which has a much better support for Java 1.6.
Then we compile a slightly patched ecj-4.2. Together with JamVM 2.0.0 this will serve as
Java environment that can bootstrap Icedtea 2 (Java 7). Then we use it to build Icedtea 3
and subsequent OpenJDK versions.
Back to top
View user's profile Send private message
emtone
n00b
n00b


Joined: 11 Apr 2017
Posts: 46

PostPosted: Sun Aug 07, 2022 3:52 am    Post subject: Reply with quote

编译ecj-3.2的时候需要修改下/var/tmp/portage/dev-java/eclipse-ecj-3.2/temp/environment不然会报outofmemory
修改其中的declare -x ANT_OPTS=""为declare -x ANT_OPTS="-Xms4K -Xmx512M -Xss2M"
然后执行ebuild eclipse-ecj-3.2.ebuild install继续编译安装即可
Back to top
View user's profile Send private message
emtone
n00b
n00b


Joined: 11 Apr 2017
Posts: 46

PostPosted: Tue Aug 09, 2022 3:17 pm    Post subject: Reply with quote

在编译jamvm2.0后生成的/usr/bin/jamvm-2.0不能用 运行/usr/lib32/jamvm-jdk/bin/javac会报Segmentation Fault
将之前编译生成的/usr/bin/jamvm复制一份成/usr/bin/jamvm-2.0即可
mv /usr/bin/jamvm /usr/bin/jamvm-2.0
Back to top
View user's profile Send private message
jiangtao
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2004
Posts: 80

PostPosted: Mon Sep 12, 2022 4:06 pm    Post subject: Reply with quote

居然有人能 bootstrap 出来。 8O
我一直是靠珍藏的 1.6 和 debian 的 archiver 版本做 bootstrap (o32 和 n64,没有 n32 库存)。
用 gcc6 里面的 gcj 做 bootatrap 我从来没成功过。
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum