Problems building foreign-memaccess+abi on MacOS
Jorn Vernee
jorn.vernee at oracle.com
Tue Apr 13 10:23:40 UTC 2021
Hi Lee,
To run all the foreign tests you can use:
make run-test-jdk_foreign run-test-jdk_jextract
Jorn
On 12/04/2021 20:33, leerho wrote:
> Success!
>
> I was already using clang 9.0.0, but I had renamed the root directory of
> clang to "9.0.0" and installed it in a parallel directory to the
> "clang/12.0.0" in the Xcode tree.
>
> This time I downloaded 9.0.1, kept the root directory the same:
> "clang+llvm-9.0.1-x86_64-apple-darwin" and saved it in my local account.
>
> It completes the configure phase just fine. I installed the JTreg and am
> able to run tests,
> but I do get a few FMA failures due to "obsolete or changed code". I
> presume this is because the code is still volatile.
>
> Is there a way to run just the FMA tests without testing the entire JVM?
>
> Thanks!
>
> Lee.
>
>
> On Sat, Apr 10, 2021 at 2:28 PM Maurizio Cimadamore <
> maurizio.cimadamore at oracle.com> wrote:
>
>> Did you download and installed a full image from here?
>>
>> https://releases.llvm.org/download.html
>>
>> I don't think the build can pick up the `clang` compiler that is
>> installed on your system.
>>
>> I'm sure Sundar can help here as he's using Panama build with MacOS
>> regularly. But if you have not tried, try to get a full binary distro
>> from the LLVM website, install it, and then point the build there using
>> --with-libclang=<path>
>>
>> Maurizio
>>
>>
>>
>> On 10/04/2021 20:58, leerho wrote:
>>> 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)
>>>>
>>> clang version 9.0.0 also installed.
>>>
>>> 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.
>>>
>>> ####
>>> 1. 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
>>> 2. 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
>>> 3. I also tried overriding the default version of clang with the option
>>> *--with-libclang-version=12.0.0, *which also failed.
>>>
>>> 4. I submitted a request for help from build-dev at openjdk.java.net, which
>>> responded with the following:
>>>
>>>> The libclang dependency is specific to the Panama project. I would
>>>> recommend asking for help on this particular problem on panama-dev.
>>>>
>>>> /erik.joelsson at oracle.com
>>> Any suggestions would be greatly appreciated.
>>>
>>> Lee.
More information about the panama-dev
mailing list