Skip to content

Building sysdig on x86 based Solaris 11.1

Chris McKenzie edited this page Apr 8, 2014 · 17 revisions

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.

Building

Install g++ 4.8 or greater

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).

Add and configure the OpenCSW repository

g++ 4.8 can be installed through the OpenCSW repository with the pkgutil program through the getting started guide on the OpenCSW site. 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.

Install g++ 4.8

After following the instructions above, execute

# pkgutil -i gcc4g++

And answer the prompts to your liking (I answered 'y' to all of them)

Tell Cmake to use OpenCSW's g++

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 * prior to continuing.

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 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
...

Those lines above are the important ones which tell use that Cmake will be using our newer g++ for this build.

build

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.

smoketest it

After all is done you should be able to run

$ ./userspace/sysdig/sysdig -l

And have it run. Yes! we win again!

Clone this wiki locally