I am trying to install OpenJDK8 on macOS Big Sur Version 11.6 via homebrew. I have XCode installed on my machine
~ » brew install --build-from-source openjdk@8 130 ↵ naman@NehaNamans-MBP
==> Downloading https://cdn.azul.com/zulu/bin/zulu7.48.0.11-ca-jdk7.0.312-macosx_x64.tar.gz
Already downloaded: /Users/naman/Library/Caches/Homebrew/downloads/f5fe893278c9e68c337604d92cf3e326951f170bdec8045920961dc35829351d--zulu7.48.0.11-ca-jdk7.0.312-macosx_x64.tar.gz
==> Downloading https://openjdk-sources.osci.io/openjdk8/openjdk8u302-ga.tar.xz
Already downloaded: /Users/naman/Library/Caches/Homebrew/downloads/9b4c6c47126f0ca0b976fa7f0cfb9a6aa99a23e587e35ad49812c9d06bc95ec9--openjdk8u302-ga.tar.xz
==> common/autoconf/autogen.sh
==> ./configure --with-boot-jdk-jvmargs=-Duser.home=/Users/naman/Library/Caches/Homebrew/java_cache --with-boot-jdk=/private/tmp/openjdkA8-20211016-20304-10w7kza/jdk8u302-ga/boot-jdk --with-debug-level=re
Last 15 lines from /Users/naman/Library/Logs/Homebrew/openjdk@8/02.configure:
checking for javah in Boot JDK... ok
checking for javap in Boot JDK... ok
checking for jar in Boot JDK... ok
checking for rmic in Boot JDK... ok
checking for native2ascii in Boot JDK... ok
checking if Boot JDK is 32 or 64 bits... 64
checking flags for boot jdk java command ... -Duser.home=/Users/naman/Library/Caches/Homebrew/java_cache
checking flags for boot jdk java command for big workloads... -Xms64M -Xmx1600M -XX:ThreadStackSize=1536 -XX:PermSize=32m -XX:MaxPermSize=160m
checking flags for boot jdk java command for small workloads... -XX:+UseSerialGC -Xms32M -Xmx512M
configure: Xcode major version: 13
configure: Using default toolchain clang (clang/LLVM)
checking Determining if we need to set DEVELOPER_DIR... no
checking for xcodebuild... /usr/bin/xcodebuild
configure: error: Xcode 6, 9-12 is required to build JDK 8, the version found was 13.0. Use --with-xcode-path to specify the location of Xcode or make Xcode active by using xcode-select.
configure exiting with result code 1
Do not report this issue to Homebrew/brew or Homebrew/core!
I tried executing the following command to just validate, if its possible to override the args:
brew install --build-from-source --with-xcode-path "/Applications/Xcode.app/Contents/Developer" openjdk@8
but close to what I was expecting, ended up with
Error: invalid option: --with-xcode-path
Realising further, that I need to ensure that the command within this formula, needs to be overridden, but I am unable to execute it that way either:
./configure --with-boot-jdk-jvmargs=-Duser.home=/Users/naman/Library/Caches/Homebrew/java_cache --with-boot-jdk=/private/tmp/openjdkA8-20211016-20304-10w7kza/jdk8u302-ga/boot-jdk --with-debug-level=re