Installation of ndnSIM 2.0 (Name Data Networking) - c++

I am trying to install ndnSIM 2.0 Link on Ubuntu 12.04. I have followed all the instructions mentioned Link 2.
When I run ./waf configure while in ndn-cxx folder I get the following error
Checking if CryptoPP library works: yes
Checking boost includes: 1.57.0
Checking boost libs: lib system not found in /usr/lib
The configuration failed
(complete log in /home/rani/Desktop/ndnSIM/ndn-cxx/build/config.log)
Do I need to install some more libraries or there is some link problem as
Boost Library(1.57) is installed in /usr/local/lib? I have even followed the FAQ!

So ./waf cannot find the boost libs. Please check where the boost libs have been installed, most probably they are in /usr/local/lib in which case simply issue:
./waf configure --boost-libs=/usr/local/lib (instead of just ./waf configure).
You can ask any questions at their mailing list.

first of all, the error you got refers to ndn-cxx, which is our library, not ndnSIM itself.
This error indicates that your installed boost libraries could not be found by ndn-cxx.
Please make sure that you installed the boost libraries correctly and then search for the directory, where they were installed.
Typically, the boost libraries are installed under the /usr/lib directory. If your boost libraries have been installed somewhere else, you may use the following option to indicate the specific directory and configure ndn-cxx:
./waf configure --boost-libs=

Related

linking boost filesystem and boost iostream libraries in ubuntu 14.04

