-
Notifications
You must be signed in to change notification settings - Fork 4
How to Build the SerialMux on Linux
This document describes the steps to build the Serial Mux on a Linux platform.
The Serial Mux requires:
- The GCC C++ toolchain (g++). The Serial Mux was built with g++ 4.1 and 4.4.7, later versions should work, though they may require tweaks to conform to later standards.
- The SCons tool is used as the Serial Mux build system. The Serial Mux was built with scons 1.3.1, later versions should work, but may produce warning messages.
- Boost C++ libraries. The Serial Mux was built using Boost library version 1.46.1. The Boost libraries used by the Serial Mux are available in serial-mux_boost_1_46_1.tar.gz.
The Serial Mux source code is available in serial-mux_1.1.2.15_linux.tar.gz.
Install scons and the gcc/g++ toolchain using your distribution's package manager.
$ sudo yum install scons gcc-c++ libstdc++-devel glibc-devel
The Serial Mux distribution comes with the required Boost libraries compiled for i686. If you want to compile a different variant, follow the instructions below.
Note: Versions of Boost prior to 1.49 do not work with GCC 4.7 or later, see Boost Ticket #6165. If you have a recent GCC, you will need to use an updated version of the Boost libraries.
-
Unpack the Boost libraries.
$ tar xzf serial-mux_boost_1_46_1.tar.gz
-
Build the necessary libraries (if the included Boost library builds will not work).
$ cd boost_1_46_1 $ ./bjam threading=multi --with-date_time --with-program_options --with-filesystem --with-system --with-thread stage
Note: More recent versions of boost use a bootstrap script to generate the build file. The following works with boost_1_61_0:
$ cd boost_1_61_0
$ ./bootstrap.sh --with-libraries=date_time,program_options,filesystem,system,thread
$ ./b2 threading=multi
The distribution you receive may have different version numbers than the example file and directory names shown in the directions below.
-
Unpack the Serial Mux distribution.
$ tar xzf serial-mux.tar.gz
-
Build the Serial Mux with scons, the
boost_base
variable should be the path to the root of the Boost distribution.$ scons mux boost_base=../boost_1_46_1
The Serial Mux binary is named serial_mux_linux and is located in the root of the serial_mux directory. The Boost libraries are compiled statically into the Serial Mux to avoid runtime problems with finding the shared libraries.
To remove the generated objects in an existing build directory:
$ scons -c mux