Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Mac OS X 10.10 Yosemite compiling OpenJDK 9     - RHEL7.0 log system (Linux)

- Linux iptables: Composition Rules (Linux)

- SSH port forwarding application (Server)

- Linux system started to learn: Teaches you install Ubuntu 15.04 on VirtualBox (Linux)

- Ubuntu 12.04 install RTL8723BE wireless network card driver (Programming)

- Teach you how to protect the Linux operating system security tips (Linux)

- Linux C programming and Shell Programming in the development of practical tools similarities summary (Programming)

- C ++ Fundamentals study notes (Programming)

- Implicit conversion from Java type conversion compare MySQL and Oracle (Database)

- Using the Linux VNC service (Server)

- How to install Perl modules from CPAN (Linux)

- Android gets the global process information and the memory used by the process (Programming)

- SHELL script to use anti SSH brute force and vsftpd (Linux)

- iptables using summary (Linux)

- SQL Server 2012 failover looksalive check and is alive check (Database)

- Get basic information about Linux server script (Server)

- PostgreSQL query result area is removed and precision (Database)

- Linux system security reinforcement system by masquerading method (Linux)

- JavaScript: understanding regular expressions (Programming)

- Linux system components Detailed log (Linux)

 
         
  Mac OS X 10.10 Yosemite compiling OpenJDK 9
     
  Add Date : 2018-11-21      
         
         
         
  On Mac OSX 10.10 system compiled under OpenJDK9, the following individuals to install only the records for reference.

Compile time: 2015-06-13

System Version: Mac OS X Yosemite 10.10.4

OpenJDK compiled versions: JDK 9

Related Software version:

XCode version: XCode6-Beat4 Version 6.0 (6A267n)
JDK version: 1.8.0_45
Software management tools: brew
Xquartz (X11): 2.7.7

Compile preparation:

- an overview of the system requirements for the official website:


https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms

- Source download tool installed (here using Mercurial tool [OpenJDK version control tool] for download from the official website):


Installation Reference:

    http://openjdk.java.net/guide/repositories.html

    https://mercurial.selenic.com/wiki/Download#Mac_OS_X

The installation script:

installation:

$ Brew install mercurial

If the link fails, then:

$ Sudo brew link mercurial

Verify the version not lower than 2.6.3: hg version

After installation of version 3.0.2, the official website to download and install the 3.4.1

- Installing ccache faster compilation

$ Brew search ccache
$ Brew install ccache

- Install freetype (compile-time required):

brew install freetype

Installation failed, prompting dependent libpng can not be downloaded. Manual installation:

