Open atl-nick opened 8 months ago
I don't have access to macos. Seems like it should actually be packaging
(see here) instead of packageBuildResults
.
I opened this PR for testing purposes, could you try this out @atl-nick ?
Thanks for looking at this, @rollf.
It still fails as mentioned in the report with, Failed to load native library 'libnative-platform.dylib' for Mac OS X aarch64
, if we don't set GRADLE_USER_HOME
before running gradle. Others have reported this problem, e.g. here, though I don't know why it only seems to affect the macos build in this case.
If I export GRADLE_USER_HOME=$(mktemp -d)
then it gets a bit further but still ultimately fails with:
Running phase: updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./make/autoconf/build-aux/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./make/autoconf/build-aux/config.guess
Running phase: buildPhase
Welcome to Gradle 7.6.3!
Here are the highlights of this release:
- Added support for Java 19.
- Introduced `--rerun` flag for individual task rerun.
- Improved dependency block for test suites to be strongly typed.
- Added a pluggable system for Java toolchains provisioning.
For more details see https://docs.gradle.org/7.6.3/release-notes.html
> Task :prebuild:copyToolSrc
> Task :prebuild:buildTool
> Task :prebuild:generateJdkCacerts
> Task :prebuild:importAmazonCacerts
Importing keystore /private/tmp/nix-build-corretto-11.0.20.9.1.drv-1/source/amazon-cacerts to cacerts...
Entry for alias trustwaveglobalcertificationauthority successfully imported.
Entry for alias twcaglobalrootca successfully imported.
Entry for alias ucaglobalg2root successfully imported.
Entry for alias emsignrootca-g1 successfully imported.
Entry for alias gtsrootr4 successfully imported.
Entry for alias emsigneccrootca-g3 successfully imported.
Entry for alias gtsrootr3 successfully imported.
Entry for alias gtsrootr2 successfully imported.
Entry for alias globalsignrootr46 successfully imported.
Entry for alias gtsrootr1 successfully imported.
Entry for alias anfsecureserverrootca successfully imported.
Entry for alias oistewisekeyglobalrootgcca successfully imported.
Entry for alias izenpe.com successfully imported.
Entry for alias e-szignorootca2017 successfully imported.
Entry for alias tubitakkamusmsslkoksertifikasi-surum1 successfully imported.
Entry for alias acraizfnmt-rcm successfully imported.
Entry for alias oistewisekeyglobalrootgbca successfully imported.
Entry for alias atostrustedroot2011 successfully imported.
Entry for alias certumtrustedrootca successfully imported.
Entry for alias certsignrootca successfully imported.
Entry for alias naverglobalrootcertificationauthority successfully imported.
Entry for alias cfcaevroot successfully imported.
Entry for alias securesignrootca11 successfully imported.
Entry for alias accvraiz1 successfully imported.
Entry for alias microsoftrsarootcertificateauthority2017 successfully imported.
Entry for alias emsignrootca-c1 successfully imported.
Entry for alias gdcatrustauthr5root successfully imported.
Entry for alias emsigneccrootca-c3 successfully imported.
Entry for alias certsignrootcag2 successfully imported.
Entry for alias cadisigrootr2 successfully imported.
Entry for alias hongkongpostrootca3 successfully imported.
Entry for alias globaltrust2020 successfully imported.
Entry for alias microsofteccrootcertificateauthority2017 successfully imported.
Entry for alias secureglobalca successfully imported.
Entry for alias ucaextendedvalidationroot successfully imported.
Entry for alias trustwaveglobaleccp256certificationauthority successfully imported.
Entry for alias globalsignroote46 successfully imported.
Entry for alias microsece-szignorootca2009 successfully imported.
Entry for alias szafirrootca2 successfully imported.
Entry for alias autoridaddecertificacionfirmaprofesionalcifa62634068 successfully imported.
Entry for alias twcarootcertificationauthority successfully imported.
Entry for alias netlockarany(classgold)ftanstvny successfully imported.
Entry for alias trustwaveglobaleccp384certificationauthority successfully imported.
Entry for alias certumtrustednetworkca2 successfully imported.
Entry for alias certumec-384ca successfully imported.
Entry for alias comodocertificationauthority successfully imported.
Entry for alias certignarootca successfully imported.
Entry for alias ssl.comevrootcertificationauthorityecc successfully imported.
Entry for alias acraizfnmt-rcmservidoresseguros successfully imported.
Import command completed: 49 entries successfully imported, 0 entries failed or cancelled
Warning:
<certsignrootca> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
<securesignrootca11> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
<accvraiz1> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
<secureglobalca> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
<autoridaddecertificacionfirmaprofesionalcifa62634068> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
<twcarootcertificationauthority> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
<comodocertificationauthority> uses the SHA1withRSA signature algorithm which is considered a security risk. This algorithm will be disabled in a future update.
> Task :prebuild:copyCacerts
> Task :installers:mac:tar:copySource
> Task :openjdksrc:sourceDistributionTarball
> Task :installers:mac:tar:configureBuild FAILED
Runnable configure script is not present
Generating runnable configure script at /private/tmp/nix-build-corretto-11.0.20.9.1.drv-1/source/installers/mac/tar/corretto-build/buildRoot/build/.configure-support/generated-configure.sh
Autoconf is not found on the PATH, and AUTOCONF is not set.
You need autoconf to be able to generate a runnable configure script.
Error: Cannot find autoconf
I guess that error is caused by this issue. (It seems to be fixed by adding which
to nativeBuildInputs
.) However, that leads to:
Runnable configure script is not present
Generating runnable configure script at /private/tmp/nix-build-corretto-11.0.20.9.1.drv-1/source/installers/mac/tar/corretto-build/buildRoot/build/.configure-support/generated-configure.sh
Using autoconf at /nix/store/fxx9fci30k4jwn60nk686q9zazgrk9s0-autoconf-2.72/bin/autoconf [autoconf (GNU Autoconf) 2.72]
configure: Configuration created at Fri Feb 23 11:38:05 UTC 2024.
...
checking if custom source is suppressed (openjdk-only)... no
checking which variant of the JDK to build... normal
checking which debug level to use... release
checking which variants of the JVM to build... server
checking if absolute paths should be allowed in the build output... no, release build
checking for sdk name...
configure: error: No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK
configure exiting with result code 1
Not sure where to go from there.
Ah, sorry, I forgot to add the GRADLE_USER_HOME
. As per this comment, the openjdk build on darwin is actually zulu so some/all (of my) assumptions about the build might be completely wrong. I do not have access to any darwin system so I won't be able to work in this in an efficient way. I'll still update the draft PR with the latest findings to have a common ground for further research.
@atl-nick Could you maybe share how you managed to fix the autoconf
issue? I have added which
to the path but it still gives this error..
Sorry @rollf, my bad. Double checked and I actually added both which
and autoconf269
.
The problem still persists failed to load native library 'libnative-platform.dylib' for Mac OS X aarch64
(btw. corretto21 is already out)
@spe888 Progress is documented here. I will add corretto21 independently.
I would very much like to install any of the corretto versions (preferably 17) but I'm running into this issue as probably any other macOS user currently is.
If there's any build testing etc. I can offer on an ARM64 Mac then I'm more than happy to!
@HealsCodes Thank you for suggestions. I'd love to work on this personally but I do not have any macOS at hand. I am happy to give you write access to my nixpkgs fork so you could work/test on this PR. Let me there if you want.
Is there any update/hope here? I am consistently getting this error for corretto11, corretto17, and corretto21 on both amd64 macOS and arm64 macOS.
Describe the bug
corretto{11,17,19} doesn't build correctly on macos.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expect a shell with
corretto11
installed.Screenshots
Additional context
I tried setting
GRADLE_USER_HOME
to a temp directory viaexport GRADLE_USER_HOME=$(mktemp -d)
but then I get a different error,Cannot locate tasks that match ':installers:mac:tar:packageBuildResults' as task 'packageBuildResults' not found in project ':installers:mac:tar'.
This also makes sense because the corresponding task doesn't exist in the gradle file.Notify maintainers
@rollf
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.