On Mac OS X 10.15.4 with the latest Docker client for Mac.
I run:
./makejdk-any-platform.sh -c --docker --sudo --jdk-boot-dir /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/ jdk8u
It builds successfully and toward the end it states:
Archiving the build OpenJDK image and compressing with gzip
OpenJDK JDK path will be jdk8u262-b02. JRE path will be jdk8u262-b02-jre
Archiving the build OpenJDK image and compressing with gzip
Your final archive was created at /openjdk/build/src/build/linux-x86_64-normal-server-release/images/OpenJDK.tar.gz
Moving the artifact to /openjdk//target/
Archiving the build OpenJDK image and compressing with gzip
Your final archive was created at /openjdk/build/src/build/linux-x86_64-normal-server-release/images/OpenJDK.tar.gz
Moving the artifact to /openjdk//target/
All done!
Removing container jdk8-hotspot
It's not clear if /openjdk//target/
is inside the container or on the host. Mac OS X 10.15.4 doesn't allow writing of directories to /
, so if it attempted to write it there then it should fail. If this is inside the docker container, I'd like some guidance on how to get it out.
I get a File not found when trying to run that on my machine (Mac 10.15.5). Raised => https://github.com/AdoptOpenJDK/openjdk-build/issues/1909
➜ openjdk-build git:(master) ✗ ./makejdk-any-platform.sh -c --docker --sudo --jdk-boot-dir /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/ jdk8u
Starting ./makejdk-any-platform.sh to configure, build (Adopt)OpenJDK binary
Parsing opt: -c
Possible opt arg: --docker
Parsing opt: --docker
Possible opt arg: --sudo
Parsing opt: --sudo
Possible opt arg: --jdk-boot-dir
Parsing opt: --jdk-boot-dir
Possible opt arg: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
Working dir is ./build/
[debug] COPY_MACOSX_FREE_FONT_LIB_FOR_JDK_FLAG=true
[debug] COPY_MACOSX_FREE_FONT_LIB_FOR_JRE_FLAG=true
JDK Image folder name: j2sdk-bundle/jdk*.jdk
JRE Image folder name: j2re-bundle/jre*.jre
Overriding JDK_BOOT_DIR, set to /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
Boot dir set to /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
/Users/[email protected]/Documents/Repos/openjdk-build/docker-build.sh: line 86: docker/dockerfile_generator.sh: No such file or directory
@M-Davies Between opening the issue and your response, we've moved onto generating the dockerfiles which are currently having a few teething issues. A PR should be in later today to get it working :) Thanks for spotting the above issue
@karianna As for where the resulting binary is:
https://github.com/AdoptOpenJDK/openjdk-build/blob/851fe1b72b53eb99b173498a6611a4327142063f/docker-build.sh#L183
/openjdk/target
refers to on the container, but the above line is effectively like a shared folder, so you should find the binary in openjdk-build/workspace/target/
on your host system, where openjdk-build
is whichever directory you ran makejdk-any-platform.sh
on :-)
I'll include in the PR mentioned above, a comment that says where it is the host system to make it clearer.
I'll include in the PR mentioned above, a comment that says where it is the host system to make it clearer.
@Willsparker What PR are you referring to?
I was referring to a PR I wanted to get in on friday:
A PR should be in later today to get it working :)
Unfortunately, I didn't get round to it, as there's some unforeseen headaches with the DockerfileCheck
job. It _should_ be in today. I'll put the fixes
tag in it once it's in so it's linked here :-)
@karianna Can you give it another try? https://github.com/AdoptOpenJDK/openjdk-build/pull/1912 has been merged
It builds but FYI - it comes across as being paused on:
Successfully configured OpenJDK with the FreeType library (libfreetype)!
Relocating freetype headers
Checking and download CaCerts dependency
Retrieving cacerts file if needed
Initialized empty Git repository in /openjdk/build/cacerts_area/.git/
Updating origin
From https://github.com/AdoptOpenJDK/openjdk-build
* [new branch] douph1-1834 -> origin/douph1-1834
* [new branch] filter_artifacts -> origin/filter_artifacts
* [new branch] fix-j9-freetype-on-windows -> origin/fix-j9-freetype-on-windows
* [new branch] gdams-patch-1 -> origin/gdams-patch-1
* [new branch] hggit -> origin/hggit
* [new branch] installer -> origin/installer
* [new branch] installer_filter -> origin/installer_filter
* [new branch] jdk10u -> origin/jdk10u
* [new branch] jitserver -> origin/jitserver
* [new branch] master -> origin/master
* [new branch] revert-1668-fix-checksum -> origin/revert-1668-fix-checksum
* [new branch] tellison-patch-1 -> origin/tellison-patch-1
* [new tag] v1.0.0 -> v1.0.0
* [new tag] v1.0.1 -> v1.0.1
* [new tag] v2.0.0 -> v2.0.0
From https://github.com/AdoptOpenJDK/openjdk-build
* branch master -> FETCH_HEAD
Didn't find any existing openjdk repository at /openjdk/build/./build/ so cloning the source to openjdk
git clone --depth=1 https://github.com/adoptopenjdk/openjdk-jdk8u.git /openjdk//./build//src
Cloning into '/openjdk//./build//src'...
Checking out files: 100% (46062/46062), done.
checkoutRequiredCodeToBuild:
workspace = /openjdk//./build//src
BUILD_VARIANT = hotspot
TAG =
BRANCH = dev
We'll need to add a warning there saying this may take 30+ mins. At the end I got:
...
Your final archive was created at /openjdk/build/src/build/linux-x86_64-normal-server-release/images/OpenJDK.tar.gz
Moving the artifact to /openjdk//target/
All done!
The finished image can be found in /Users/karianna/Documents/workspace/adoptopenjdk/openjdk-build/workspace/target on the host system
Removing container jdk8-hotspot
Password:
xargs: sudo docker: No such file or directory
So it looks like it did the right thing :-)
Most helpful comment
@M-Davies Between opening the issue and your response, we've moved onto generating the dockerfiles which are currently having a few teething issues. A PR should be in later today to get it working :) Thanks for spotting the above issue
@karianna As for where the resulting binary is:
https://github.com/AdoptOpenJDK/openjdk-build/blob/851fe1b72b53eb99b173498a6611a4327142063f/docker-build.sh#L183
/openjdk/target
refers to on the container, but the above line is effectively like a shared folder, so you should find the binary inopenjdk-build/workspace/target/
on your host system, whereopenjdk-build
is whichever directory you ranmakejdk-any-platform.sh
on :-)I'll include in the PR mentioned above, a comment that says where it is the host system to make it clearer.