Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuous Integration server for C++ - What about library dependencies?

I am currently researching a good setup for a continuous integration server which would build various C++ applications for several Linux distributions.

My primary question is how other users here have handled the differences in system libraries between Linux distributions?

While it might be relatively easy to build direct dependencies such as UI libraries along with an application, "indirect" dependencies such as glibc look like a big pain if they had to be built alongside the application every time. I am therefore thinking of moving the actual build execution into a separate virtual machine for each distribution, e.g. using rlogin to run the commands. My goal is to prevent binary incompatibilities between build-machine library versions and those deployed in the target distributions.

Does anyone here have any experience with such a process and could tell if the above sounds like a feasible approach?

like image 772
Joe Avatar asked Nov 02 '10 20:11

Joe


2 Answers

We use Jenkins (Contiguous Integration) and CMake (build system) for this purpose. Jenkins is similar to Buildbot, i.e. it also has buildmaster and buildslaves. Currently I have setup 8 slaves to build for 4 different platforms (FC8, FC10, FC12 and Windows 7). We build both debug and release binaries, so I dedicated one slave for each platform and build type.

As for the third party libraries like Qt & Boost, I compiled them on each platform and checked them into a separate repository.

@esavard: We use CMake 2.8 to do cross compilation, I have not used minigw but a quick google search indicates that it is possible. Here is a link to a tutorial to cross compile for Windows on Linux using CMake and miniGW.

I have not used Buildbot and cannot comment on its features but thought I should mention an alternative that we are currently using.

Hope this helps.

like image 101
user258808 Avatar answered Nov 08 '22 11:11

user258808


Buildbot has the notion of buildmasters and buildslaves.

A buildmaster takes care of displaying the web GUI, sending email, triggering builds, and other housekeeping. The buildslaves wait on the buildmaster and when commanded perform builds.

We have buildbot set up to build on a number of different platforms, some of them VMs, and it's working well for us.

like image 40
Paul Rubel Avatar answered Nov 08 '22 11:11

Paul Rubel