napperley
07/12/2021, 11:22 PM/home/napperley/.konan/dependencies/arm-unknown-linux-gnueabihf-gcc-8.3.0-glibc-2.19-kernel-4.9-2/arm-unknown-linux-gnueabihf/bin/ld.bfd: /mnt/pi_image/usr/lib/arm-linux-gnueabihf/libgdk-3.so: undefined reference to `wl_display_dispatch_pending'
However if Kotlin 1.4.31 is used then none of the errors appear, and the build is successful.
In the build output there are a boatload of warnings about missing libraries (at the linking stage) if Kotlin 1.5.0 or later is used, eg:
/home/napperley/.konan/dependencies/arm-unknown-linux-gnueabihf-gcc-8.3.0-glibc-2.19-kernel-4.9-2/arm-unknown-linux-gnueabihf/bin/ld.bfd: warning: libpcre.so.3, needed by /mnt/pi_image/usr/lib/arm-linux-gnueabihf/libglib-2.0.so, not found (try using -rpath or -rpath-link)
Are there some additional linking options that need to be passed to the linker to resolve the errors, and if so which ones?napperley
07/13/2021, 1:17 AM--allow-shlib-undefined
flag to linkerOpts for the linuxArm32Hfp target (not the linuxX64 target) in the gtk3.def files, eg:
linkerOpts = -lgtk-3 -lgdk-3 -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo
linkerOpts.linux_x64 = -L/usr/lib/x86_64-linux-gnu
linkerOpts.linux_arm32_hfp = --allow-shlib-undefined -L/mnt/pi_image/usr/lib/arm-linux-gnueabihf
napperley
07/13/2021, 1:20 AMnapperley
07/13/2021, 1:22 AMnapperley
07/13/2021, 1:25 AMnapperley
07/13/2021, 1:27 AMnapperley
07/13/2021, 1:31 AM--allow-shlib-undefined
linker option. Essential for cross compilation with the Linux ARM targets.napperley
07/14/2021, 9:36 PMandylamax
07/14/2021, 9:41 PMnapperley
07/14/2021, 9:49 PMnapperley
07/14/2021, 9:52 PMheaders = curl.h
linkerOpts = -L/usr/lib/x86_64-linux-gnu -lcurl
napperley
07/14/2021, 9:55 PM// ...
kotlin {
linuxX64 {
// ...
cinterops.create("curl") {
includeDirs("/usr/include/x86_64-linux-gnu/curl")
}
}
}
// ...
With the example above the cinterop is being created for the curl.def file.andylamax
07/14/2021, 9:55 PMandylamax
07/14/2021, 9:56 PMnapperley
07/14/2021, 9:57 PMnapperley
07/14/2021, 9:58 PMandylamax
07/14/2021, 10:00 PMnapperley
07/14/2021, 10:00 PMnapperley
07/14/2021, 10:02 PMandylamax
07/15/2021, 6:39 AMandylamax
07/15/2021, 7:37 AMapt-get install libcurl4-openssl-dev
did the trick. Thanks alot for your help. My linux tests are passing nownapperley
07/15/2021, 10:48 PMandylamax
07/16/2021, 2:22 AM