Skip to content

CompileAppLinux

David Anderson edited this page Sep 11, 2024 · 5 revisions

Building BOINC applications on Linux

If you build an application on a recent Linux distribution, it won't run on older Linux distributions because of library incompatibilities. The only solution we've discovered is to build applications on a host with an old Linux and an old GCC. Setting up such a host, however, is a giant pain.

Our recommended approach is not to build directly on a Linux host, but rather:

  • Download the Compatibility virtual machine module. This is a Scientific Linux system with the appropriate (old) version of GCC.
  • Run this system under VirtualBox.
  • Install the latest BOINC code on the virtual host.
  • Build the BOINC libraries by going to the 'boinc' directory and typing:
_autosetup
./configure --disable-client --disable-server LDFLAGS=-static-libgcc
make

For x86-64 builds, it's possible to take SSE2 for granted, as long as GCC is version 4.0+, then type instead:

_autosetup
./configure --disable-client --disable-server LDFLAGS=-static-libgcc CFLAGS=-ftree-vectorize CXXFLAGS=-ftree-vectorize FFLAGS=-ftree-vectorize
make

Do not 'make install'.

  • Go to the boinc/samples/example_app directory and type:
ln -s `g++ -print-file-name=libstdc++.a`
make

Other UNIX systems

GLUT notes

Freeglut 2.2, freeglut 2.4 and OpenGL Utility Toolkit (GLUT) libraries are supported.

X11 notes

To get the X11 support, select the relevant options when you're installing Linux, or (Redhat) go to System Settings/Add Software.

Clone this wiki locally