[Ndn-interest] Issue with linking symbols during cross-compilation of ndn-cxx

Junxiao Shi shijunxiao at email.arizona.edu
Sun Sep 29 16:40:46 PDT 2019

Hi Athreya

Do not attempt to cross-compile with crosstool-ng et al. Compile natively
and you can eliminate a lot of problems.

I have Debian packages built for ARMv7, published here:
echo 'deb [trusted=yes] http://dl.bintray.com/yoursunny/named-data stretch
main' | sudo tee /etc/apt/sources.list.d/named-data.list

The scripts are here: https://github.com/yoursunny/docker-nfd
Basically, you launch a Docker container that has a complete ARMv7
operating system (Debian, Raspbian, etc), then execute every binary via
This allows you to execute native binaries within ARMv7 operating system,
but on a powerful Intel machine.

Yours, Junxiao

On Sun, Sep 29, 2019 at 5:33 PM Athreya Nagaraj via Ndn-interest <
ndn-interest at lists.cs.ucla.edu> wrote:

> Hi All
> I'm trying to build the binaries of ndn-cxx in my linux 64-bit machine and
> hoping to compile it for raspberry pi 2. I've built crosstool-ng and have
> compiled the programs. However, I'm unable to link the symbols in the
> program. Here's the output of the program. I've used this
> <https://github.com/ath-90/discover-conf/blob/master/ndn.sh> shell script
> to run the compilation. Below are the lines that are causing the issue
> (Full log with verbose here
> <https://github.com/ath-90/discover-conf/blob/master/log-wo-pthread>).
> /home/ath/raspberrypi/x-tools/arm-rpi-linux-gnueabihf/lib/gcc/arm-rpi-linux-gnueabihf/7.4.1/../../../../arm-rpi-linux-gnueabihf/bin/ld:
> tools/ndnsec/cert-dump.cpp.1.o: undefined reference to symbol
> 'pthread_getspecific@@GLIBC_2.4'
> /home/ath/raspberrypi/x-tools/arm-rpi-linux-gnueabihf/arm-rpi-linux-gnueabihf/sysroot/lib/libpthread.so.0:
> error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> This seems to be an issue that the waf is unable to locate the pthread
> library. Could someone please guide me on how I can get the waf to
> recognize the pthread library? Also, I tried using the -pthread flag but it
> seems to introduce new linkage errors for some unknown reason. Here
> <https://github.com/ath-90/discover-conf/blob/master/log-w-pthread> is
> the output when I have included the -pthread in LDFLAGS.
> Any help would be appreciated.
> Regards
> Athreya H N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20190929/d928bc2e/attachment.html>

More information about the Ndn-interest mailing list