0

I've faced a problem with Jessie dependencies. My program was cross compiled on another machine and compilation was ok. It depends on libcurl.so (libcurl.so.4).

When I run it, it complains on:

 /usr/lib/arm-linux-gnueabihf/libgnutls-deb0.so.28: undefined symbol: nettle_salsa20_crypt

My program does not depend directly on libgnutls nor on libnettle4:

# readelf -d modules/modhttp.so | grep "NEEDED"
 0x00000001 (NEEDED)                     Shared library: [libcurl.so.4]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

# ldd modules/modhttp.so
    linux-vdso.so.1 (0x7ede5000)
    /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f21000)
    libcurl.so.4 => /usr/lib/arm-linux-gnueabihf/libcurl.so.4 (0x76ea9000)
    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76dcd000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76d52000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76d25000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76be4000)
    libidn.so.11 => /usr/lib/arm-linux-gnueabihf/libidn.so.11 (0x76ba2000)
    librtmp.so.1 => /usr/lib/arm-linux-gnueabihf/librtmp.so.1 (0x76b79000)
    libssh2.so.1 => /usr/lib/arm-linux-gnueabihf/libssh2.so.1 (0x76b57000)
    libssl.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.0.0 (0x76afd000)
    libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0 (0x7698f000)
    libgssapi_krb5.so.2 => /usr/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2 (0x76944000)
    libkrb5.so.3 => /usr/lib/arm-linux-gnueabihf/libkrb5.so.3 (0x76890000)
    libk5crypto.so.3 => /usr/lib/arm-linux-gnueabihf/libk5crypto.so.3 (0x76852000)
    libcom_err.so.2 => /lib/arm-linux-gnueabihf/libcom_err.so.2 (0x7683f000)
    liblber-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/liblber-2.4.so.2 (0x76823000)
    libldap_r-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/libldap_r-2.4.so.2 (0x767ce000)
    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x767a7000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x7677f000)
    /lib/ld-linux-armhf.so.3 (0x54b77000)
    libgnutls-deb0.so.28 => /usr/lib/arm-linux-gnueabihf/libgnutls-deb0.so.28 (0x76672000)
    libhogweed.so.2 => /usr/lib/arm-linux-gnueabihf/libhogweed.so.2 (0x76639000)
    libnettle.so.4 => /usr/lib/arm-linux-gnueabihf/libnettle.so.4 (0x765f8000)
    libgmp.so.10 => /usr/lib/arm-linux-gnueabihf/libgmp.so.10 (0x76586000)
    libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0x764e3000)
    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x764d0000)
    libkrb5support.so.0 => /usr/lib/arm-linux-gnueabihf/libkrb5support.so.0 (0x764b7000)
    libkeyutils.so.1 => /lib/arm-linux-gnueabihf/libkeyutils.so.1 (0x764ab000)
    libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0x76486000)
    libsasl2.so.2 => /usr/lib/arm-linux-gnueabihf/libsasl2.so.2 (0x7645f000)
    libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0x7641e000)
    libtasn1.so.6 => /usr/lib/arm-linux-gnueabihf/libtasn1.so.6 (0x763fe000)
    libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0x763df000)
    libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0x763cf000)

If I bring all libraries from the compilation environment with the program (with nettle), it runs perfeclty.

Clearly, the problem is in Jessie dependecies between libgnutls and libnettle. How can I solve it?

  • 1
    libcurl comes in three flavors. One uses openssl, one uses gnutls, and one uses nss. The gnutls build requires gnutls which uses nettle. So, perhaps, the cross-compilation platform had the libcurl4-gnutls-dev package installed rather than libcurl4-openssl-dev ... It may also be useful to share a snippet of code in order to better address the question of what the compilation may have required. – RubberStamp Sep 3 '18 at 18:22
  • The code is standard usage, nothing special: CURL* request = curl_easy_init(); curl_easy_setopt(request, CURLOPT_HTTPGET, 1L); curl_easy_setopt(request, CURLOPT_URL, req->url.c_str()); curl_easy_setopt(request, CURLOPT_HTTP_CONTENT_DECODING, 1L); curl_easy_setopt(request, CURLOPT_SSL_VERIFYHOST, 0L); curl_easy_setopt(request, CURLOPT_SSL_VERIFYPEER, 0L); req->err = curl_easy_perform(request); – PoltoS Sep 5 '18 at 0:00
  • in addition the environment during compilation is different: arm-unknown-linux-gnueabi-ldd libcurl.so.4.2.0 shows libssl.so.1.0.0 – PoltoS Sep 5 '18 at 0:07
  • What platform (GNU/Linux?, Mac?, flavor? distro?) was used for cross-compilation? ... On the compilation machine what is the output of curl-config --ssl-backends – RubberStamp Sep 5 '18 at 13:40
0

I have a problem like it, and solve it (python) but shall work like any:

1 sysconfig file : crossplatform rules and/or dependences(arm,x64 ...)

2 retrive information of specific platform (arm,x64 ...)

3 Install (script or tools)specific libraries or tools etc. (apt-get install ...)

I hope it help you

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.