Build problems on MacOS

leerho leerho at gmail.com
Fri Apr 9 06:08:55 UTC 2021


Hello,

I have forked foreign-memaccess+abi
<https://github.com/openjdk/panama-foreign/tree/foreign-memaccess+abi> in
preparation for making some code contributions.

However, I have been unsuccessful in getting this project to pass the 'bash
configure' phase as detailed below:

This is my environment:

> MacBook Pro (15-inch, 2018)
> 2.6 GHz 6-core, Intel Core i7
> 32GB RAM, 248GB Flash Storage available of 500GB
> MacOS: Big Sur, version 11.2.3
> Xcode Version 12.4 (12D4e)
> Xcode Command Line Tools are already installed
> Apple clang version 12.0.0 (clang-1200.0.32.29)
> Target: x86_64-apple-darwin20.3.0
> autoconf 2.71 installed
> echo $JAVA_HOME
>     AdoptOpenJDK 15:
> /Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home


Note: In the referenced building.md
<https://github.com/openjdk/panama-foreign/blob/foreign-jextract/doc/building.md>
page
from the README.md the reference to the blog page (for suggestions on
managing multiple Xcode versions)
<http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html> is
a bad link.

####
When I run
*bash configure *
I get the error:

> error: Cannot locate libclang! You can download pre-built llvm
>             binary from http://llvm.org/releases/download.html, then
> specify the
>             location using --with-libclang


Specifying the path to libclang, (it expects clang 9.0.0, which I installed
in a parallel directory to the clang 12.0.0, which comes with Xcode.)
*bash configure
--with-libclang=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/clang/9.0.0*
I get the error:

> checking libclang version to be used... 9 (default)
> checking libclang auxiliary include path...
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include
> checking for clang-c/Index.h... no
> configure: error: Cannot locate libclang or headers at the specified
> locations:
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
> configure exiting with result code 1


 I also tried overriding the default version of clang with the option
*--with-libclang-version=12.0.0,
*which also failed.

Any suggestions would be greatly appreciated.

Lee.



More information about the build-dev mailing list