Download the latest version of libpng 1.6.17 (http://sourceforge.net/projects/libpng/files/) and unpack:

$ Pwd
$ Cd ./libpng-1.6.17
$ ./configure --prefix = / Usr / local / libpng-1.6.17
$ Make
$ Make install
$ Cd / usr / local /
$ Ln -s libpng-1.6.17 / usr / local / libpng
$ Brew install freetype

- Get JDK source code:

$ Mkdir OpenJDK9; cd OpenJDK9
$ Hg clone
$ Cd dev
$ Chmod u + x get_source.sh
$ ./get_source.sh
 

Build configuration:

$ Bash ./configure --help = short
$ Bash ./configure --enable-debug --with-target-bits = 64
...
================================================== ==
A new configuration has been successfully created in
OpenJDK9 / jdk9 / build / macosx-x86_64-normal-server-fastdebug
using configure arguments '--enable-debug --with-target-bits = 64'.
 
Configuration summary:
* Debug level: fastdebug
* HS debug level: fastdebug
* JDK variant: normal
* JVM variants: server
* OpenJDK target: OS: macosx, CPU architecture: x86, address length: 64
 
Tools summary:
* Boot JDK: java version "1.8.0_45" Java (TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot (TM) 64-Bit Server VM (build 25.45-b02, mixed mode) (at / Library / java / JavaVirtualMachines / jdk1.8.0_45.jdk / Contents / Home)
* Toolchain: clang (clang / LLVM)
* C Compiler: Version Apple LLVM version 6.0 (clang-600.0.41.2) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.4.0 Thread model: posix (at / usr / bin / clang)
* C ++ Compiler: Version Apple LLVM version 6.0 (clang-600.0.41.2) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.4.0 Thread model: posix (at / usr / bin / clang ++)
 
Build performance summary:
* Cores to use: 2
* Memory limit: 4096 MB

Compilation:

$ Make
...
OpenJDK9 / jdk9 / jdk / src / java.desktop / macosx / native / libosxapp / NSApplicationAWT.m: 387: 29: error: sending 'id < NSApplicationDelegate >' to parameter of incompatible type 'id < NSFileManagerDelegate >' [-Werror]
        [NSApp setDelegate: applicationDelegate];
                            ^ ~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: Note: passing argument to parameter 'delegate' here
@property (assign) id delegate NS_AVAILABLE (10_5, 2_0);
                                              ^
1 error generated.
make [3]: *** [OpenJDK9 / jdk9 / build / macosx-x86_64-normal-server-fastdebug / support / native / java.desktop / libosxapp / NSApplicationAWT.o] Error 1
make [2]: *** [java.desktop-libs] Error 2
make [2]: *** Waiting for unfinished jobs ....
 

Or alternatively as a solution XCode version 6.3.2 or 5. A few:

//OpenJDK9/jdk9/jdk/src/java.desktop/macosx/native/libosxapp/NSApplicationAWT.m
// 387 lines read:
    if (NSApp! = nil) {
        // [NSApp setDelegate: applicationDelegate];
        [(NSApplication *) NSApp setDelegate: applicationDelegate];
 
        if (applicationDelegate && qad) {
            [Qad processQueuedEventsWithTargetDelegate: applicationDelegate];
            qad = nil;
        }
    }
 

Recompile:

$ Make clean
$ Make
...
OpenJDK9 / jdk9 / jdk / src / java.desktop / share / native / libawt / awt / image / awt_parseImage.c: 855: 33: error: comparison of array 'rasterP-> sppsm.offsets' not equal to a null pointer is always true [-Werror, -Wtautological-pointer-compare]
        else if (rasterP-> sppsm.offsets! = NULL) {
                ~~~~~~~~~~~~~~~ ^ ~~~~~~ ~~~~
1 error generated.
make [3]: *** [OpenJDK9 / jdk9 / build / macosx-x86_64-normal-server-fastdebug / support / native / java.desktop / libawt / awt_parseImage.o] Error 1
make [2]: *** [java.desktop-libs] Error 2
make [2]: *** Waiting for unfinished jobs ....
 
ERROR: Build failed for target 'default' in configuration 'macosx-x86_64-normal-server-fastdebug' (exit code 2)
Hint: If caused by a warning, try configure --disable-warnings-as-errors
 
make [1]: *** [main] Error 2
make: *** [default] Error 2

Solution:

//OpenJDK9/jdk9/jdk/src/java.desktop/share/native/libawt/awt/image/awt_parseImage.c
855 // change the following line (commented IF condition):
    else / ** if (rasterP-> sppsm.offsets! = NULL) ** / {

Recompile:

$ Make clean
$ Make
...
1 error generated.
make [3]: *** [OpenJDK9 / jdk9 / build / macosx-x86_64-normal-server-fastdebug / support / native / java.desktop / libsplashscreen / splashscreen_sys.o] Error 1
make [3]: *** Waiting for unfinished jobs ....
make [2]: *** [java.desktop-libs] Error 2
 
ERROR: Build failed for target 'default' in configuration 'macosx-x86_64-normal-server-fastdebug' (exit code 2)
Hint: If caused by a warning, try configure --disable-warnings-as-errors
 
make [1]: *** [main] Error 2
make: *** [default] Error 2

Solution:

//OpenJDK/openJDK9/jdk9/jdk/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m
278 // commented out line:
// [Image setScalesWhenResized: YES];

Reprogramming, the error did not occur:

$ Make clean
$ Make
...
Finished building target 'default' in configuration 'macosx-x86_64-normal-server-fastdebug'

- compile the results preliminarily verified:

$ Cd ./build/*
$ Ls
Makefile configure-support jdk
bootcycle-spec.gmk configure.log make-support
build.log configure.log.old spec.gmk
build.log.old hotspot support
buildtools hotspot-spec.gmk
compare.sh images
$ Cd jdk / bin
$ ./java -versionopen
openjdk version "1.9.0-internal-fastdebug"
OpenJDK Runtime Environment (build 1.9.0-internal-fastdebug-stxpons_2015_06_13_16_14-b00)
OpenJDK 64-Bit Server VM (build 1.9.0-internal-fastdebug-stxpons_2015_06_13_16_14-b00, mixed mode)
 

- Reference JDK source directory README-builds.html documents in the Testing section:


Oh mother ah, toss half a day, and also to ah, first install jtreg, too lazy to toss. . . Next time free press official method validation. . .

$ Cd test
$ Make PRODUCT_HOME = `pwd` /../ build / * / images / j2sdk-image all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -k -C ../jdk/test TEST = jdk_all jdk_all
echo "Running tests: jdk_all"
Running tests: jdk_all
for each in jdk_all; do \
        /Applications/Xcode.app/Contents/Developer/usr/bin/make -j 1 TEST_SELECTION = ": $ each" UNIQUE_DIR = $ each jtreg_tests; \
done
make [2]: *** No rule to make target `OpenJDK9 / jdk9 / test /../ build / macosx-x86_64-normal-server-fastdebug / images / j2sdk-image ', needed by` jtreg_tests'.
make [2]: *** No rule to make target `/java/re/jtreg/4.1/promoted/latest/binaries/jtreg ', needed by` /java/re/jtreg/4.1/promoted/latest/binaries/ jtreg / bin / jtreg '.
make [2]: Target `jtreg_tests' not remade because of errors.
make [1]: *** [jdk_all] Error 2
make: *** [jdk_all] Error 2
     
         
         
         
  More:      
 
- Ubuntu install Eclipse can not find JAVA_HOME problem (Linux)
- Linux system package manager (rpm, yum, source packages installation) (Linux)
- Raspberry Pi configuration wireless hotspot (Linux)
- Linux System Getting Started Tutorial: mounted directly in Linux LVM partition (Linux)
- Use the TC flow control test under Linux (Linux)
- Installation and deployment of MariaDB under CentOS (Database)
- Mac OS X command line to submit the local project to Git (Server)
- To teach you how to safely send mail (Linux)
- Linux Change ssh port and disable remote root login at (Linux)
- How to configure FirewallD in RHEL / CentOS 7 and Fedora in (Linux)
- Linux Live CD lets your PC is no longer secure (Linux)
- Linux Fundamentals of the memory management mechanism (Linux)
- RHEL (RedHat) 6.3 using EPEL Yum source (Linux)
- How to run Kali Linux 2.0 in Docker container (Linux)
- Android project using the command to create and install the package (Programming)
- Linux server alarms using Java (Server)
- SQL Server 2008 database synchronization Notes (Database)
- Web server security policy (Linux)
- Fast Sort Algorithms (Programming)
- Lua regex (string function) (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.