Have a bizarre situation when running a Kotlin Nat...
# kotlin-native
n
Have a bizarre situation when running a Kotlin Native binary. In a project managed by Gradle when running build/konan/bin/linux_x64/weather.kexe (the binary) it segfaults. However if weather (a symbolic link to build/konan/bin/linux_x64/weather.kexe) is run from the project directory it doesn't segfault.
Made some changes in the project and ran
Copy code
./gradew build
. Ran build/konan/bin/linux_x64/weather.kexe again and it doesn't segfault this time, really weird.
The program outputs something similar to the following , when the location flag is set:
Copy code
./weather -l="christchurch,nz"
Fetching weather information (for christchurch,nz)...
Response Status: HTTP/1.1 200 OK
Weather information:
{
	"placeName":	"Christchurch",
	"countryCode":	"NZ",
	"humidity":	100,
	"desc":	{
		"temp":	6,
		"minTemp":	6,
		"maxTemp":	6
	},
	"conditions":	[{
			"name":	"Clear",
			"desc":	"clear sky"
		}]
}
o
hard to tell from the example, main difference would be the current working directory, I guess
n
The Weather sample can be found here: https://gitlab.com/napperley/openfaas-weather-sample/tree/1baa610182901e52399026afbc58a7b77a459fc6 Note that the link is referring to a specific Git revision.