Bug #1673

Cannot build ndn-cxx with cross-compiler toolchain on OS X

Added by Adeola Bannis over 6 years ago. Updated over 6 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I used crosstool-ng and successfully built a toolchain that compiles for Raspberry Pi on OS X. I am unable to build ndn-cxx from source with the toolchain. I get boost linkage errors (attached).

I'm also attaching the script I use to build.


xcompile-cxx (1.09 KB) xcompile-cxx Build script Adeola Bannis, 06/17/2014 10:40 AM
error.log (20 KB) error.log Error log Adeola Bannis, 06/17/2014 10:50 AM
config.log (30.7 KB) config.log Adeola Bannis, 06/17/2014 11:46 AM

Updated by Alex Afanasyev over 6 years ago

Attach also build/config.log

From the error I suspect that header files do not correspond to the linked library. Other potential problems:

  • Do not specify include dirs in CXXFLAGS. Use INCLUDES variable instead (it should be just a space separated list of directories)
  • -L doesn make sense for CXXFLAGS at all
  • Do not specify library paths in LDFLAGS. Use LIBPATH variable (also, just a list of folders)

You can try to compile again, but make sure you remove libndn-cxx.a from /Users/abannis/REMAP/pi-ndn/pi/lib. Until you fix the flags, it is preferred instead of the compiled version during the link stage.


Updated by Adeola Bannis over 6 years ago

The flags were taken from Wentao's instructions at

I tried it with the boost includes + libs from that page, and also with the headers and libs copied directly off the Pi. Neither worked.

I've attached the config.log.


Updated by Alex Afanasyev over 6 years ago

Have you removed libndn-cxx from the location I mentioned?


Updated by Adeola Bannis over 6 years ago

I changed the flags and removed the old libndn-cxx and it built successfully. Thanks, Alex!


Updated by Junxiao Shi over 6 years ago

  • Category set to Base
  • Status changed from New to Closed
  • Target version set to v0.2

Also available in: Atom PDF