development tools - modrpc/info GitHub Wiki

What to Do First

  • 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

Using GIT

GIT Info

Getting/compiling the code initially

  • 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'"
  • make

Updating/compiling the code

  • git pull
  • make
    • if it does not work, try autoreconf -vfi and then do make

Checking in the code change

  • git add "changed files"
  • git commit -m "checkin comment"
  • git push

Using GDB

  • Currently, we use SIGRTMIN (SIG34) for timers in MVRT. To GDB MVRT, SIG34 should be ignored.
    • handle SIG34 nostop noprint pass

JSMN: JSON Parser

AutoTools

aclocal

automake

autoconf

  • 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'

libtool

Network Tools

netstat

  • to determine listening ports do: netstat -an

nmap

  • to determine the list of listening ports do: sudo nmap -O "ipaddr"
  • '''zenmap''': GUI-frontend for nmap
⚠️ **GitHub.com Fallback** ⚠️