愤怒中的小草

博客园 首页 新随笔 联系 订阅 管理

1.安装VMware  VMware-workstation-full-10.0.7-2844087.exe
    破解码:HY06L-F334P-9Z6H9-6R2XM-23C6J
  安装完成之后,Downloading VMware Tools for Linux - version 9.2.0
2.下载源码openJDK源码
    http://download.java.net/openjdk/jdk7/promoted/b147/openjdk-7-fcs-src-b147-27_jun_2011.zip
3.Fedora   用户名:mutong 密码:123456
Installing VMware Tools,please wait.....
mount:special device /dev/hda does not exist
4.共享文件夹在虚拟机上面的路径/mnt/hgfs/linux镜像
   把openjdk-7-fcs-src-b147-27_jun_2011.zip拷贝到桌面
   从home/文件夹  copy 到 usr/local/java
 OpenJDK编译之路
1.到OpenJDK目录下面运行 make sanity 进行检测
  检测结果如下:

  WARNING: LANG has been set to en_US.UTF-8, this can cause build failures. 
         Try setting LANG to 'C'. 
 
ERROR: The version of ant being used is older than 
       the required version of '1.7.1'. 
       The version of ant found was ''. 
 
ERROR: You seem to not have installed ALSA 0.9.1 or higher. 
       Please install ALSA (drivers and lib). You can download the 
       source distribution from http://www.alsa-project.org or go to 
       http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. 
 
ERROR: FreeType version  2.3.0  or higher is required. 
 make[2]: Entering directory `/usr/local/java/openjdk/jdk/make/tools/freetypecheck'
/bin/mkdir -p /usr/local/java/openjdk/build/linux-i586/btbins
rm -f /usr/local/java/openjdk/build/linux-i586/btbins/freetype_versioncheck
make[2]: Leaving directory `/usr/local/java/openjdk/jdk/make/tools/freetypecheck'
Failed to build freetypecheck.  

ERROR: You do not have access to valid Cups header files. 
       Please check your access to 
           /usr/include/cups/cups.h 
       and/or check your value of ALT_CUPS_HEADERS_PATH, 
       CUPS is frequently pre-installed on many systems, 
       or may be downloaded from http://www.cups.org 
 
Exiting because of the above error(s). 
 
make: *** [post-sanity] Error

 开始解决错误:
卸载OpenJDK
  1. 执行命令rpm -qa|grep jdk
  java-1.6.0-openjdk-plugin-1.6.0.0-44.1.9.1.fc14.i686
  java-1.6.0-openjdk-1.6.0.0-44.1.9.1.fc14.i686
  2. 执行卸载命令
  yum -y remove java java-1.6.0-openjdk-1.6.0.0-44.1.9.1.fc14.i686

Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Remove Process
Removing java-1.6.0-openjdk.i686 1:1.6.0.0-44.1.9.1.fc14 - e from the transaction
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk.i686 1:1.6.0.0-44.1.9.1.fc14 set to be erased
--> Processing Dependency: java-1.6.0-openjdk = 1:1.6.0.0-44.1.9.1.fc14 for package: 1:java-1.6.0-openjdk-plugin-1.6.0.0-44.1.9.1.fc14.i686
--> Running transaction check
---> Package java-1.6.0-openjdk-plugin.i686 1:1.6.0.0-44.1.9.1.fc14 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch Version
                             Repository                                    Size
================================================================================
Removing:
 java-1.6.0-openjdk  i686 1:1.6.0.0-44.1.9.1.fc14
                             @anaconda-InstallationRepo-201010211814.i386  83 M
Removing for dependencies:
 java-1.6.0-openjdk-plugin
                     i686 1:1.6.0.0-44.1.9.1.fc14
                             @anaconda-InstallationRepo-201010211814.i386 191 k

Transaction Summary
================================================================================
Remove        2 Package(s)

Installed size: 83 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : 1:java-1.6.0-openjdk-plugin-1.6.0.0-44.1.9.1.fc14.i686   1/2 
  Erasing        : 1:java-1.6.0-openjdk-1.6.0.0-44.1.9.1.fc14.i686          2/2 

