-
Notifications
You must be signed in to change notification settings - Fork 730
Building sysdig on x86 based Solaris 11.1
The following instructions are to build the userspace side of sysdig on SunOS solaris 5.11 (11.1) i86pc
. We use the GNU build chain. sysdig does not have any kernel modules available for SunOS at the time of this writing and the product that will be compiled below is limited to analyzing scap files created on other systems.
- Goal: Userspace sysdig application.
- Operating System: Intel-based Solaris 5.11.
- Duration: 20 minutes ~ 3 hours depending on network and system speed.
g++ 4.5 which is offered at the time of this authorship through the official solaris repositories (April 7, 2014) does not support some of the C++11 styles in sysdig's userspace code. Thus, you'll need a newer version of g++ (4.8 is known to work).
g++ 4.8 can be installed through the OpenCSW repository with the pkgutil
program. You can use the getting started guide on the OpenCSW site to find out how to install and configure the OpenCSW repository.
As of this writing, g++ 4.8 can be found in the "unstable" branch (how to specify this branch is discussed in the instructions linked to above). Check the current list of packages to see the latest g++ offerings.
After following the instructions above, execute
# pkgutil -i gcc4g++
And answer the prompts to your liking (I answered 'y' to all of them)
Note: If you had already tried to build sysdig prior to reading this and failed, make sure to clean out your build directory with an
rm -fr *
inside the build directory prior to continuing (or create a new build directory if you aren't comfortable issuing that command).
Go to the base sysdig source directory and make a build directory:
$ mkdir build
$ cd build
Modify your path prior to running the cmake
command in order to use the newer OpenCSW g++:
$ PATH=/opt/csw/bin:$PATH cmake ..
...
-- Check for working CXX compiler: /opt/csw/bin/c++
-- Check for working CXX compiler: /opt/csw/bin/c++ -- works
...
Notice how our output tells us that that Cmake is going to correctly be using the c++ compiler in the /opt/csw/bin/
path as opposed to the incorrect one in /usr/bin
.
Now, we cross all our fingers and run make:
$ make
You may get a few embarrassing warnings, but it's all ok. I assure you.
After all is done you should be able to run
$ ./userspace/sysdig/sysdig -l
And have it run. Yes! we win again!