lightning-kmp
lightning-kmp copied to clipboard
link error: cannot find -lcurl
Fresh install of Ubuntu 20.04 I get the following link error using ./gradlew :build
after following build steps from BUILD.md . Any tips why the curl library is not being found?
> Task :linkDebugTestLinux
e: /home/remyers/.konan/dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/x86_64-unknown-linux-gnu/bin/ld.gold invocation reported errors
The /home/remyers/.konan/dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/x86_64-unknown-linux-gnu/bin/ld.gold command returned non-zero exit code: 1.
output:
/home/remyers/.konan/dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/x86_64-unknown-linux-gnu/bin/ld.gold: error: cannot find -lcurl
/tmp/konan_temp3788192268220484282/result.o:out:function libcurl_curl_global_init_wrapper23: error: undefined reference to 'curl_global_init'
/tmp/konan_temp3788192268220484282/result.o:out:function libcurl_curl_slist_append_wrapper27: error: undefined reference to 'curl_slist_append'
...cut
/tmp/konan_temp3788192268220484282/result.o:out:knifunptr_libcurl42_curl_easy_getinfo: error: undefined reference to 'curl_easy_getinfo'
> Task :linkDebugTestLinux FAILED
It seems like libcurl is installed
$ /sbin/ldconfig -p | grep curl
libcurl.so.4 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcurl.so.4
libcurl-gnutls.so.4 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcurl-gnutls.so.4
Our tests use ktor-client
which on linux depends on ktor-client-curl-linuxx64
.
It can be fixed with sudo apt install libcurl4-openssl-dev
@sstone I couldn't find anything in the build docs about that dependency. Should I do a PR to add it, or perhaps there is a link to the ktor-client dependencies I should add to BUILD.md ?
Thanks, btw, that did fix it!
I think that it's the only library that needs to be installed (on linux, it's not needed on macOS) but I will double check. AFAICT it's not documented anywhere....
Is this still an issue? If so, can you open a PR to fix this?