https://kotlinlang.org logo
Title
a

Adam S

01/19/2023, 7:12 PM
I’m creating a cross-platform Kotlin Native library (for RocksDB). It’s working on Mac, but failing on Windows (and maybe also Linux?) I think because of a mismatched GCC version, as described in this issue: https://youtrack.jetbrains.com/issue/KT-51975
> Task :modules:rocksdb-interop:linkDebugTestMingwX64 FAILED
e: C:\Users\runneradmin\.konan\dependencies\llvm-11.1.0-windows-x64-essentials/bin/clang++ invocation reported errors
The C:\Users\runneradmin\.konan\dependencies\llvm-11.1.0-windows-x64-essentials/bin/clang++ command returned non-zero exit code: 1.
output:
lld-link: error: undefined symbol: std::__throw_bad_array_new_length()
(full log here) So I guess I need to figure out how to change the GCC version of the .a library. How can I find out what GCC version I should use for Kotlin 1.8? Is it the same as 1.7, 9.2.0?
s

sergey.bogolepov

01/19/2023, 8:41 PM
Yep
a

Adam S

01/30/2023, 11:05 PM
if Kotlin/Native is supposed to need gcc 9.2.0 then why does it download 8.3.0?
/Users/a/.konan/dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2
s

sergey.bogolepov

01/31/2023, 10:05 AM
It’s GCC 9.2.0 for MinGW64 and GCC 8.3.0 for Linux x86-64.