development tools - modrpc/info GitHub Wiki
-
Install development tools.
- install automake 1.14 or later
- install autoconf 2.69 or later
- install libtool 2.4.2 or later
- install m4 1.4.16 or later
- get bison-3.0 or later
- install flex 2.5.35 or later
- install gcc-4.7 or g++-4.7 or later
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-cache search "g\+\+"
sudo apt-get install gcc-4.7 g++-4.7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
- pick which version to use:
sudo update-alternatives --config gcc
-
Install third-party libraries.
- JSON parser, JSMN:
external/jsmn.tgz
cp libjsmn.a /usr/local/lib
cp jsmn.h to /usr/local/include
- ZeroMQ:
external/zeromq-4.0.4.tar.gz
- JSON parser, JSMN:
git clone https://github.com/mvcode/base.git
cd base
autoreconf -vfi
-
./configure
- to make debuggable build, do
./configure 'CXXFLAGS=-O0 -g' 'CFLAGS=-O0 -g'"
- to make debuggable build, do
make
git pull
-
make
- if it does not work, try
autoreconf -vfi
and then domake
- if it does not work, try
git add "changed files"
git commit -m "checkin comment"
git push
- Currently, we use SIGRTMIN (SIG34) for timers in MVRT. To GDB MVRT, SIG34 should be ignored.
handle SIG34 nostop noprint pass
- JSMN home: http://zserge.com/jsmn.html
- JSMN usage example: http://alisdair.mcdiarmid.org/2012/08/14/jsmn-example.html
- code example: https://github.com/alisdair/jsmn-example
- JSON webpage: http://www.json.org/
- JSON wiki: http://en.wikipedia.org/wiki/JSON
- To reconfigure everything (e.g. autotools version is different), do
autoreconf -vfi
. - To make a debuggable build, do
make distclean
./configure 'CFLAGS=-O0 -g' 'CXXFLAGS=-O0 -g'
- to determine listening ports do:
netstat -an
- to determine the list of listening ports do:
sudo nmap -O "ipaddr"
- '''zenmap''': GUI-frontend for nmap