`
歆渊
  • 浏览: 306263 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

在Solaris10x86上编译eclipse3.1

阅读更多

可能受到IBM方面立场的影响, eclipse的官方发布版本中一直不包括Solaris/x86版本, 而这一个操作系统,一个开发平台又都是非常有价值的产品. 我以前自己通过eclipse的source build创建solaris/x86版本时一直遵循eclipse生成移植版的相关说明, 但步骤繁琐, 实在劳神费心.

随着eclipse3.1版本的发布,我决定升级自己Solaris/x86工作站上的eclipse, 在编译过程中突然想到了一个新的方法,大大简化了编译步骤,虽然对于eclipse来说修改了它的很多源代码目录和文件,使改后的源代码不能再用来创建Solaris/sparc版本,但对和我一样只是把eclipse作为工具使用而不是去开发它的人来说是很合适的.

操作过程如下:

 

$ JAVA_HOME=/usr/j2se; export JAVA_HOME
$ ANT_HOME=/home/compl/sfw/apache-ant-1.6.5; export ANT_HOME
$ PATH=$ANT_HOME/bin:$PATH; export PATH
$ mkdir -p ~/farm/eclipse-src
$ cd ~/farm
$ vi regexrename
-----start create script regexrename-----
-enter the following content:
 #!/bin/sh
 echo Renaming $1 to `echo $1 | sed $2`
 mv "$1" "`echo $1 | sed $2`"
-save and quit vi
-----end create script regexrename-----
$ chmod +x regexrename
$ vi regexreplace
-----start create script regexreplace-----
-enter the following content:
#!/bin/sh
 echo Replacing file $1...
 mv "$1" "$1.replaced"
 sed "$2" "$1.replaced" > "$1"
-save and quit vi
-----end create script regexreplace-----
$ chmod +x regexreplace
$ cd eclipse-src
$ unzip ~/Softwares/java/eclipse-sourceBuild-srcIncluded-3.1.zip
$ vi ./build
-----start modify script ./build-----
-change line:
 export ANT_OPTS=-Xmx1000M
-to
 ANT_OPTS=-Xmx1000M; export ANT_OPTS
-add a blank line at end of file, to force sed to realize the last line-----
-----end modify script ./build-----

-----now replace all sparc with i386 in directory and file names,

-----don't change i386 to x86, although x86 seems better follow eclipse src naming conventions,

-----or you have to perform some extra modifications on some scripts to correct x86 to i386,

-----like the awt lib path, that is $JAVA_HOME/jre/lib/sparc on sun machines and

-----$JAVA_HOME/jre/lib/i386 on intel PCs, NOT $JAVA_HOME/jre/lib/x86-----
$ find ./ -name \*sparc\* -exec ../regexrename "{}" 's/sparc/i386/g' \;
Renaming ./plugins/org.eclipse.platform.source.solaris.gtk.sparc to ./plugins/org.eclipse.platform.source.solaris.gtk.i386
find: stat() error ./plugins/org.eclipse.platform.source.solaris.gtk.sparc/fragment.xml: No such file or directory
find: stat() error ./plugins/org.eclipse.platform.source.solaris.gtk.sparc/META-INF: No such file or directory
find: stat() error ./plugins/org.eclipse.platform.source.solaris.gtk.sparc/build.properties: No such file or directory
find: stat() error ./plugins/org.eclipse.platform.source.solaris.gtk.sparc/about.html: No such file or directory
Renaming ./plugins/org.eclipse.rcp.source.solaris.gtk.sparc to ./plugins/org.eclipse.rcp.source.solaris.gtk.i386
find: stat() error ./plugins/org.eclipse.rcp.source.solaris.gtk.sparc/build.xml: No such file or directory
      .......
      .......
      .......
Renaming ./assemble.org.eclipse.sdk.solaris.gtk.sparc.xml.replaced to ./assemble.org.eclipse.sdk.solaris.gtk.i386.xml.replaced
-----Regarding the errors above, re-run the command to make sure-----

$ find ./ -name \*sparc\* -exec ../regexrename "{}" 's/sparc/i386/g' \;
$

-----now replace all sparc inside all revelant text files with i386-----
$ find ./ -type f \( -name \*.xml -o -name \*.properties -o -name \*.sh -o -name build \) -exec fgrep -s sparc "{}" \; -exec ../regexreplace "{}" 's/sparc/i386/g' \;
Replacing file ./build...
Replacing file ./plugins/org.eclipse.ui.cheatsheets/build.xml...
      .......
      .......
      .......
Replacing file ./assemble.org.eclipse.sdk.all.xml...
$

-----Perform a normal build-----
$ sh ./build -os solaris -ws gtk -arch i386 -compilelibs
      .......
      .......
      .......
BUILD SUCCESSFUL
Total time: 17 minutes 45 seconds
-----eclipse/eclipse seems remain the one for SPARC arch, update it manually-----

$ cp launchertmp/eclipse eclipse/
-----test run the compiled binary-----

$ eclipse/eclipse
-----eclipse 3.1 should start-----

 

-----Finally, be careful if you want to keep or distribute result/solaris-gtk-i386-sdk.zip,

-----eclipse/eclipse inside it remains the one for SPARC arch, you may want to

-----update it first.-----

 

分享到:
评论

相关推荐

    Solaris 10 X86图文详细教程_进单用户

    综上所述,这篇图文详细教程针对的是Solaris 10 X86操作系统,旨在指导用户如何进入单用户模式。这是系统管理员在面对紧急故障时,进行系统诊断和修复的重要技能。掌握此技能,对于保证系统安全稳定运行具有重要意义...

    在Solaris 10 X86上安装Oracle 10g RAC详解.doc

    Oracle 10g RAC 在 Solaris 10 X86 上的安装详解 本文详细介绍了如何在基于 Solaris 10 X86 的节点上来安装 Oracle 10g RAC 的具体步骤和注意事项,同时也提供了具体的命令操作以及安装过程的截屏。 首先,在安装 ...

    Solaris_10_x86操作系统具体安装步骤.docx

    - **硬件兼容性**:虽然 Solaris 10 x86 版本支持大多数现代硬件,但在安装前最好查阅官方文档确认兼容性。 - **网络配置**:正确的网络配置对于确保系统能够正常上网及与其他设备通信至关重要。 通过上述步骤,...

    Oracle10g on Solaris10 X86 Install Guide

    《Oracle10g在Solaris 10 x86平台上的安装指南》 Oracle数据库是全球广泛使用的数据库管理系统,尤其在企业级应用中占据主导地位。Oracle 10g是Oracle公司推出的一个重要版本,提供了许多增强的功能和性能优化。在...

    Solaris 10 X86上安装Oracle 10g RAC

    在 Solaris 10 X86 平台上安装 Oracle 10g RAC 是一项复杂的任务,涉及到多个步骤和配置。以下是对整个过程的详细解释: 首先,安装环境需包括两台基于 AMD64 架构的 Sun V20Z 服务器、一台 Sun Storage 3510 以及...

    [原创]在Solaris 10 x86_64平台上安装Oracle 11gR2

    ### 在Solaris 10 x86_64平台上安装Oracle 11gR2的知识点解析 #### 一、前言 本文将详细介绍在Solaris 10 x86_64平台上安装Oracle 11g Release 2 (11.2)的过程。这一过程不仅包括了必要的硬件配置检查,还涵盖了...

    从 Solaris 迁移到 x86 上的 Linux 指南

    如示例中的 `get_stack` 函数,在 Solaris 下使用了 SPARC 汇编语言,而在 Linux x86 平台上则使用了 x86 汇编。为了在 Linux 上运行,需要将代码转换为符合 Linux x86 平台的汇编语法。同时,C/C++ 代码中的系统...

    Oracle10g installation guide(solaris10 x86)

    ### Oracle10g在Solaris 10 x86上的安装指南 #### 一、安装前的准备 在开始安装Oracle 10g数据库软件到SUN Solaris 10 x86系统之前,有几个关键步骤需要进行: 1. **硬件需求**:首先,确保服务器的主内存至少为...

    快速安装Solaris 10 x86操作系统.doc

    在安装Solaris 10 x86操作系统的过程中,有几个关键步骤和注意事项需要了解。首先,启动安装流程需要将安装光盘或DVD放入光驱,并设置计算机从CD/DVD-ROM启动。加载阶段2后,系统会展示GNU GRUB引导加载器,这是...

    VMware+Solaris10x86+VxVM+VCS安装测试NFS总结

    在安装Solaris10x86+VxVM+VCS之前,需要配置好硬件环境。笔记本的CPU需要支持64位,内存至少需要3G,留出20G的空间安装Solaris x86虚拟机。 二、 软件版本 需要下载以下软件版本: * VMWare Workstation 6.5 for ...

    Solaris 10 x86 安装详细图解

    本指南主要针对如何在32位(x86)或64位(x64)的平台上安装Solaris 10 OS 1/06版本。安装过程参照了SUN官方网站的快速安装指南,并结合了额外的信息和图像,旨在提供一个详尽的安装步骤。 在开始安装前,你需要...

    Oracle 11g 在Solaris 10 X86-64上的安装过程

    在安装Oracle 11g R2 X86-64数据库管理系统于Solaris 10 X86-64操作系统上时,需遵循一系列详细步骤和系统要求。以下是整个安装过程的关键知识点: 1. **虚拟机配置**:首先,创建一个VMware虚拟机,平台应为x86-64...

    Windows和Solaris上Boost安装和编译

    这样,编译器在编译时就能找到Boost头文件。 3. **选择编译器**: Boost支持多种编译器,例如Microsoft Visual Studio或MinGW。根据你的开发环境选择相应的编译器。 4. **使用Bootstrap脚本**: 进入解压后的Boost根...

    VMware Workstation下安装Solaris 10操作系统史上最详细.doc

    "VMware Workstation下安装Solaris 10操作系统" 以下是从给定的文件中生成的相关知识点: ...15. 使用 VMware Workstation 可以在 Windows 平台上安装 Solaris 10 操作系统,提供了一个方便的虚拟机环境。

Global site tag (gtag.js) - Google Analytics