LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1260|回复: 10

有关SUN jdk编译,欢迎大家讨论

[复制链接]
发表于 2008-11-17 03:41:04 | 显示全部楼层 |阅读模式
资料1: http://download.java.net/jdk6/6u ... /README-builds.html
以上是 sun官方的编译指南。

我之前的一个讨论帖子:
资料2: http://www.linuxsir.cn/bbs/thread337713.html
 楼主| 发表于 2008-11-17 03:47:54 | 显示全部楼层
资料1中提到:
All JDK builds require access to the previously released JDK 5.0, this is often called a bootstrap JDK. The JDK 5.0 binaries can be downloaded from Sun's JDK 5.0 download site. For build performance reasons is very important that this JDK be made available on the local disk of the machine doing the build. You should always set ALT_BOOTDIR to point to the location of the bootstrap JDK installation, this is the directory pathname that contains a bin, lib, and include It's also a good idea to also place its bin directory in the PATH environment variable, although it's not required.

即对jdk6的编译需要用到 jdk5, 我从http://java.sun.com/j2se/1.5.0/download.html
下载了java_ee_sdk-5_01-linux.bin,
但是安装不了。。。
出错信息如下所示:
[root@~]#./java_ee_sdk-5_01-linux.bin
./java_ee_sdk-5_01-linux.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

我知道是共享库的问题。
我机上的是libstdc++.so.6,版本太高的。。。
如下可知,我机上的版本是libstdc++.so.6
ls /usr/lib/libstdc++.*
/usr/lib/libstdc++.a   /usr/lib/libstdc++.so    /usr/lib/libstdc++.so.6.0.8
/usr/lib/libstdc++.la  /usr/lib/libstdc++.so.6

这样的话,java_ee_sdk-5_01-linux.bin用啥办法能装到我机子上呢?
回复 支持 反对

使用道具 举报

发表于 2008-11-17 09:01:20 | 显示全部楼层
做个连接,让 so.6 与so.5 相同,试一下看看。
回复 支持 反对

使用道具 举报

发表于 2008-11-17 19:21:19 | 显示全部楼层
编译gcc3
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-18 01:54:34 | 显示全部楼层
Post by qufo;1909616
做个连接,让 so.6 与so.5 相同,试一下看看。


ln -s libstdc++.so.6.0.8 libstdc++.so.5
[root@/usr/lib]#ls libstdc++.* -l
-rw-r--r-- 1 root root 7737944 2008-11-07 09:41 libstdc++.a
-rwxr-xr-x 1 root root     944 2008-11-07 09:41 libstdc++.la
lrwxrwxrwx 1 root root      18 2008-11-07 09:41 libstdc++.so -> libstdc++.so.6.0.8
lrwxrwxrwx 1 root root      18 2008-11-18 01:37 libstdc++.so.5 -> libstdc++.so.6.0.8
lrwxrwxrwx 1 root root      18 2008-11-07 09:41 libstdc++.so.6 -> libstdc++.so.6.0.8
-rwxr-xr-x 1 root root 4406218 2008-11-07 09:41 libstdc++.so.6.0.8



./java_ee_sdk-5_01-linux.bin
Checking available disk space...
Checking Java(TM) 2 Runtime Environment...
Extracting Java(TM) 2 Runtime Environment files...
Extracting installation files...
Launching Java(TM) 2 Runtime Environment...
Attach to native process failed
Deleting temporary files...

安装失败,这样做不行
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-18 01:55:59 | 显示全部楼层
Post by newper;1909916
编译gcc3

gcc --version
gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
关键我机子上现在整套工具链都是 用4.1.2 gcc编译的啊,
你的意思是,我把整个工具链改为 用gcc3.0编译?
回复 支持 反对

使用道具 举报

发表于 2008-11-18 16:18:56 | 显示全部楼层
no 编译gcc3再把libstdc++.so.5复制过去
回复 支持 反对

使用道具 举报

发表于 2008-11-18 19:46:12 | 显示全部楼层
这方面 BLFS 手册里有说明的,可是楼主已脱离了 BLFS
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-19 01:46:46 | 显示全部楼层
Post by newper;1910294
no 编译gcc3再把libstdc++.so.5复制过去

你的意思是,系统同时存在两套库吗?
一套3.0的,一套4.1的?
回复 支持 反对

使用道具 举报

发表于 2008-11-19 07:47:03 | 显示全部楼层
gcc 可以多版共存,俺系统里就有 gcc-4.2.4,gcc-4.3.2,gcc-4.4-20081114 等,呵呵
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表