I downloaded boost 1.61 and extracted it at /usr/local/boost_1_61_0 and while installing i set the prefix path to /usr/local/ where all the boost libraries are installed. I am trying to install FRESCO tool for DNA data compression which is built using Boost c++ libraries (Downloaded from https://github.com/hubsw/FRESCO). They have given make utility to install FRESCO tool.
But when I try to run make, I get errors regarding BOOST:FILESYSTEM and BOOST:IOSTREAM libraries as follows
undefined reference to `boost::iostreams::detail::gzip_header::reset()'
undefined reference to boost::iostreams::detail::zlib_base::~zlib_base()'
undefined reference to `boost::filesystem::detail::create_directories(boost::filesystem::path const&, boost::system::error_code*)'
and many more related to boost iostream and filesystem.
In FRESCO they mentioned they require BOOST 1.51(later), boost filesystem,boost iostream, boost threading-mt.
Can someone please suggest me where I am going wrong? How to link the boost filesystem/iostream if i am using make utility of ubuntu to install FRESCO tool?
I'm trying to compile boost as dependency for my project and I get similar errors.
I see two issues for your case:
I don't use FRESCO, but from its makefile I see -lboost_system -lboost_filesystem -lboost_iostreams, so it expects a global Boost installation. You don't need to compile Boost for that, you can use the packaged versions of your system. In ubuntu they can be installed with sudo apt-get install libboost-dev libboost-filesystem-dev libboost-iostreams-dev.
If you really want to compile Boost, that error message is about a part of boost that needs extra configuration for compiling it (compression filters). It tries to link to an object with some definitions that are not compiled by default (It would probably link correctly if FRESCO didn't use compression filters). Assuming that you are compiling with Boost.Build, for Boost.Iostreams this issue is explained (not very well IMO) in https://www.boost.org/doc/libs/1_61_0/libs/iostreams/doc/installation.html :
To build with Boost.Build, run bjam from the directory libs/iostreams/build, or from the Boost root directory. If you want to use the compression filters, you may need to set several Boost.Build variables indicating where the source files or pre-built binaries are located.
EDIT
There are other alternatives to compile Boost.Iostreams:
If you have installed bzip and zlib in the system, Boost.Build autoconfigures the compilation of those compression filters. In ubuntu, do sudo apt-get install libbz2-dev zlib1g-dev (in xenial, I haven't checked if the names are different in other versions).
If you can't install zlib and libbgzip in the system, and you compiled them yourself, put this in a file tools/build/src/user-config.jam inside the downloaded folder of boost:
using zlib : 1.2.11 : <include>/path-to-your-compilation/zlib-1.2.11 <search>/path-to-your-compilation/zlib-1.2.11 ;
using bzip2 : 1.0.6 : <include>/path-to-your-compilation/bzip2-1.0.6 <search>/path-to-your-compilation/bzip2-1.0.6 ;
Just replace path-to-your-compilation.
Then, do ./bootstrap.sh --with-libraries=filesystem,iostreams and ./b2.
Documentation for this (notice I'm using Boost 1.65):
user-config.jam: https://www.boost.org/doc/libs/1_65_1/doc/html/bbv2/reference.html#bbv2.reference.tools.libraries.zlib
general Boost install: https://www.boost.org/doc/libs/1_65_1/more/getting_started/unix-variants.html#prepare-to-use-a-boost-library-binary

how to get libtorrent to see boost?

I am compiling libtorrent-rasterbar-0.16.16 with msys and mingw.
./configure runs fine, until it gets to the boost library check.
I have boost 1.51, and I set $BOOST_ROOT, but that did not work.
Checking for boost libraries:
checking for boostlib >= 1.36... expr: syntax error
configure: We could not detect the boost libraries (version 1.36 or higher). If
you have a staged boost library (still not installed) please specify $BOOST_ROOT
in your environment and do not give a PATH to --with-boost option. If you are
sure you have boost installed, then check your version number looking in <boost/
version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::System library is available... no
configure: error: Boost.System library not found. Try using --with-boost-system=
lib
I tried the --with-boost-system= option, and that did not work either. I also copied libboost_system-mgw47-mt-1_51.a to the same directory as libtorrent... but it did not work.
What am I missing?
I have boost 1.51, and I set $BOOST_ROOT, but that did not work
It is very likely that configure can’t find boost header files. What you need is both the library and the sources, and your best avenue is still setting BOOST_ROOT.
On a linux box you would be installing the boost-devel package, but for mingw you should download the boost sources directly and unpack them. Then please make sure you are running,
BOOST_ROOT=/path/to/boost_1_51 ./configure

Locating Boost Libraries in Ubuntu

I want to build an autotools project which is making use of the boost libraries program_options and iostreams. Therefor I install those libraries:
sudo aptitude install libboost-iostreams-dev libboost-program_options-dev
Now ./configure is fine and the progam compiles. However the linking fails:
/usr/bin/ld: cannot find -lboost_program_options-mt
/usr/bin/ld: cannot find -lboost_iostreams-mt
This is a well documented issue and can be fixed either by fixing the autotools stuff or by linking boost_program_options to boost_program_options-mt and so forth. I choose to do the latter since this is not my project. However I am failing to locate the libraries installed in Ubuntu:
locate *boost*
returns a list of documentation and package information and some boost libraries I am not looking for. locate *program_options* is empty. The library is not under /usr/lib or /lib ... Any ideas?
For me they are under /usr/lib64 in ubuntu 13.04. But I would use boost m4
to let autotool take care of these dependencies automatically. So by including boost m4 in your configure.in, you can specify which boost modules and versions you require. Morever it would also find the required paths for you.
sometimes its impossible, especially for smaller apps and custom projects,
for future, boost includes are in /usr/include/boost ,
of course it depends on system type and distribution

CPPCMS build error with libraries

Despite I have open ssl installed, it can't find where the library is. The openssl exists in my Ubuntu as default, it still can't find, so I download a new distribution and reinstall it to /usr/local/ssl . I install by the default cmake command:
cmake ..
As well as explicitly specify the path:
cmake -DCMAKE_INCLUDE_PATH=/usr/local/ssl/include -DCMAKE_LIBRARY_PATH=/usr/local/ssl/lib ..
It keeps generating this error:
-- Looking for ICU libraries
-- ICU not found, disabling ICU localization backend
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PCRE_LIB
linked by target "booster" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
linked by target "booster-static" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
What does it mean? It should find the open ssl. ICU is installed as default in Ubuntu as well. Also, what's the last two lines about?
EDIT: Ok, I downloaded and installed ICU to my usr directory. ICU found now. Now the only error remains:
-- Looking for ICU libraries
-- ICU Found, building booster locale
GNU-TLS Gcrypt or OpenSSL librarys are not found, disabling AES encryption support
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PCRE_LIB
linked by target "booster" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
linked by target "booster-static" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
is the booster thingy. Openssl stills not found.
Great,
I found the answer here: http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_build_troubleshooting
sudo apt-get install build-essential libpcre3-dev libicu-dev libgcrypt11-dev zlib1g-dev cmake

Build Boost on Mac with Xcode

I've recently got acquainted with Boost library and I'd like to use it in my Xcode project. But sadly there is no HowTo or FAQ on how to do it :(
What's the sequence of actions to build and use Boost libraries in Xcode?
The easiest way I've found to do it is to install MacPorts, then you can install/build Boost via a single command:
sudo port install boost
Plus you get similar access to other open source software. The only downside I've found is that, like any other package management system, they are not always up to date with the latest version.
If you prefer Homebrew as your package manager, the command is:
brew install boost
I don't know how to use Boost from XCode (I'm not a Mac programmer), but building boost is usually done through their own build tool, bjam.
They have a guide to building boost here, and you can download the latest version of bjam here
Once it is built, you reference it from Xcode the same way you would any other library. The boost/include should be added to your include path, and the libraries in boost/lib can be referenced for the boost libs that require it.
To build boost on a mac, follow the unix variants getting started page (http://www.boost.org/doc/libs/1_39_0/more/getting_started/unix-variants.html). You won't use Xcode directly to perform the build, but once complete you can add the boost include paths and dylib's to your Xcode project.
I found that to build Boost 1.41.1 on MacOS, you need to do the following:
Download boost 1.46.1 from here: http://sourceforge.net/projects/boost/files/boost/1.46.1/
Unpack the file
Open terminal, cd to the install directory, and do the following:
chmod u+x configure.sh
cd tools/build/v2/engine/src
chmod u+x build.sh
Then go back to the install directory, and:
./configure.sh
If that runs successfully, it will tell you to run:
./bjam
That's it.. for whatever reason, I needed to set those permissions manually before it would work.
su - root
enter root password and then run below as root
/opt/local/bin/port install boost
If you have never logged in as root or forgotten your password, here are the steps to reset root password
http://support.apple.com/kb/HT1528?viewlocale=en_US&locale=en_US
For most of the boost libraries, there's nothing to build, it's all in header files.
The remainder of the instructions are here.
Currently I'm very happy with using Pete Goodliffe's script which builds a framework from the Boost source package for both iOS and Mac. Drag and drop it into a project and it works!
There are multiple versions of the script out there. Here's one:
https://gist.github.com/faithfracture/c629ae4c7168216a9856/61be257e1c0839c85743777d0687becad9913bf7
Elaboration of Ferrucio's answer:
Install Boost using MacPorts (sudo port install boost) or Homebrew (brew install boost).
Find the path to the Boost header files (it should be in /opt/homebrew/include if you're using Homebrew).
Add the path to System Header Search Paths in the Build Settings of your Xcode target.
IMPORTANT NOTE: If you add the path to User Header Search Paths instead of System Header Search Paths, as other users suggested, then your code will fail to build, since the Boost files use angled-includes (#include <boost/filename.hpp>) to include each other. Angled-includes are only for including system library headers, and thus they only work if Boost is in the System Header Search Paths.
You can read about the difference between angled-includes and quoted-includes here.