-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code to cross compile x64 jdk8 on arm64 mac #3492
Add code to cross compile x64 jdk8 on arm64 mac #3492
Conversation
The x64 mac jdk8 build github workflow already uses xcode11.7 to build jdk8, so we've been building it this whole time with xcode11.7 😄 Ive made the |
@@ -135,6 +135,7 @@ jobs: | |||
run: | | |||
rm -rf /Applications/Xcode.app | |||
ln -s /Applications/Xcode_11.7.app /Applications/Xcode.app | |||
ln -s /Applications/Xcode_11.7.app /Applications/Xcode-11.7.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit strange - is this because the github actions runners have it in a different place from the default? i.e. with a _
instead of an -
and we have stuff hard coded to use the location with a -
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the runner has it in /Applications/Xcode_11.7.app while the build expects it to be in /Applications/Xcode-11.7.app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably one of those is the default location and the discrepancy isn't just because we've changed the default (in which case we'd be able to change it)?
Co-authored-by: Stewart X Addison <6487691+sxa@users.noreply.github.com>
Co-authored-by: Stewart X Addison <6487691+sxa@users.noreply.github.com>
Running the changes by kicking off an x64 jdk8 mac build on https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-mac-x64-temurin/377/console |
Installed git via brew onto test-macstadium-macos11-arm64-1. Its executable is in /opt/homebrew/bin. Ive added this to the front of the PATH for arm64 mac machines building jdk8 in the latest changes. Im hoping the PATH stays this way for the whole build, including post build where git will be used https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-mac-x64-temurin/392/console |
Thats strange, MACHINEARCITECTURE returned x86_64 on test-macstadium-macos11-arm64-1
|
Ok ive got it to use the right git, /opt/homebrew/bin/git, which wont fail while xcode11.7 is being used. But the build is behaving unusually on test-macstadium-macos11-arm64-1. It wont detect that it is an arm64 system therefore it isnt cross compiling, it is building it as if it is an x64 system |
Looking at the machine it looks like
Suggest comparing that with a machine that is behaving if you're seeing differences: |
Changed test-macstadium-macos11-arm64-1's agent to use an arm64 jdk17 binary. Kicked off a jdk8 build on test-macstadium-macos11-arm64-1 while Xcode11.7 is selected prebuild Strange behaviour
Uses /opt/homebrew/bin/git until |
On test-macstadium-macos11-arm64-1
|
Added /opt/homebrew/bin to the beginning of PATH in test-macstadium-macos11-arm64-1's jenkins config |
Build 396 looks good. But again I do not know why it didnt kick off the tests despite the parameters. While test-macstadium-macos11-arm64-1 is still switched to xcode11.7 I want to see if it affects the test jobs. https://ci.adoptium.net/job/AQA_Test_Pipeline/191/console |
I would imagine that this is because jenkins (which does some of the checkouts etc. itself) has a definition on the machine under "Tool locations" that says git isexplicitly |
ref #3492 (comment) But it has reared its head in the test jobs https://ci.adoptium.net/job/Test_openjdk8_hs_sanity.system_x86-64_mac/898/console
|
|
Ive installed brew
|
Kicked off the test jobs again with xcode11.7 selected before the jobs. https://ci.adoptium.net/job/AQA_Test_Pipeline/192/console https://ci.adoptium.net/job/Test_openjdk8_hs_sanity.functional_x86-64_mac/566/console looks good so far |
Ive installed make and git, and updated the jenkins config of the other 3 arm mac machines. Will add make and git to the playbooks |
Removed the debug bits. If https://ci.adoptium.net/job/AQA_Test_Pipeline/192/console completes without any errors related to this pr then this is pr can be merged (as far as I can see). If this does get merged, then the jdk8 x64 mac build job will need to be updated to allow it to run on arm64 mac machines and not the 1014 x64 mac machines |
https://ci.adoptium.net/job/AQA_Test_Pipeline/192/console failed I'm afraid |
linux jdk smoke test fails due to no space left on device
ping @andrew-m-leonard for review |
The last few tests failed because the link to the binary expired. I am not bothered by the failures as we have already shown an x64 jdk8 binary built this way to pass the AQA test pipeline job. The 192 run was to see if test jobs could still run on an arm mac machine that has selected xcode11.7, and they can. |
ref #3487, adoptium/infrastructure#2536 (comment), #3354 (comment)
Added the code/steps required to:
Considering the successful cross compilation builds of jdk11 17 and 20 in adoptium/infrastructure#2536 (comment) I could add the
--openjdk-target=x86_64-apple-darwin
option to$CONFIGURE_ARGS_FOR_ANY_PLATFORM
for any mac jdk cross compilation build not just jdk8 but thats up for discussion.One of the consequences of this PR is that we can no longer build x64 JDK8 on 1014 systems as Xcode11.7 needs macOS 10.15.2+. Of the Macos10 machines we have, only test-macstadium-macos1015-x64-1 fits this