[Ndn-interest] Issue with linking symbols during cross-compilation of ndn-cxx
aa at cs.fiu.edu
Sun Sep 29 16:45:28 PDT 2019
I would have to rephrase and expand what Junxiao said. It is a challenge to do a cross compilation. Possible, but really challenging. Unfortunately, I wouldn't be able to give you specific advise. You would definitely need to include pthread flag and disable all types of self-checks in wscripts. You could try to check https://github.com/named-data-mobile/android-crew-staging <https://github.com/named-data-mobile/android-crew-staging> repo that defines infrastructure for android cross-compilation, but it would take a lot of time to figure this out. Doing native compilation indeed eliminate a lot of headaches.
And extension. If you're using Ubuntu for pi2, then you can just use NDN PPA with binary packages.
> On Sep 29, 2019, at 7:40 PM, Junxiao Shi <shijunxiao at email.arizona.edu> wrote:
> 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 <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 <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 QEMU.
> 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 <mailto: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.
> Athreya H N
> Ndn-interest mailing list
> Ndn-interest at lists.cs.ucla.edu
Assistant Professor, SCIS, Florida International University
11200 SW 8th Street, PG6 Room 140D, Miami, FL 33199
phone: +1.305.348.4960 (office); email: aa at cs.fiu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ndn-interest