I've cross compiled an executable to run on Debian Stretch that requires a specific version of cURL (greater than 7.56) to run, and needs specific capabilities during execution. So on the executable I will run:

$ sudo setcap cap_net_raw,cap_net_admin+eip my_executable

After running this setcap, then running the executable, I will end up with the following error:

curl_easy_perform() failed: Out of memory

NOTE THIS ERROR IS EXPECTED DUE TO A BUG WITH EARLIER VERSIONS OF CURL. Hence why we need to upgrade to a cURL version above 7.56. In the case of the Raspberry Pi this is running on, the base version is 7.52, so my thought is that this is pointing to the older version of cURL despite the fact that I've updated the version of cURL in the system to be the latest release manually:

$ curl --version
curl 7.64.1 (armv7l-unknown-linux-gnueabihf) libcurl/7.64.1 OpenSSL/1.1.0j
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS HTTPS-proxy IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets

What's going on here? Does setcap cause the executable to dynamically link libraries from somewhere besides the standard usr/bin and usr/local/bin?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.