Building JDK9 fails on OS X El Capitan

Robin Stevens stevensro at gmail.com
Thu Jul 7 18:31:43 UTC 2016


Hello,

it is currently not possible to build JDK9 on OS X El Capitan.

The problem is the line

#include <Accelerate/Accelerate.h>

in files

jdk/src/java.desktop/macosx/native/libawt_lwawt/font/CGGlyphImages.m
jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/ImageSurfaceData.m

On OS X El Capitan, the Accelerate.h file contains

#ifndef __VECLIB__
#include <vecLib/vecLib.h>
#endif

where vecLib.h contains

#error "The vecLib framework is deprecated. Please include
<Accelerate/Accelerate.h> instead of <vecLib/vecLib.h> and link to the
Accelerate framework instead of the vecLib framework."

This is also the error with which the build fails.

Adding

#define __VECLIB__

to the two aforementioned files resolves the error, as it avoids that the
Accelerate.h file loads the vecLib.h file.

I have no idea of the impact of adding #define __VECLIB__ , and what it
might break.
The purpose of this email is more to ensure that other people who stumble
against the same problem can find a solution using Google.

Regards,

Robin



More information about the build-dev mailing list