Removed:
  java-1.6.0-openjdk.i686 1:1.6.0.0-44.1.9.1.fc14                               

Dependency Removed:
  java-1.6.0-openjdk-plugin.i686 1:1.6.0.0-44.1.9.1.fc14                        

Complete!

linux 安装jdk 1.7 32位
1.下载:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
wget http://uni-smr.ac.ru/archive/dev/java/bulk/jdk-7u21-linux-i586.rpm
2.安装:
rpm -ivh jdk-7u21-linux-i586.rpm
Preparing...                ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
 rt.jar...
 jsse.jar...
 charsets.jar...
 tools.jar...
 localedata.jar...
 jfxrt.jar...
 plugin.jar...
 javaws.jar...
 deploy.jar...
查看安装路径 echo $JAVA_HOME
/usr/local/java/jdk1.7.0_40
3.修改profile:
sudo vi /etc/profile
//最后面加入
JAVA_HOME=/usr/local/java/jdk1.7.0_40
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOEM/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
export ALT_BOOTDIR=/usr/local/java/jdk1.7.0_80
export ALLOW_DOWNLOADS=true 
export USE_PRECOMPILED_HEADER=true 
export SKIP_DEBUG_BUILD=false 
export SKIP_FASTDEBUG_BUILD=true 
export DEBUG_NAME=debug 
unset CLASSPATH 
unset JAVA_HOME 
4.保存:
 #source /etc/profile
5.验证成功:
# java -version
 在Linux上安装ant环境
1、从http://ant.apache.org 上下载tar.gz版ant
2、复制到/usr下
3、tar -vxzf apahce-ant-1.9.2-bin.tar.gz  解压
4、chown -R yjdabc apahce-ant-1.9.2  改变权限
    chown -R :users apahce-ant-1.9.2
   chmod -R +x apahce-ant-1.9.2
5、vi /etc/profile    修改系统配置文件
    #set Ant enviroment
    ANT_HOME=/usr/local/java/apache-ant-1.7.0
    ANYPATH=$ANTPATH:$ANT_HOME/bin
    unset ANT_HOME
