1

I have cross compiled libsodium and libzmq. I compiled libzmq with the commands below :

./configure CC=arm-linux-gnueabi-gcc                                \
        --host=arm-linux-gnueabi                                     \
        --target=arm-linux-gnueabi                                    \
        --build=x86_64-linux-gnu                                       \
        --enable-shared                                                 \
        --with-libsodium=/home/sagar/OtisSagar/libzmq/sodium_install/lib \
        --prefix=/home/sagar/libzmq/_install

make 

make install

The compilation is successful without any errors and I do see the libraries generated in the prefix directory but when I run the ldd on libzmq, it does not show the dependency of libsodium :

librt.so.1 => /lib/librt.so.1 (0x8badf00d)
    libpthread.so.0 => /lib/libpthread.so.0 (0x8badf00d)
    libc.so.6 => /lib/libc.so.6 (0x8badf00d)
    ld-linux.so.3 => /lib/ld-linux.so.3 (0x8badf00d)
    libstdc++.so.6 => /lib/libstdc++.so.6 (0x8badf00d)
    libm.so.6 => /lib/libm.so.6 (0x8badf00d)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8badf00d)

What am I doing wrong here?

user3666197
  • 1
  • 6
  • 50
  • 92
Sagar
  • 1,115
  • 2
  • 13
  • 22

1 Answers1

0

Q : What am I doing wrong here?

Documentation ( Last Revised: 2017-06-11 ) starts on this saying :

The ZeroMQ library uses a slightly modified CURVE protocoll in order to secure your messages against manipulation and eaves-dropping.

See https://curvecp.org/ and http://hintjens.com/blog:48 for detailed background.

If you enable libsodium the embedded files will not be used and instead the resulting library of ZeroMQ will be linked against the shared libsodium library.

Documentation also states a few defaults, that mean the libsodium is not, unless explicitly requested built against, in favour of tweetnacl1, further mentioning different settings for different build-systems :

howto enable building with libsodium

autoconf
- add the —with-libsodium switch to the configure script

cmake
- add the -DWITH_LIBSODIUM=ON switch to the cmake call.

Last but not least :

Footnotes
1. (*) this might currently not be true for all build systems, but this behaviour is the intention. Please submit PRs and pull requests for the non-behaving ones.

user3666197
  • 1
  • 6
  • 50
  • 92
  • Thanks for the answer, I found out that the libsodium is not necessary for my application so, i have built without libsodium – Sagar Feb 07 '20 at 09:35