goankur commented on PR #13572:
URL: https://github.com/apache/lucene/pull/13572#issuecomment-2266340565

   > java --enable-native-access=ALL-UNNAMED \
   >        --enable-preview \
   >        -Djava.library.path="./lucene/core/build/libs/dotProduct/shared" \
   >        -jar 
lucene/benchmark-jmh/build/benchmarks/lucene-benchmark-jmh-10.0.0-SNAPSHOT.jar \
   >       regexp "(.*)?(binaryDotProductVector|dot8s)"
   
   
   
   > That is the fault of your graviton setup though, you can see it right in 
your previous `platforms` logic where it is invoking `cCompiler.executable 
'gcc10-cc'`.
   > 
   > Fix GCC to be in path correctly and things will work.
   
   Ok, So I tried exporting the `CC` environment variable and cleared gradle's 
config cache by executing  `./gradlew clean` but the I still get the same 
compilation error:
   
   ```
   ...
   Tool chain 'gcc' (GNU GCC):
              - Don't know how to build for platform 'linux_aarch64'.
    ...
   ```
   Seems like `CC` environment variable is not being honored.
   
   From [Gradle's 
documentation](https://docs.gradle.org/current/userguide/native_software.html#native_binaries:tool_chain)
 :
   
   ```
   So for GCC running on linux, the supported target platforms are 'linux/x86' 
and 'linux/x86_64'. 
   For GCC running on Windows via Cygwin, platforms 'windows/x86' and 
'windows/x86_64' are supported. 
   (The Cygwin POSIX runtime is not yet modelled as part of the platform, but 
will be in the future.)
   
   If no target platforms are defined for a project, then all binaries are 
built to target a default platform
   named 'current'. This default platform does not specify any architecture or 
operatingSystem value, 
   hence using the default values of the first available tool chain.
   ```
   
   I could be misinterpreting things but judging by the error, gradle's default 
toolchain pick - `gcc` does not know how to build for target platform - 
`linux_aarch64`. To fix this problem this the best I could do (also reflected 
in latest commit)
   
   ```
   toolChains {
        gcc(Gcc) {
             target("linux_aarch64") {
                 cCompiler.executable = System.getenv("CC")
             }
         }
        clang(Clang) {
            target("osx_aarch64"){
                cCompiler.executable = System.getenv("CC")
            }
        }
    }
   ```
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to