Macos library load disallowed by system policy

Tried to native compile the hello world example on macosx catalina with Kotlin/Native: 1.3.61

kotlinc-native installed by “brew cask install kotlin-native”

Got an error popup saying ‘“libllvmstubs.dylib” cannot be opened because the developer cannot be verified’. And in the stacktrace it says “code signature in (/path/to/libllvmstubs.dylib) not valid for use in process using Library Validation: library load disallowed by system policy”

I circumvented by running “sudo xattr -d /path/to/libllvmstubs.dylib”.
Looks like a missing apple codesign procedure somewhere

Anybody else seen this problem?

1 Like

Hello, @lvange! There was a similar issue here. We’re working on a more appropriate solution.
I would also notice that the most recent Kotlin version is 1.3.72, brew package is a community-maintained, so can lag behind a bit.

I ran into the same problem with 1.3.72 and had to fix 5 files in kotlin-native-macos-1.3.72/konan/nativelib/