macOS High Sierra, version 10.13.2 configure: error: Could notfind freetype! You might be able to fix this by running 'brew installfreetype'

mbl maobaolong at
Tue Feb 13 09:41:08 UTC 2018

Thank you for your kind help, I’ve jump out of the last pit.

Now the new challenge is:

I execute the following command:

 bash ../8dev/configure  --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home --with-freetype=/usr/local/Cellar/freetype/2.9/ --enable-ccache --with-jvm-variants=server --with-boot-jdk-jvmargs="-Xlint:deprecation -Xlint:unchecked" --disable-zip-debug-info   MAKE=/Applications/

But I see the following error

dyld: Library not loaded: @rpath/DVTFoundation.framework/Versions/A/DVTFoundation
  Referenced from: /Applications/
  Reason: no suitable image found.  Did find:
	/Applications/ cannot load '/Applications/' because Objective-C garbage collection is not supported
xcrun: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
xcrun: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch
configure: error: Xcode 4 is required to build JDK 8, the version found was . Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select.
configure exiting with result code 1

Please help me more. Thank your advance!

My Env is:

OS: macOS High Sierra, version 10.13.
Repo : <>
Tags:  jdk8u162-b12 <>

Other info:

The configure error pick me to mv my default xcode (9.0.4) to a backup as `/Applications/`. I install Xcode4.6.3 to `Applications/`, and execute `sudo xcode-select -switch /Applications/` to active it.

> On 13 Feb 2018, at 02:47, Erik Joelsson <erik.joelsson at> wrote:
> Hello,
> I just tried this myself and configure is automatically picking up my freetype from brew in /usr/local/opt/freetype/. Looking at my log, this is done using pkg-config from brew. So you could try installing pkg-config (brew install pkg-config). You can also try adding --with-freetype=/usr/local/opt/freetype if that's where brew installed it for you.
> /Erik
> On 2018-02-11 22:51, mbl wrote:
>> OS: macOS High Sierra, version 10.13.2
>> Repo :
>> Branch : jdk/jdk
>> mbldeMacBook-Pro:openjdk mbl$ bash ./configure --with-boot-jdk=/Library/Java/JavaVirtualMachines/jdk9.0.4.jdk/Home
>> configure: Configuration created at Mon Feb 12 14:43:36 CST 2018.
>> configure: error: Could not find freetype! You might be able to fix this by running 'brew install freetype'.
>> /projects/jdpros/openjdk/.build/ line 82: 5: Bad file descriptor
>> configure exiting with result code 1
>> mbldeMacBook-Pro:openjdk mbl$ sudo brew install freetype
>> Password:
>> Error: Running Homebrew as root is extremely dangerous and no longer supported.
>> As Homebrew does not drop privileges on installation you would be giving all
>> build scripts full access to your system.
>> mbldeMacBook-Pro:openjdk mbl$ brew install freetype
>> Updating Homebrew...
>> Warning: freetype 2.9 is already installed
>> What can I do?

More information about the build-dev mailing list