MacOS 10.15编译openjdk8u详细过程

Mac10.14下使用Xcode10编译调试OpenJDK8最新教程(附源码) 最近在深入研究Java锁升级的过程中遇到很多问题。这些问题从网上各类文章中都没有找到合适的答案(网上大部分都说的比较概念化,深入细节的关键点也没能说清楚,后续我会专门整理一篇从源码层面分析Java锁升级的文章,敬请期待),于是迫不得已只能自己下载JDK源码进行研究。 因为要研究源码就不得不对源码进行编译、调试等操作。由于自己对C/C++不熟悉,所以在整个过程中遇到了很多问题、查阅了很多文章,也费力很多精力。本篇文章就对本次OpenJdk8的编译、调试过程进行一次整理记录。希望对有需要的同学有所帮助。 阅读详情

MacOS 10.15编译openjdk8u详细过程

三年前编译过一次openjdk8,最近需要调试,发现当时编译时没加调试信息,于是准备重新编译,由于机器信息与三年前完全不同,编译时的异常超出我预期,经过一周折腾终于编译通过,以下上本次编译的详细过程,希望对大家避坑有帮助

环境

1. 机器环境信息

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

JVM输出系统信息
OS:Bsduname:Darwin 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
rlimit: STACK 8192k, CORE 0k, NPROC 2784, NOFILE 10240, AS infinity

CPU:total 4 (initial active 4) (2 cores per cpu, 2 threads per core) family 6 model 78 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx

Memory: 4k page, physical 16777216k(369628k free)

2.依赖软件安装

  1. Boot-strap JDK : jdk-7u80-macosx-x64.dmg

  2. XQuartz : XQuartz-2.7.11.dmg

  3. brew 安装以下软件

    brew install freetype
    brew install ant
    brew install ccache
    brew install autoconf
    brew install llvm
    brew install binutils
    
  4. 期间为了解决问题安装过gcc@4.9和gcc@7没有使用到

准备

1. mercurial安装

lizhengdeMacBook-Pro:homebrew-core lizheng$ brew install mercurial

2. 代码下载

直接从源码库克隆源码,然后使用命令下载代码

hg clone http://hg.openjdk.java.net/jdk8u/jdk8u jdk8u
hg pull
vim batchget.sh
chmod +x batchget.sh 
./batchget.sh 

如果网速不好可以参考网上另一篇文篇,使用批量脚本(batchget.sh),脚本如下

#!/bin/bash

for i in {1..28}
do
sh ./get_source.sh;
done

3. 查看configure帮助

lizhengdeMacBook-Pro:openjdk8 lizheng$ bash configure --help
Running generated-configure.sh

4.安装配置

./configure --with-xcode-path --with-debug-level=slowdebug --with-boot-jdk=`/usr/libexec/java_home -v 1.7`   --enable-debug-symbols --disable-zip-debug-info --with-memory-size=6144 ZIP_DEBUGINFO_FILES=0  OBJCOPY=gobjcopy  --with-jobs=8 CC=clang CXX=clang++  --with-native-debug-symbols=internal

configure有不少的参数, 具体的参数可以通过 'bash ./configure --help' 查看
   --with-debug-level=slowdebug   表示构建debug版本, openjdk8去掉了jvmg版本的构建
   --enable-debug-symbols 和   ZIP_DEBUGINFO_FILES=0  主要是方便调试
   

运行输出:

lizhengdeMacBook-Pro:jdk8uuu lizheng$ ./configure --with-xcode-path --with-debug-level=slowdebug --with-boot-jdk=`/usr/libexec/java_home -v 1.7`   --enable-debug-symbols --disable-zip-debug-info --with-memory-size=6144 ZIP_DEBUGINFO_FILES=0  OBJCOPY=gobjcopy  --with-jobs=8 CC=clang CXX=clang++  --with-native-debug-symbols=internal
Configure source code has been updated, checking time stamps
Running generated-configure.sh
configure: Configuration created at Mon Apr 20 09:28:00 CST 2020.
configure: configure script generated at timestamp 1585090987.


====================================================
A new configuration has been successfully created in
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/build/macosx-x86_64-normal-server-slowdebug
using configure arguments '--with-xcode-path --with-debug-level=slowdebug --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home --enable-debug-symbols --disable-zip-debug-info --with-memory-size=6144 ZIP_DEBUGINFO_FILES=0 OBJCOPY=gobjcopy --with-jobs=8 CC=clang CXX=clang++ --with-native-debug-symbols=internal'.

Configuration summary:
* Debug level:    slowdebug
* JDK variant:    normal
* JVM variants:   server
* OpenJDK target: OS: macosx, CPU architecture: x86, address length: 64

