https://kotlinlang.org logo
#ktor
Title
# ktor
c

charleskorn

05/11/2022, 9:00 AM
I am building a Kotlin/Native library, and just added a reference to
ktor-client-curl
to my Windows target (I’m using CIO for other targets). However, when I try to build and run the tests for Windows on a Windows runner on GitHub Actions, I get compilation errors (in thread) about missing symbols… any ideas on what I’m missing?
Copy code
> Task :client:linkDebugTestMingwX64
w: duplicate library name: org.jetbrains.kotlinx:atomicfu
w: duplicate library name: org.jetbrains.kotlinx:atomicfu-cinterop-interop
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: __mingw_init_ehandler
>>> referenced by E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt\crtexe.c:288
>>>               C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(__tmainCRTStartup)

lld-link: error: undefined symbol: __security_init_cookie
>>> referenced by E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt\crtexe.c:194
>>>               C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(.l_startw)
>>> referenced by E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt\crtexe.c:222
>>>               C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(.l_start)

lld-link: error: undefined symbol: mingw_app_type
>>> referenced by C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(.refptr.mingw_app_type)

lld-link: error: undefined symbol: mingw_initcharmax
>>> referenced by C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(.refptr.mingw_initcharmax)

lld-link: error: undefined symbol: mingw_initltssuo_force
>>> referenced by C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(.refptr.mingw_initltssuo_force)

lld-link: error: undefined symbol: mingw_initltsdyn_force
>>> referenced by C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(.refptr.mingw_initltsdyn_force)

lld-link: error: undefined symbol: mingw_initltsdrot_force
>>> referenced by C:\Users\runneradmin\.konan\dependencies\msys2-mingw-w64-x86_64-1\x86_64-w64-mingw32\lib\crt2.o:(.refptr.mingw_initltsdrot_force)

clang++: error: linker command failed with exit code 1 (use -v to see invocation)
If anyone else comes across this issue, I’ve filed https://youtrack.jetbrains.com/issue/KTOR-4307 - looks like it’s a bug.
74 Views