[foreign] Running tests on Windows

Jorn Vernee jbvernee at xs4all.nl
Wed Sep 19 20:51:51 UTC 2018


Henry Jen schreef op 2018-09-19 20:49:
>> On Sep 19, 2018, at 10:50 AM, Jorn Vernee <jbvernee at xs4all.nl> wrote:
>> 
>> Henry Jen schreef op 2018-09-19 19:11:
>>> On Sep 19, 2018, at 9:07 AM, Jorn Vernee <jbvernee at xs4all.nl> wrote:
>>>> Henry Jen schreef op 2018-09-19 17:23:
>>>>> On Sep 19, 2018, at 5:00 AM, Jorn Vernee <jbvernee at xs4all.nl> 
>>>>> wrote:
>>>>>> And then of course one of the biggest things is getting jextract 
>>>>>> to build and run. Currently the build system is not picking up 
>>>>>> libclang. When explicitly specifying it with 
>>>>>> --with-libclang='/cygdrive/j/LLVM' I still get the "Cannot locate 
>>>>>> libclang!" warning. I wanted to ask what value and files it's 
>>>>>> actually looking for? (I've also tried some of the additional 
>>>>>> flags from makeautoconf/lib-clang.m4, but to no avail).
>>>>> —with-libclang should point to a directory has include/clang-c and
>>>>> lib/libclang.dll. If include and lib are not under the same 
>>>>> directory,
>>>>> you can use —with-libclang-include and —with-libclang-lib instead.
>>>> I have tried all of these flags together:
>>>> --with-libclang=/cygdrive/j/LLVM 
>>>> --with-libclang-include=/cygdrive/j/LLVM/include 
>>>> --with-libclang-include-aux=/cygdrive/j/LLVM/lib 
>>>> --with-libclang-lib=/cygdrive/j/LLVM/bin
>>> Try remove —with-libclang and use the rest three. Explicit setting
>>> —with-libclang cause the other options to be ignored.
>> 
>> Still the same problem I'm afraid.
>> 
>> It's probably kind of hard to debug this remotely, so for now I'll 
>> focus on getting the other tests to work, and come back to this later.
>> 
> 
> I believe you still need to point —with-libclang-lib tp
> /cygdrive/j/LLVM/lib to link with the library.
> Just to test the theory, if you can try following,
> 
> 1. Make sure j:\LLVM\bin is in your PATH environment variable,
> 2. Use only —with-libclang=/cygdrive/j/LLVM
> 
> Above should be enough to get the build detect clang and build.
> However, we have a problem in build system assuming .dll can be copied
> from the lib folder, that we will have to fix.

Sorry, still not detecting it. I'm still seeing:

checking clang-c/Index.h usability... no
checking clang-c/Index.h presence... no
checking for clang-c/Index.h... no
configure: Cannot locate libclang! You can download pre-built llvm
         binary from http://llvm.org/releases/download.html, then specify 
the
         location using --with-libclang

So it seems like it can't find the header files?

I think I've found at least part of the problem though, looking at 
config.log, it looks like:

configure:59831: result: no
configure:60239: checking clang-c/Index.h usability
configure:60239: 
/cygdrive/j/progra~2/micros~2/2017/buildt~1/vc/tools/msvc/1414~1.264/bin/hostx86/x64/cl 
-c    -I/cygdrive/j/LLVM/include conftest.cpp >&5
conftest.cpp
conftest.cpp(52): fatal error C1083: Cannot open include file: 
'clang-c/Index.h': No such file or directory
Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26430 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

I've tested that command with a test file that just has `#include 
"clang-c/Index.h"` in it and it's working when I'm using window's native 
terminal, PowerShell, but not when I use cygwin and using either a unix 
style path `-I/cygdrive/j/LLVM/include` or a windows style path `-I 
J:\LLVM\include`. I thought maybe it had to do with the `-` in the 
folder name, but if I remove that and try again I still get a failing 
result.

So it seems to be a problem with cygwin.

Jorn


More information about the panama-dev mailing list