Tools summary:
* Boot JDK:       java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)  (at /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home)
* Toolchain:      gcc (GNU Compiler Collection)
* C Compiler:     Version clang version 10.0.0 Target: x86_64-apple-darwin19.4.0 Thread model: posix InstalledDir: /usr/local/opt/llvm/bin (at /usr/local/opt/llvm/bin/clang)
* C++ Compiler:   Version clang version 10.0.0 Target: x86_64-apple-darwin19.4.0 Thread model: posix InstalledDir: /usr/local/opt/llvm/bin (at /usr/local/opt/llvm/bin/clang++)

Build performance summary:
* Cores to use:   8
* Memory limit:   6144 MB

lizhengdeMacBook-Pro:tmp lizheng$ git clone https://github.com/imkiwa/xcode-missing-libstdc-.git
Cloning into 'xcode-missing-libstdc-'...
remote: Enumerating objects: 597, done.
remote: Counting objects: 100% (597/597), done.
remote: Compressing objects: 100% (232/232), done.
remote: Total 597 (delta 362), reused 597 (delta 362), pack-reused 0
Receiving objects: 100% (597/597), 876.56 KiB | 56.00 KiB/s, done.
Resolving deltas: 100% (362/362), done.

lizhengdeMacBook-Pro:tmp lizheng$ sudo mkdir -p Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++
lizhengdeMacBook-Pro:tmp lizheng$ sudo cp -R xcode-missing-libstdc-/include/c++/* /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++
lizhengdeMacBook-Pro:tmp lizheng$ sudo cp xcode-missing-libstdc-/lib/*  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/

5.构建

lizhengdeMacBook-Pro:jdk8uuu lizheng$ make all JOBS=8 ZIP_DEBUGINFO_FILES=0 COMPILER_WARNINGS_FATAL=false  CC=clang USE_CLANG=true LP64=1

构建输出:

Building OpenJDK for target 'all' in configuration 'macosx-x86_64-normal-server-slowdebug'

## Starting langtools
Compiling 2 files for BUILD_TOOLS
Compiling 32 properties into resource bundles
Compiling 782 files for BUILD_BOOTSTRAP_LANGTOOLS
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
Creating langtools/dist/bootstrap/lib/javac.jar
Updating langtools/dist/lib/src.zip
Compiling 785 files for BUILD_FULL_JAVAC
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
Creating langtools/dist/lib/classes.jar
## Finished langtools (build time 00:00:40)

## Starting hotspot
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlparse.cpp
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/archDesc.cpp
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/arena.cpp
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/dfa.cpp
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/dict2.cpp
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/arena.cpp:25:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/filebuff.cpp
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlparse.cpp:27:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/archDesc.cpp:27:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/forms.cpp
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/dfa.cpp:26:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/forms.cpp:26:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/filebuff.cpp:26:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not foundmake[6]: *** [../generated/adfiles/arena.o] Error 1
make[6]: *** Waiting for unfinished jobs....

#include <iostream>
         ^~~~~~~~~~
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/dict2.cpp:27:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
1 error generated.
make[6]: *** [../generated/adfiles/archDesc.o] Error 1
1 error generated.
make[6]: *** [../generated/adfiles/filebuff.o] Error 1
1 error generated.
make[6]: *** [../generated/adfiles/forms.o] Error 1
1 error generated.
1 error generated.
make[6]: *** [../generated/adfiles/dict2.o] Error 1
make[6]: *** [../generated/adfiles/dfa.o] Error 1
1 error generated.
make[6]: *** [../generated/adfiles/adlparse.o] Error 1
make[5]: *** [ad_stuff] Error 2
make[4]: *** [debug] Error 2
make[3]: *** [generic_build2] Error 2
make[2]: *** [debug] Error 2
make[1]: *** [/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uuu/build/macosx-x86_64-normal-server-slowdebug/hotspot/_hotspot.timestamp] Error 2
make: *** [hotspot-only] Error 2

==============================================================

lizhengdeMacBook-Pro:jdk8uuu lizheng$ export CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1"
lizhengdeMacBook-Pro:jdk8uuu lizheng$ export CXXFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1"
lizhengdeMacBook-Pro:jdk8uuu lizheng$ export LDFLAGS=-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
lizhengdeMacBook-Pro:jdk8uuu lizheng$ export LIBRARY_PATH=$LIBRARY_PATH:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/

==============================================================

lizhengdeMacBook-Pro:jdk8uuu lizheng$ make all JOBS=8 ZIP_DEBUGINFO_FILES=0 COMPILER_WARNINGS_FATAL=false  CC=clang USE_CLANG=true LP64=1
Building OpenJDK for target 'all' in configuration 'macosx-x86_64-normal-server-slowdebug'

## Starting langtools
## Finished langtools (build time 00:00:00)

## Starting hotspot
## Finished docs (build time 00:03:11)

----- Build times -------
Start 2020-04-20 09:32:00
End   2020-04-20 09:49:13
00:00:42 corba
00:01:01 demos
00:03:11 docs
00:03:55 hotspot
00:01:50 images
00:00:22 jaxp
00:00:39 jaxws
00:05:11 jdk
00:00:00 langtools
00:00:22 nashorn
00:17:13 TOTAL
-------------------------
Finished building OpenJDK for target 'all'

配置期异常

1.错误Xcode 4 is required to build JDK 8, the version found was 11.4.

configure: error: Xcode 4 is required to build JDK 8, the version found was 11.4. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select.

修改配置文件common/autoconf/generated-configure.sh,去除!

26788     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
26789       as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select.      " "$LINENO" 5
26790     fi

2.错误# as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5,参考文章

修改后为
#as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5

3.错误configure: error: Unable to find objcopy, cannot enable debug-symbols

checking for target address size... 64 bits
checking whether byte ordering is bigendian... no
checking if compiler supports "-m64"... yes
checking if compiler supports "-m64"... yes
checking if we should generate debug symbols... configure: error: Unable to find objcopy, cannot enable debug-symbols
configure exiting with result code 1

安装binutils,并加上OBJCOPY=gobjcopy

参考:https://www.cnblogs.com/jhxxb/p/12558970.html

lizhengdeMacBook-Pro:openjdk8 lizheng$ brew install binutils
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/binutils-2.34.catalina.bottle.tar.gz
######################################################################## 100.0%
==> Pouring binutils-2.34.catalina.bottle.tar.gz
==> Caveats
binutils is keg-only, which means it was not symlinked into /usr/local,
because Apple's CLT provides the same tools.

If you need to have binutils first in your PATH run:
  echo 'export PATH="/usr/local/opt/binutils/bin:$PATH"' >> ~/.bash_profile

For compilers to find binutils you may need to set:
  export LDFLAGS="-L/usr/local/opt/binutils/lib"
  export CPPFLAGS="-I/usr/local/opt/binutils/include"

==> Summary
🍺  /usr/local/Cellar/binutils/2.34: 138 files, 167.3MB

4. 错误ccache status: installed, but disabled (version older than 3.1.4)

Build performance summary:
* Cores to use:   2
* Memory limit:   6144 MB
* ccache status:  installed, but disabled (version older than 3.1.4)

Build performance tip: ccache gives a tremendous speedup for C++ recompilations.
You have ccache installed, but it is a version prior to 3.1.4. Try upgrading.

安装ccache

lizhengdeMacBook-Pro:openjdk8 lizheng$ brew install ccache
lizhengdeMacBook-Pro:openjdk8 lizheng$ ccache --version
ccache version 3.7.9

Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2020 Joel Rosdahl

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.

5. 错误configure: error: Xcode 4 is required to build JDK 8, the version found was 11.4. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select.

checking for xcodebuild... /usr/bin/xcodebuild
configure: error: Xcode 4 is required to build JDK 8, the version found was 11.4. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select.
configure exiting with result code 1

加上–with-xcode-path

configure: Using default toolchain gcc (GNU Compiler Collection)
checking Determining if we need to set DEVELOPER_DIR... configure: error: Xcode Developer path does not exist: yes/Contents/Developer, please provide a path to the Xcode 4 application bundle using --with-xcode-path
configure exiting with result code 1

参考:https://www.jianshu.com/p/03ddf147cb15

26713     if test -n "$XCODE_PATH"; then
26714       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
26715     fi
lizhengdeMacBook-Pro:jdk8uu lizheng$ ll /Applications/Xcode.app/Contents/Developer/
total 0
drwxr-xr-x  4 root  wheel  128 Mar 10 09:53 Applications/
drwxr-xr-x  7 root  wheel  224 Mar 10 09:53 Library/
drwxr-xr-x  6 root  wheel  192 Mar 10 09:54 Makefiles/
drwxr-xr-x  9 root  wheel  288 Mar 10 09:41 Platforms/
drwxr-xr-x  3 root  wheel   96 Mar  7 11:15 Toolchains/
drwxr-xr-x  8 root  wheel  256 Apr 15 21:10 Tools/
drwxr-xr-x  6 root  wheel  192 Mar 10 09:51 usr/
lizhengdeMacBook-Pro:jdk8uu lizheng$ export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/
lizhengdeMacBook-Pro:jdk8uu lizheng$ export XCODE_PATH=/Applications/Xcode.app

编译期异常

1. 第一个必须说的异常,目前还没在网上发现答案adlc.hpp:36:10: fatal error: 'iostream' file not found

clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/dict2.cpp
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/archDesc.cpp:27:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/adlparse.cpp:27:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/filebuff.cpp
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/arena.cpp:25:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/adlc.hpp:36:10: fatal error: 'iostream' file not found
#include <iostream>
         ^~~~~~~~~~
Compiling /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/adlc/forms.cpp
clang-10: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

这个问题原因是因为Xcode 10以后删除了libstdc++库,转而使用libc++,我做过很多尝试都没办法解决,可以参考这篇文章

=====以下是无效尝试

  1. 第一个就是按报错提示,在编译的时候加上-stdlib=libc++,用这个方法出现一堆日志根本没办法看,而且编译不通过

  2. 使用stackover方法用#include "/Library/Developer/CommandLineTools/usr/include/c++/v1/iostream"替换#include <iostream>,这个会报一个

  3. 下载安装Xcode_9.4.1.xip,安装后Xcode-select --switch切换路径,报错

    promote:jdk8uu lizheng$ sudo xcode-select -s /Applications/Xcode9.4.1/Xcode.app/Contents/Developer/
    Password:
    promote:jdk8uu lizheng$ xcode-select -p
    /Applications/Xcode9.4.1/Xcode.app/Contents/Developer
    promote:jdk8uu lizheng$ make all JOBS=8 ZIP_DEBUGINFO_FILES=0 COMPILER_WARNINGS_FATAL=false  CC=clang USE_CLANG=true LP64=1
    dyld: Symbol not found: _OBJC_IVAR_$_NSFont._fFlags
      Referenced from: /Applications/Xcode9.4.1/Xcode.app/Contents/SharedFrameworks/DVTDocumentation.framework/Versions/A/../../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
      Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
     in /Applications/Xcode9.4.1/Xcode.app/Contents/SharedFrameworks/DVTDocumentation.framework/Versions/A/../../../../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
    make: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
    make: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
    

=======以下是成功方法=

最后使用的办法是从github上下载库,然后设置环境变量后解决,此方法我编译过两次都通过

  1. git clone https://github.com/imkiwa/xcode-missing-libstdc-.git

  2. 执行install.sh,脚本如下

    #!/usr/bin/env bash
    
    set -e
    
    sudo ln -s \
        $PWD/include/c++ \
        /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
    
    sudo ln -s \
        $PWD/lib/libstdc++.6.0.9.tbd \
        $PWD/lib/libstdc++.6.tbd \
        $PWD/lib/libstdc++.tbd \
        /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
    
  3. 做完以上两步还是报同样的错,需要设置环境变量,可以参考这篇文章

    export CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1"
    export CXXFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1"
    export LDFLAGS=-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
    
  4. 完成以上设置还会报错ld: library not found for -lstdc++,可以参考这篇文章,解决办法如下:

    export LIBRARY_PATH=$LIBRARY_PATH:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
    
    

2. 报错error: invalid argument '-std=gnu++98' not allowed with 'C' make[6]: *** [libjsig.dylib] Error 1,解决办法参考https://www.cnblogs.com/zhengshuangxi/p/11063938.html

3.错误error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal],这是一类错误,有很多文件都需要修改,修改方法就是加空格,参考这篇文章

In file included from <built-in>:1:
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/precompiled/precompiled.hpp:306:
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp:52:32: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
         err_msg("%s - index: "SIZE_FORMAT", _vs.committed_size: "SIZE_FORMAT, \
                               ^
                                
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp:52:67: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
         err_msg("%s - index: "SIZE_FORMAT", _vs.committed_size: "SIZE_FORMAT, \
                                                                  ^
                                                                   
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp:55:26: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
         err_msg("Index "SIZE_FORMAT" corresponding to "PTR_FORMAT             \
                         ^
                          
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp:55:57: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
         err_msg("Index "SIZE_FORMAT" corresponding to "PTR_FORMAT             \
                                                        ^
                                                         
2 warnings and 6 errors generated.
make[6]: *** [precompiled.hpp.pch] Error 1



/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/memory/generation.hpp:426:30: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
        warning("time warp: "INT64_FORMAT" to "INT64_FORMAT, (int64_t)_time_of_last_gc, (int64_t)now);
                             ^
                              
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/memory/generation.hpp:426:48: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
        warning("time warp: "INT64_FORMAT" to "INT64_FORMAT, (int64_t)_time_of_last_gc, (int64_t)now);

4. 错误error: comparison between pointer and integer ('address' (aka 'unsigned char *') and 'bool')

warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/code/compiledIC.cpp:225:15: error: comparison between pointer and integer ('address' (aka 'unsigned char *') and 'bool')
    if (entry == false) {
        ~~~~~ ^  ~~~~~~~~~~~
1 error generated.
make[6]: *** [compiledIC.o] Error 1

修改代码compiledIC.cpp:225:15:
if ((bool)entry == false) {

5.错误error: case value evaluates to 3758096385, which cannot be narrowed to type 'int' [-Wc++11-narrowing]

/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/utilities/vmError.cpp:398:13: error: case value evaluates to 3758096385, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
       case OOM_MALLOC_ERROR:
            ^
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/utilities/vmError.cpp:399:13: error: case value evaluates to 3758096386, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
       case OOM_MMAP_ERROR:
            ^
/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/hotspot/src/share/vm/utilities/vmError.cpp:424:13: error: case value evaluates to 3758096384, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
       case INTERNAL_ERROR:

修改代码

 397     switch((long)_id) {
 398        case OOM_MALLOC_ERROR:
 399        case OOM_MMAP_ERROR:
 400          if (_size) {
 401            st->print("# Native memory allocation ");
 402            st->print((_id == (int)OOM_MALLOC_ERROR) ? "(malloc) failed to allocate " :
 403                                                  "(mmap) failed to map ");
 404            jio_snprintf(buf, sizeof(buf), SIZE_FORMAT, _size);
 405            st->print("%s", buf);
 406            st->print(" bytes");
 407            if (_message != NULL) {
 408              st->print(" for ");
 409              st->print("%s", _message);
 410            }
 411            st->cr();
 412          } else {
 413            if (_message != NULL)
 414              st->print("# ");
 415              st->print_cr("%s", _message);
 416          }
 417          // In error file give some solutions
 418          if (_verbose) {
 419            print_oom_reasons(st);
 420          } else {
 421            return;  // that's enough for the screen
 422          }
 423          break;
 424        case INTERNAL_ERROR:
 425        default:
 426          break;
 427      }

6. 错误error: cannot initialize return object of type 'jobject' (aka '_jobject *') with an rvalue of type 'bool'

/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp:295:12: error: cannot initialize return object of type 'jobject' (aka '_jobject *') with an rvalue of type 'bool'
    return false;
           ^~~~~
1 error generated.

修改代码:

293   if (uPtr->aborting()) {
294     THROW_IOE(uPtr->get_abort_message());
295     return 0;
296   }

7.错误Undefined symbols for architecture x86_64,参考修改方法

Undefined symbols for architecture x86_64:
  "_attachCurrentThread", referenced from:
      +[ThreadUtilities getJNIEnv] in ThreadUtilities.o
      +[ThreadUtilities getJNIEnvUncached] in ThreadUtilities.o
ld: symbol(s) not found for architecture x86_64
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/build/macosx-x86_64-normal-server-slowdebug/jdk/lib/libosxapp.dylib] Error 1
make[2]: *** Waiting for unfinished jobs....
2 warnings generated.
2 warnings generated.
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/jdk/src/macosx/native/com/apple/laf/ScreenMenu.m:26:
In file included from /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/jdk/src/macosx/native/com/apple/laf/ScreenMenu.h:28:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaNativeFoundation.framework/Headers/JavaNativeFoundation.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaNativeFoundation.framework/Headers/JNFJNI.h:30:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaNativeFoundation.framework/Headers/JNFException.h:49:1: warning: method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]
- init:(JNIEnv *)env throwable:(jthrowable)throwable;
^
  (id)
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaNativeFoundation.framework/Headers/JNFException.h:50:1: warning: method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]
- init:(JNIEnv *)env as:(const char *)javaExceptionType reason:(const char *)reasonMsg;
^
  (id)
2 warnings generated.
make[1]: *** [libs-only] Error 2
make: *** [jdk-only] Error 2
​```
修改 **jdk/src/macosx/native/sun/osxapp/ThreadUtilities.m ** 文件的38行
将
	inline void attachCurrentThread(void** env) {
修改为:
	static inline void attachCurrentThread(void** env) {
​```

8.运行时错误[libjvm.dylib+0xa35b18] PerfData::~PerfData()+0x8

promote:bin lizheng$ ./java -version
openjdk version "1.8.0-internal-debug"
OpenJDK Runtime Environment (build 1.8.0-internal-debug-lizheng_2020_04_19_22_06-b00)
OpenJDK 64-Bit Server VM (build 25.71-b00-debug, mixed mode)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000000108835b18, pid=2960, tid=0x0000000000002303
#
# JRE version: OpenJDK Runtime Environment (8.0) (build 1.8.0-internal-debug-lizheng_2020_04_19_22_06-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.71-b00-debug mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0xa35b18]  PerfData::~PerfData()+0x8
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/lizheng/Documents/3-data/5-source/java/javase/jdk8uu/build/macosx-x86_64-normal-server-slowdebug/images/j2sdk-image/bin/hs_err_pid2960.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

[error occurred during error reporting , id 0x4]

Abort trap: 6

查看日志中的栈调用信息

Stack: [0x0000700009987000,0x0000700009a87000],  sp=0x0000700009a86d70,  free space=1023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0xa35b18]  PerfData::~PerfData()+0x8
V  [libjvm.dylib+0xa3681d]  PerfDataManager::destroy()+0x6d
V  [libjvm.dylib+0xa38edd]  perfMemory_exit()+0x3d
V  [libjvm.dylib+0x67163d]  exit_globals()+0x1d
V  [libjvm.dylib+0xb85eb9]  Threads::destroy_vm()+0x199
V  [libjvm.dylib+0x73f175]  jni_DestroyJavaVM+0x175
C  [java+0x40cc]  JavaMain+0x27c
C  [libsystem_pthread.dylib+0x6109]  _pthread_start+0x94
C  [libsystem_pthread.dylib+0x1b8b]  thread_start+0xf

参考网上文章 ,文章2:注释hotspot/src/share/vm/runtime/perfMemory.cpp,注意可能会导致 内存泄露

hotspot/src/share/vm/runtime/perfMemory.cpp

 73   //if (!StatSampler::is_active())
 74   //  PerfDataManager::destroy();
JDK 1.8 下载安装与环境配置全攻略:从Oracle到OpenJDK的选择与避坑指南 Java开发环境搭建是每位开发者入门的必经之路,其核心在于正确安装和配置Java开发工具包。JDK作为Java程序编译和运行的基础,其版本选择直接影响项目的兼容性与稳定性。在众多版本中,JDK 1.8因其引入了Lambda表达式和Stream API等革命性特性,极大地提升了代码的简洁性与可读性,同时作为长期支持版本,在企业级应用中以其卓越的稳定性备受青睐。对于开发环境配置,关键在于理解并正确设置JAVA_HOME和PATH环境变量,这确保了系统能在任何位置识别Java命令。无论是进行微服务开发、构建Spr 阅读详情

相关推荐

从jdk8u仓库坐标到环境变量:JDK 8选型、配置与动态代理避坑指南

在Java技术栈中,JDK版本与项目运行环境的关系远比想象中复杂。以源码仓库里的jdk8u/jdk8u/jdk分支和changeset ID为坐标,可以清晰定位某个JDK 8u构建的真实来源与补丁状态,理解不同小版本间的安全与稳定性差异。从环境变量配置到JAVA_HOME、从IDEA找不到JDK到Spring AOP动态代理异常,许多诡异问题的根因都指向JDK小版本过旧或发行版选择不当。无论是Hadoop老集群还是需要降级到JDK 8的历史项目,正确识别发行版、校验SHA-256、按兼容矩阵选型,才能避免运

weixin_32821533的博客 323

命令提示符提示:请使用-Xlink:unchecked重新编译

命令提示符提示:注意:ArrayListTest.java使用了未经检查或不安全的操作注意:要了解详细信息,请使用-Xlink:unchecked重新编译。 在jre1.6的环境中,范型的使用都会报类似警告 即支持范型的容器应该定义范型类型然后再使用,或者,在方法前加一个忽略注释: 1、ArrayList&lt;String&gt; al=new ArrayList&lt;String&...

抢街饭的专栏 6199

java除去类里面的黄色警告

java除去类里面的黄色警告

java 编译 xlint,使用-Xlint重新编译:弃用以获取详细信息

I need to know how to fix these error notes:Note: Summer.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.Here is my code:import java.util.Calendar;import ja...

weixin_30240263的博客 1686

JDK8 linux平台32位64位文件,包括ARM

jdk-8u311-linux-aarch64.rpm jdk-8u311-linux-aarch64.tar.gz jdk-8u311-linux-arm32-vfp-hflt.tar.gz jdk-8u311-linux-i586.rpm jdk-8u311-linux-i586.tar.gz jdk-8u311-linux-x64.rpm jdk-8u311-linux-x64.tar.gz

DEM数据下载,拼接,裁剪

目录: 1、数字高程模型(DEM)的数据下载 2、在ENVI里面进行拼接,生成SARscape标准格式的DEM数据3、在ArcGIS里面安装已有的矢量范文,进行掩膜裁剪 4、注意事项 数字高程模型的数据下载: 网址:http://dwtkns.com/srtm30m/ 1.对研究区域进行经纬度选择,然后进行选择下载即可 2.下载的数据是.hgt格式的,按照不同的需求进行转换,这里我是用于ENVI处理,且下载了四个,所有进行了拼接,拼接、格式转换如下 注:可能有时候需要登陆注册,点击下...

weixin_40874151的博客 2万+

java 编译 xlint_java – 使用-Xlint重新编译:弃用以获取详细信息

我需要知道如何修复这些错误说明:Note: Summer.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.这是我的代码:import java.util.Calendar;import java.util.*;class Summer{public static ...

weixin_28860509的博客 853

开发框架Furion之WebApi+SqlSugar (一)

MyFurion.Model项目中,通过Nuget添加Furion、Furion.Extras.DatabaseAccessor.SqlSugar、Furion.Extras.ObjectMapper.Mapster、SqlSugarCore,同时添加对项目MyFurion.Unility的引用。在MyFurion.Start项目中,通过Nuget添加 AspNetCoreRateLimit、System.Linq.Dynamic.Core,同时添加对项目MyFurion.Application的引用。

liwan09的博客 1万+

Mac10.15.7上编译OpenJDK8u

进入到目录(因机器而已):/Users/mango/git/openjdk8u/build/macosx-x86_64-normal-server-release/images/j2sdk-image/bin,后执行。在编译过程中,可能会遇到各种各样的问题,这里就不标出来了。(因为不太懂C,要怎么解决也都是查资料尝试解决的。执行make images命令,编译过程耗时比较久,请耐心等待。如果有代理请设置代理,不然可能会超时或者慢。下,在IDEA中配置使用。该过程很慢,请耐心等待。下的软件包copy到。

mg0324的专栏 5098

newman的使用

Newman是一个基于Node.js的postman命令行工具,用于运行和测试PostmanAPI 请求的集合。它允许用户在命令行环境中执行Postman的JSON文件,从而实现接口自动化测试和持续集成,同时支持用户进行自动化测试、批量执行请求、生成报告等操作。

m0_62825058的博客 1615

L2-028 秀恩爱分得快(测试点3说明)

古人云:秀恩爱,分得快。互联网上每天都有大量人发布大量照片,我们通过分析这些照片,可以分析人与人之间的亲密度。如果一张照片上出现了 K 个人,这些人两两间的亲密度就被定义为 1/K。任意两个人如果同时出现在若干张照片里,他们之间的亲密度就是所有这些同框照片对应的亲密度之和。下面给定一批照片,请你分析一对给定的情侣,看看他们分别有没有亲密度更高的异性朋友?

daybreak_alonely的博客 1411

MAC编译OpenJDK8:详细步骤及问题解决办法(含独家解决办法)

  参考: https://blog.csdn.net/lizhengjava/article/details/105629780 https://www.cnblogs.com/micrari/p/7018474.html 安装JDK8 https://blog.csdn.net/quantum7/article/details/108448170 安装brew https://blog.csdn.net/quantum7/article/details/108452241 安装各种工具 br

柳鲲鹏 3787

深入STM32 USB OTG FS:从官方MSC例程到实战双存储设备移植全记录

本文详细解析了STM32 USB OTG FS在双存储设备开发中的实战应用,从协议栈底层机制到SD卡/SPI Flash同步挂载的实现。通过优化SDIO接口和SPI Flash驱动,结合USB MSC类的关键实现,提供了完整的解决方案和性能优化策略,适合嵌入式开发者参考。

weixin_28366475的博客 366

《深入理解JAVA虚拟机 ● 第三版》MacOS编译OpenJDK12

MacOS编译OpenJDK12编译环境编译准备OpenJDK12源码下载安装JDK11安装Xcode安装command line tools安装Homebrew安装依赖库 编译环境 MacOS Catalina 10.15.4 Xcode 11.5 command line tools Homebrew 2.2.5 编译准备 OpenJDK12源码下载 浏览器打开地址:https://hg.openjdk.java.net/jdk/jdk12/ 点击左侧Browse,将显示源码根目录页面: 点击左侧

m0_48212549的博客 1308

5分钟搞定Conflux钱包注册:Fluent钱包从安装到转账全流程指南

本文提供Conflux公链上Fluent钱包的完整注册和使用指南,涵盖从安装、助记词备份到CFX转账的全流程。特别强调安全操作要点,包括助记词保管和网络选择,帮助用户5分钟内快速掌握这款国产公链钱包的核心功能,确保数字资产安全。

weixin_29181861的博客 244

ESP32开发环境避坑指南:用Thonny烧录MicroPython固件时常见的5个错误及解决方法

本文针对ESP32开发新手,详细解析了使用Thonny IDE烧录MicroPython固件时最常见的5个错误及其解决方案。内容涵盖驱动安装、端口识别、固件烧录失败、版本兼容性、连接不稳定以及文件系统操作异常等核心痛点,并提供硬件层面的深度排查指南,帮助开发者高效搭建稳定的ESP32开发环境。

weixin_29189003的博客 404

《深入理解java虚拟机》第1章:从零开始编译 OpenJDK 7 源码

1.6实战:自己编译JDK 想要一探JDK内部的实现机制,最便捷的路径之一就是自己编译- -套JDK,通过阅读和跟踪调试JDK源码去了解Java技术体系的原理,虽然门槛会高一点,但肯定会比阅读各种书籍、文章更加贴近本质。另外,JDK中的很多底层方法都是本地化(Native) 的,需要跟踪这些方法的运作或对JDK进行Hack的时候,都需要自己编译套JDK。现在网络上有不少开源的JDK实现可以供我们选...

ywl470812087的博客 11万+

时间序列预测 | Python实现ARIMAX和VARMAX时间序列数据预测

时间序列预测 | Python实现ARIMAX和VARMAX时间序列数据预测 目录时间序列预测 | Python实现ARIMAX和VARMAX时间序列数据预测基本介绍ARIMAXVARVARMAVARMAXSESHWES参考资料 基本介绍 本文介绍ARIMAX、VAR、VARMA和VARMAX基本概念及其Python程序设计。 ARIMAX 具有外源回归量的自回归整合移动平均值(ARIMAX)是 ARIMA 模型的扩展,其还包括外生变量的建模。 外生变量也称为协变量,可以被认为是并行输入序列,其在与

前程算法屋的博客 6688

mac 编译 openjdk 2020版

mac 编译 openjdk 2020版 环境: 系统:macOS Catalina 10.15.4 Xcode版本: 10.15.2 Mercurial版本:5.2.2-macosx10.14 xcode-select:xcode-select version 2373 背景: 目前开发中用的是jdk1.8的版本,本想下载jdk8的openjdk研究一下,奈何编译过程中出现种种的错误导致编译失败,搞了快整整一天了(其实也就快9个多小时吧),最后失败告终(劝退)。但是总不能就这样算了吧,我直接下载了最新版

qq_29126467的博客 655

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Mac上编译OpenJDK,遇到的各种问题及其解决方法。

最近在阅读《深入理解Java虚拟机:JVM高级特性与最佳实践(第3版)》,所以…… 记录一次在编译OpenJDK12遇到的各种问题及解决方法。 这过程,,不足为外人道也。。不多说,上干货! 多事啊,刚上手的第一台Mac遇到15,变化了好多,遇到问题跟网上解决方式不一样。特别是zsh bash的区别。 准备环境! 这个直接同个App Store下载即可,而且它会自动添加安装Command Line Tools。 没有的话: xcode-select --install openjdk12源码下载 htt

qq_1905369638 1931

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

Mac OSX 10.9 上build openjdk8和openjdk7

        先分享下自己build出来的fastdebug版本的openjdk: openjdk7(24.80-b04), openjdk8(25.0-b70) =====================================================================================         由于想看下cms gc的debug日志...

田麦 314

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

自己动手编译JDK

源码编译openjdk8 macOS High Sierra 编译openjdk 8 本次编译使用的系统是 macOS High Sierra,版本为 10.13.2。使用的 jdk 是 openjdk 8 。 概述 openjdk 的模块,部分使用 C/C++ 编写实现,部分使用 Java 实现。因此除了需要 C/C++ 相关编译工具外,还需要有一个 JDK (Bootstrap

商宗海的博客 4187

自己动手编译一个Java

为了更好的体阅读验请到原文章 转送门 开始 这次编译的JDK为OpenJDK是开源的和OracleJDK(平常使用的Java)是差不多相似一样是使用HotSpot虚拟机。想更深入了解JVM就得去自己编译和调试JDK。带着内存是如何布局、内存是如何回收、类是如何加载等这些问题去学习会得到一个好的学习效果。 吐槽: (Write Once、Run Anywhere) 这个JDK花费我很多时间才编译好的,所以不想编译第二次了 /dog 以下需要安装的环境或软件可能需要外网,请自行配置代理。 官方编译参考文.

Error0 Blog·错误零 1367

Android 系统源码——下载到编译

一直想下载、编译、调试一下Android源码 ,加强对一些framework的理解,搞了好多次,终于可以正常调试了。这里进行一些总结和分享。 Android源码到模拟器运行,主要有的四个步骤: 下载源码 搭建编译环境 准备编译 我使用的环境是Ubuntu16.04 、openJDK8、Android 8.0.0 硬件软件要求 官方文档:要求 硬件要求: 如果是 Android 2.3.x (...

薛瑄的博客 4万+

macOS Catalina编译Android 7.1证书与JDK兼容性解决方案

HTTPS证书验证是现代开发中保障代码源可信性的基础机制,其核心依赖操作系统根证书信任链的正确配置。macOS Catalina(10.15+)重构了命令行工具的SSL信任模型,不再默认使用系统根证书库,而是强制通过钥匙串(Keychain)管理证书信任策略,导致git、curl、repo等工具在访问googlesource.com等HTTPS Git仓库时因证书链验证失败而连接被拒。这一变更直接影响AOSP源码同步、预编译工具下载等关键环节。同时,Android 7.1构建系统对JDK版本存在硬性约束——

weixin_29191669的博客 69

Apple Silicon Mac 上 JDK 8 报 CodeCache is full. Compiler has been disabled(used 才 24MB 也报满的排查与解决)

Apple Silicon Mac(新版 macOS)上用 JDK 8 启动 Spring 服务时报 CodeCache is full. Compiler has been disabled——缓存明明只用 24MB/256MB 却说满了。本文记录完整排查:jstat 确认 JIT 冻结、圈定 ARM64 版 JDK 8 在 macOS 15+ 的兼容性根因,并给出本地换 JDK 17 的解决方案。

weixin_48297291的博客 385
上一篇: 分库分表实践
下一篇: Microsoft To-Do List 、Mac Reminders 与OmniFocus相互同步方法及AppleScript脚本
lizhengjava
博客等级 码龄16年 16粉丝 14原创
评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值