Anyone else having issues with Konanc going to lun...
# kotlin-native
s
Anyone else having issues with Konanc going to lunch linking on mingw64 builds? - trying to run tests and it hangs linking the test executable. Currently using multiplatform 1.3.70
a
Hello, @swishy! Can you tell a bit more on the case here?
s
@Artyom Degtyarev [JB] nothing in gradle output - clang and linker both just sit using no resources, left build going as I just headed out to meeting get back to the office 3 hours later and still spinning , windows 10 pro preview - 19577 , built in jdk or local openjdk 12 result in same issue - Intellij IDEA Ultimate 2019.3.3, linking against msys64 libxml2
build.gradle.kts contains
Copy code
mingwX64() {
        binaries {
            sharedLib {  }
        }
        compilations.getByName("main") {
            val libxml2 by cinterops.creating {
                defFile(project.file("src/nativeInterop/cinterop/libxml2.def"))
                packageName("libxml2")
                includeDirs(msysRoot.resolve("usr/include/libxml2"), msysRoot.resolve("usr/include"))
            }
        }
    }
klib is generated fine etc
libxml2.def
Copy code
headers = libxml/parser.h
headerFilter = libxml/*
linkerOpts.mingw = -L/usr/lib -lxml2 -lz -llzma -liconv -licui18n -licuuc -licudata -lpthread -lm -lm
@Artyom Degtyarev [JB] uncommented sharedLib generation and of course it hits the same issue also - gets stuck at
Task :linkDebugSharedMingwX64
Produced library API in kamin_api.h <=====--------> 39% EXECUTING [3m 24s]
:linkDebugSharedMingwX64
@Artyom Degtyarev [JB] looks like it was the linker flags
@Artyom Degtyarev [JB] its also linking against local git install regardless of the options passed to the build
stracing the test.exe shows it attempting to open libraries in c:\Program Files\Git\usr\bin rather than c:\msys64\usr\lib
@Artyom Degtyarev [JB] actually nm user error 😞
a
So, the problem was in the incorrect library paths?
s
yes and me not paying attention and attempting to use msys libraries not mingw