stooke / jdk8u-xcode10 Goto Github PK
View Code? Open in Web Editor NEWHow to compile JDK 8u with Xcode 9, 10, 11 or 12 on macOS. Also with Shenandoah and JavaFX
License: GNU General Public License v2.0
How to compile JDK 8u with Xcode 9, 10, 11 or 12 on macOS. Also with Shenandoah and JavaFX
License: GNU General Public License v2.0
Cloned the repo and issued the command to build the project but got several linker errors (huge console log).
Posting here the last two lines.
error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/nanda/apps/tools/freetype/objs/libfreetype.la] Error 1
Hi,
I tried to build jdk8 on both Mojave and High Sierra, but get the same FAILED error.
My command to build:
git clone https://github.com/stooke/jdk8u-xcode10.git
./jdk8u-xcode10/build8.sh
Error:
patching file common/autoconf/basics.m4
patching file common/autoconf/flags.m4
Hunk #5 succeeded at 676 (offset -12 lines).
Hunk #6 succeeded at 760 (offset -12 lines).
patching file common/autoconf/generated-configure.sh
Hunk #2 FAILED at 4376.
Hunk #10 succeeded at 42102 (offset -12 lines).
Hunk #11 succeeded at 42186 (offset -12 lines).
Hunk #12 succeeded at 48854 (offset -12 lines).
1 out of 12 hunks FAILED -- saving rejects to file common/autoconf/generated-configure.sh.rej
patching file common/autoconf/libraries.m4
patching file common/autoconf/platform.m4
patching file common/autoconf/toolchain.m4
I'm trying to use the script to build with the shenandoah GC, but I am getting this error after the script runs fine for several minutes.
...
/Users/user/Downloads/jdk8-shenandoah/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp:75:30: note: candidate function not viable: no known conversion from 'uintx *' (aka 'unsigned long *') to 'volatile jdouble *' (aka 'volatile double *') for 1st argument
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
^
Compiling /Users/user/Downloads/jdk8-shenandoah/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahFreeSet.cpp
rm -f shenandoahFreeSet.o
/usr/bin/clang++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DASSERT -DCHECK_UNHANDLED_OOPS -I. -I/Users/user/Downloads/jdk8-shenandoah/hotspot/src/share/vm/prims -I/Users/user/Downloads/jdk8-shenandoah/hotspot/src/share/vm -I/Users/user/Downloads/jdk8-shenandoah/hotspot/src/share/vm/precompiled -I/Users/user/Downloads/jdk8-shenandoah/hotspot/src/cpu/x86/vm -I/Users/user/Downloads/jdk8-shenandoah/hotspot/src/os_cpu/bsd_x86/vm -I/Users/user/Downloads/jdk8-shenandoah/hotspot/src/os/bsd/vm -I/Users/user/Downloads/jdk8-shenandoah/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"25.71-b00\"" -DHOTSPOT_BUILD_TARGET="\"fastdebug\"" -DHOTSPOT_BUILD_USER="\"user\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DINCLUDE_JFR=1 -DCOMPILER2 -DCOMPILER1 -include precompiled.hpp -fPIC -fno-rtti -fno-exceptions -fvisibility=hidden -m64 -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing -DMAC_OS_X_VERSION_MAX_ALLOWED=1090 -mmacosx-version-min=10.9.0 -flimit-debug-info -Os -g -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses -Wno-switch -Wno-tautological-compare -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess -Wno-empty-body -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2 -DDTRACE_ENABLED -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DALLOW_OPERATOR_NEW_USAGE -c -MMD -MP -MF ../generated/dependencies/shenandoahFreeSet.o.d -o shenandoahFreeSet.o /Users/user/Downloads/jdk8-shenandoah/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahFreeSet.cpp
1 error generated.
make[6]: *** [shenandoahControlThread.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [the_vm] Error 2
make[4]: *** [fastdebug] Error 2
make[3]: *** [generic_build2] Error 2
make[2]: *** [fastdebug] Error 2
make[1]: *** [/Users/user/Downloads/jdk8-shenandoah/build/macosx-x86_64-normal-server-fastdebug/hotspot/_hotspot.timestamp] Error 2
make: *** [hotspot-only] Error 2
I could not have any less of an idea what is going on here so I was hoping you would recognize this error...
Trying to install this, following along with README. It suggests the following to install patches:
cd jdk8u-dev
hg import --no-commit ../jdk8u-xcode10/jdk8u-patch/mac-jdk8u.patch
cd hotspot
hg import --no-commit ../../jdk8u-xcode10/jdk8u-patch/mac-jdk8u-hotspot.patch
cd ../jdk
hg import --no-commit ../../jdk8u-xcode10/jdk8u-patch/mac-jdk8u-jdk.patch
However, if I check my jdk8u-xcode10/jdk8u-patch
folder I don't have any patches with these names. All of my patches start with jdk8u
, none start with mac
. Is the README out of date, or have I missed a step somewhere?
it seems after applying this patch, make images cannot create macOS .dSYM
files. And we will run into wired build issues like this:
2020-12-22T06:15:14.8927420Z 1 warning generated.
2020-12-22T06:15:14.9013210Z 1 warning generated.
2020-12-22T06:15:14.9095870Z 1 warning generated.
2020-12-22T06:15:14.9180140Z /Users/runner/work/1/jdk/jdk/src/share/bin/main.c:132:21: warning: comparison of array 'const_jargs' not equal to a null pointer is always true [-Wtautological-pointer-compare]
2020-12-22T06:15:14.9255900Z (const_jargs != NULL) ? JNI_TRUE : JNI_FALSE,
2020-12-22T06:15:14.9357070Z ^~~~~~~~~~~ ~~~~
2020-12-22T06:15:14.9458630Z /Users/runner/work/1/jdk/jdk/src/share/bin/main.c:132:21: warning: comparison of array 'const_jargs' not equal to a null pointer is always true [-Wtautological-pointer-compare]
2020-12-22T06:15:14.9558530Z (const_jargs != NULL) ? JNI_TRUE : JNI_FALSE,
2020-12-22T06:15:14.9660960Z ^~~~~~~~~~~ ~~~~/Users/runner/work/1/jdk/jdk/src/share/bin/main.c:132:21: warning: comparison of array 'const_jargs' not equal to a null pointer is always true [-Wtautological-pointer-compare]
2020-12-22T06:15:14.9760330Z
2020-12-22T06:15:14.9861530Z (const_jargs != NULL) ? JNI_TRUE : JNI_FALSE,
2020-12-22T06:15:14.9962780Z ^~~~~~~~~~~ ~~~~
2020-12-22T06:15:15.0062990Z 1 warning generated.
2020-12-22T06:15:15.0164070Z 1 warning generated.
2020-12-22T06:15:15.0264350Z 1 warning generated.
2020-12-22T06:15:17.1795300Z cp: /Users/runner/work/1/jdk/build/macosx-x86_64-normal-server-release/jdk/objs/java_objs/java.dSYM: No such file or directory
2020-12-22T06:15:17.1798390Z make[2]: *** [/Users/runner/work/1/jdk/build/macosx-x86_64-normal-server-release/jdk/bin/java.dSYM] Error 1
Looking at otool -l libjsig.dylib
I see
cmd LC_VERSION_MIN_MACOSX
version 10.13
sdk 10.13
where 10.13 is the version of my build machine. I expected version 10.9
like the rest of the libs.
I couldn't find the definition of the MACOSX_DEPLOYMENT_TARGET environment variable (maybe i'm just blind).
According to the Apple documentation it's enough to build with SDK 10.9+
Using a newer SDK doesn’t affect your binary’s compatibility with earlier versions of macOS. Instead, version compatibility depends on the app’s deployment target
Also is there any chance that JDK-8226288 will be part of 8u242 (i guess not)?
Thanks for this repo, I was able to create a JDK with xcode 10.
But, I use packr
for creating ".app" folder for Mac.
packr requires a jre. But, jre cannot be found by packr as it is not there in the JDK.
Please help me to build a JDK which will also include JRE.
OpenJFX can be built with webkit and media by adding the command line flags
-PCOMPILE_WEBKIT=true
-PCOMPILE_MEDIA=true
to gradle
.
I tried building jdk with build.sh successfully built jdk8. But when tried building JavaFx multiple errors about missing file and jdk version showed up. After some of the issues about versions the clang command failed and did not let the build finish successfully. Please help me to build or in the meanwhile if you could provide some instructions about building jdk8 with JavaFx.
The javafx overlay fails on my machine (others too?) because JAVA_HOME is unset in the jdk build which means it picks up the system java. It then complains about jfxrt.jar being present there. Is there a reason for the unsetting of JAVA_HOME or is it just left over from some testing? Removing is seems to work for me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.