6、source /etc/proifle   立刻将配置生效
7、ant -version   测试ant是否生效
  安装alsa-lib 包含ALSA库函数  声卡
  ftp://ftp.alsa-project.org/pub/lib/
  alsa-lib-1.1.6.tar.bz2  tar -xvf alsa-lib-1.1.6.tar.bz2
  进入目录:cd alsa-lib-1.1.6.tar.bz2
  执行命令# ./configure
          # make install
  安装Freetype
  https://download.savannah.gnu.org/releases/freetype/
  freetype-2.5.3.tar.gz
  执行命令 # ./configure
           # make
           #sudo make install
  编译完成之后如果还报错 在目录include
  cp -r freetype2/* ./

安装cups
  https://github.com/apple/cups/releases
  执行命令同上
 
  到这里以上问题全部解决 执行make sanity

( cd  ./jdk/make && \
  make sanity HOTSPOT_IMPORT_CHECK=false JDK_TOPDIR=/usr/local/java/openjdk/jdk JDK_MAKE_SHARED_DIR=/usr/local/java/openjdk/jdk/make/common/shared EXTERNALSANITYCONTROL=true SOURCE_LANGUAGE_VERSION=7 TARGET_CLASS_VERSION=7 MILESTONE=internal BUILD_NUMBER=b00 JDK_BUILD_NUMBER=b00 FULL_VERSION=1.7.0-internal-debug-root_2018_05_05_02_41-b00 PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.7.0 JDK_MKTG_VERSION=7 JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=7 JDK_MICRO_VERSION=0 PREVIOUS_MAJOR_VERSION=1 PREVIOUS_MINOR_VERSION=6 PREVIOUS_MICRO_VERSION=0 ARCH_DATA_MODEL=32 VARIANT=DBG DEBUG_CLASSFILES=true COOKED_BUILD_NUMBER=0 ALT_OUTPUTDIR=/usr/local/java/openjdk/build/linux-i586 ALT_LANGTOOLS_DIST=/usr/local/java/openjdk/build/linux-i586/langtools/dist ALT_CORBA_DIST=/usr/local/java/openjdk/build/linux-i586/corba/dist ALT_JAXP_DIST=/usr/local/java/openjdk/build/linux-i586/jaxp/dist ALT_JAXWS_DIST=/usr/local/java/openjdk/build/linux-i586/jaxws/dist ALT_HOTSPOT_IMPORT_PATH=/usr/local/java/openjdk/build/linux-i586/hotspot/import BUILD_HOTSPOT=true ; )
make[1]: Entering directory `/usr/local/java/openjdk/jdk/make'
make[1]: Leaving directory `/usr/local/java/openjdk/jdk/make'

Build Machine Information:
   build machine = localhost.localdomain

Build Directory Structure:
   CWD = /usr/local/java/openjdk
   TOPDIR = .
   LANGTOOLS_TOPDIR = ./langtools
   JAXP_TOPDIR = ./jaxp
   JAXWS_TOPDIR = ./jaxws
   CORBA_TOPDIR = ./corba
   HOTSPOT_TOPDIR = ./hotspot
   JDK_TOPDIR = ./jdk

Build Directives:
   BUILD_LANGTOOLS = true 
   BUILD_JAXP = true 
   BUILD_JAXWS = true 
   BUILD_CORBA = true 
   BUILD_HOTSPOT = true 
   BUILD_JDK    = true 
   DEBUG_CLASSFILES =  
   DEBUG_BINARIES =  

Hotspot Settings: 
      HOTSPOT_BUILD_JOBS  =  
      HOTSPOT_OUTPUTDIR   = /usr/local/java/openjdk/build/linux-i586/hotspot/outputdir 
      HOTSPOT_EXPORT_PATH = /usr/local/java/openjdk/build/linux-i586/hotspot/import 
 



Bootstrap Settings:
  BOOTDIR = /usr/local/java/jdk1.7.0_80
    ALT_BOOTDIR = /usr/local/java/jdk1.7.0_80
  BOOT_VER = 1.7.0 [requires at least 1.6]
  OUTPUTDIR = /usr/local/java/openjdk/build/linux-i586
    ALT_OUTPUTDIR = /usr/local/java/openjdk/build/linux-i586
  ABS_OUTPUTDIR = /usr/local/java/openjdk/build/linux-i586
 
Build Tool Settings:
  SLASH_JAVA = /NOT-SET
    ALT_SLASH_JAVA = 
  VARIANT = DBG
  JDK_DEVTOOLS_DIR = /NOT-SET/devtools
    ALT_JDK_DEVTOOLS_DIR = 
  ANT_HOME = 
  UNIXCOMMAND_PATH = /bin/
    ALT_UNIXCOMMAND_PATH = 
  COMPILER_PATH = /usr/bin/
    ALT_COMPILER_PATH = 
  DEVTOOLS_PATH = /usr/bin/
    ALT_DEVTOOLS_PATH = 
  UNIXCCS_PATH = /usr/ccs/bin/
    ALT_UNIXCCS_PATH = 
  USRBIN_PATH = /usr/bin/
    ALT_USRBIN_PATH = 
  COMPILER_NAME = GCC4
  COMPILER_VERSION = GCC4
  CC_VER = 4.5.1 [requires at least 4.3.0]
  ZIP_VER = 3.0 [requires at least 2.2]
  UNZIP_VER = 6.00 [requires at least 5.12]
  ANT_VER = 1.8.0 [requires at least 1.7.1]
  TEMPDIR = /usr/local/java/openjdk/build/linux-i586/tmp
 
Build Directives:
  OPENJDK = true
  USE_HOTSPOT_INTERPRETER_MODE = 
  PEDANTIC = 
  DEV_ONLY = 
  NO_DOCS = 
  NO_IMAGES = 
  TOOLS_ONLY = 
  INSANE = 
  COMPILE_APPROACH = parallel
  PARALLEL_COMPILE_JOBS = 2
    ALT_PARALLEL_COMPILE_JOBS = 
  FASTDEBUG = 
  COMPILER_WARNINGS_FATAL = false
  COMPILER_WARNING_LEVEL = 
  SHOW_ALL_WARNINGS = 
  INCREMENTAL_BUILD = false
  CC_HIGHEST_OPT = 
  CC_HIGHER_OPT = 
  CC_LOWER_OPT = 
  CXXFLAGS =  -g -fPIC -DCC_NOEX -W -Wall  -Wno-unused -Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN  
  CFLAGS =  -g   -fno-strict-aliasing -fPIC -W -Wall  -Wno-unused -Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN  
  BOOT_JAVA_CMD = /usr/local/java/jdk1.7.0_80/bin/java -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput -client -Xmx512m -Xms512m -XX:PermSize=32m -XX:MaxPermSize=160m
  BOOT_JAVAC_CMD = /usr/local/java/jdk1.7.0_80/bin/javac  -J-XX:ThreadStackSize=768 -J-XX:-PrintVMOptions -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-client -J-Xmx512m -J-Xms512m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding ascii -source 6 -target 6 -XDignore.symbol.file=true
  BOOT_JAR_CMD = /usr/local/java/jdk1.7.0_80/bin/jar
  BOOT_JARSIGNER_CMD = /usr/local/java/jdk1.7.0_80/bin/jarsigner
  JAVAC_CMD = /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries/linux-i586/bin/javac  -J-XX:ThreadStackSize=768 -J-XX:-PrintVMOptions -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-client -J-Xmx512m -J-Xms512m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m  -g -source 7 -target 7 -encoding ascii -Xbootclasspath:/usr/local/java/openjdk/build/linux-i586/classes 
  JAVAH_CMD = /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries/linux-i586/bin/javah -bootclasspath /usr/local/java/openjdk/build/linux-i586/classes
  JAVADOC_CMD = /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries/linux-i586/bin/javadoc -J-XX:-PrintVMOptions -J-XX:+UnlockDiagnosticVMOptions -J-XX:-LogVMOutput -J-client -J-Xmx512m -J-Xms512m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -bootclasspath /usr/local/java/openjdk/build/linux-i586/classes
 
Build Platform Settings:
  USER = root
  PLATFORM = linux
  ARCH = i586
  LIBARCH = i386
  ARCH_FAMILY = i586
  ARCH_DATA_MODEL = 32
  ARCHPROP = i386
  ALSA_VERSION = 1.1.6
  OS_VERSION = 2.6.35.6-45.fc14.i686 [requires at least 2.6]
  OS_VARIANT_NAME = Fedora
  OS_VARIANT_VERSION = 14
  MB_OF_MEMORY = 2012
 
GNU Make Settings:
  MAKE = make
  MAKE_VER = 3.82 [requires at least 3.81]
  MAKECMDGOALS = sanity
  MAKEFLAGS = w
  SHELL = /bin/sh
 
Target Build Versions:
  JDK_VERSION = 1.7.0
  MILESTONE = internal
  RELEASE = 1.7.0-internal-debug
  FULL_VERSION = 1.7.0-internal-debug-root_2018_05_05_02_41-b00
  BUILD_NUMBER = b00
 
External File/Binary Locations:
  USRJDKINSTANCES_PATH = /opt/java
  BUILD_JDK_IMPORT_PATH = /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries
    ALT_BUILD_JDK_IMPORT_PATH = 
  JDK_IMPORT_PATH = /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries/linux-i586
    ALT_JDK_IMPORT_PATH = 
  LANGTOOLS_DIST = 
    ALT_LANGTOOLS_DIST = /usr/local/java/openjdk/build/linux-i586/langtools/dist
  CORBA_DIST = 
    ALT_CORBA_DIST = /usr/local/java/openjdk/build/linux-i586/corba/dist
  JAXP_DIST = 
    ALT_JAXP_DIST = /usr/local/java/openjdk/build/linux-i586/jaxp/dist
  JAXWS_DIST = 
    ALT_JAXWS_DIST = /usr/local/java/openjdk/build/linux-i586/jaxws/dist
  HOTSPOT_DOCS_IMPORT_PATH = /NO_DOCS_DIR
    ALT_HOTSPOT_DOCS_IMPORT_PATH = 
  HOTSPOT_IMPORT_PATH = /usr/local/java/openjdk/build/linux-i586/hotspot/import
    ALT_HOTSPOT_IMPORT_PATH = /usr/local/java/openjdk/build/linux-i586/hotspot/import
  HOTSPOT_CLIENT_PATH = /usr/local/java/openjdk/build/linux-i586/hotspot/import/jre/lib/i386/client
    ALT_HOTSPOT_CLIENT_PATH = 
  HOTSPOT_SERVER_PATH = /usr/local/java/openjdk/build/linux-i586/hotspot/import/jre/lib/i386/server
    ALT_HOTSPOT_SERVER_PATH = 
  CACERTS_FILE = ./../src/share/lib/security/cacerts
    ALT_CACERTS_FILE = 
  CUPS_HEADERS_PATH = /usr/include
    ALT_CUPS_HEADERS_PATH = 
 
OpenJDK-specific settings:
  FREETYPE_HEADERS_PATH = /usr/include
    ALT_FREETYPE_HEADERS_PATH = 
  FREETYPE_LIB_PATH = /usr/lib
    ALT_FREETYPE_LIB_PATH = 
 
Previous JDK Settings:
  PREVIOUS_RELEASE_PATH = USING-PREVIOUS_RELEASE_IMAGE
    ALT_PREVIOUS_RELEASE_PATH = 
  PREVIOUS_JDK_VERSION = 1.6.0
    ALT_PREVIOUS_JDK_VERSION = 
  PREVIOUS_JDK_FILE = 
    ALT_PREVIOUS_JDK_FILE = 
  PREVIOUS_JRE_FILE = 
    ALT_PREVIOUS_JRE_FILE = 
  PREVIOUS_RELEASE_IMAGE = /usr/local/java/jdk1.7.0_80
    ALT_PREVIOUS_RELEASE_IMAGE = 


Sanity check passed.

执行命令 make
 Total time: 9 seconds
make[3]: *** [all] Error 1
make[3]: Leaving directory `/usr/local/java/openjdk/jaxws/make'
make[2]: *** [jaxws-build] Error 2
make[2]: Leaving directory `/usr/local/java/openjdk'
make[1]: *** [generic_debug_build] Error 2
make[1]: Leaving directory `/usr/local/java/openjdk'
make: *** [build_debug_image] Error 2
 http://www.filewatcher.com/m/libX11-devel-1.1.5-4.fc10.i386.rpm.1110944-0.html
 查看输出文件:output
 查看现有的yum
 rpm -qa|grep yum
 替换fedora.repo中的内容
 执行如下命令: yum clean all
                yum makecache

配置yum源

[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[centosplus]
name=CentOS-6 - Plus - 163.com       
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

 

vim ./hotspot/make/linux/makefiles/gcc.make
注释掉:
WARNINGS_ARE_ERRORS = -Werror

mount /dev/cdrom1 /mnt/vcdrom
rpm -ivh --nodeps libX11-devel-1.3.4-3.fc14.i686.rpm
libstdc++-static-4.8.0-0.18.fc20.i686.rpm

/usr/local/openjdk7-debug/jaxws/build/xml_generated/build-drop-jaf_src.xml:96: Redirection detected from https to http. Protocol switch unsafe, not allowed.

export ALT_DROPS_DIR=/usr/local/java/openjdk/drop

posted on 2018-05-05 17:16  愤怒中的小草  阅读(612)  评论(0编辑  收藏  举报