Version 85 (modified by 10 years ago) (diff) | ,
---|
Compiling BOINC client software
The BOINC client software includes:
- The core client
- The BOINC Manager
- boinc_cmd (Unix/Linux only)
- The BOINC screensaver (Windows and Mac only)
Unix and Linux
It is recommended to create a dedicated user for BOINC processing, e.g. boinc
and perform the operations below in this user's home directory! Details depend on the system, on Linux one would do
useradd boinc su - boinc
...to create a new user called boinc who cannot log in by default (because he has no password), then switch to that user.
First, download and install the prerequisites, then download the current source.
You should then have a directory called maybe "boinc-client_release-7.4-7.4.41
".
cd
to that directory and issue the command
./_autosetup
If this generates errors, check the prerequisites again. On success, consider reading the output of
./configure --help
Local use
If you want to build the client software for local use on your machine only, configure the build process using:
WHERE_BOINC_WILL_GO=/where/boinc/will/go ./configure --prefix=$WHERE_BOINC_WILL_GO --disable-server --disable-manager --disable-fcgi --enable-optimize
WHERE_BOINC_WILL_GO
is the name of the target directory. Often chosen as/usr/local/boinc
, but consider using~boinc/boinc
if you have a dedicated boinc user.- According to
./configure --help
, the command./configure --enable-pkg-client
should mean 'build a client package' but doing it that way will result in the error "cannot find the library `../lib/libboinc_crypt.la'
". - Special flags can be passed to the compiler: for example one might add
CXXFLAGS="-O3"
to the./configure
options. Indications whether this is actually useful are hard to come by though. With--enable-optimize
, the CXXFLAGS are set toCXXFLAGS = -g -O2 -Wall -ffast-math -O3
in theMakefile
. - If you have old versions of libraries (curl, openssl etc.) in
/usr/lib
, and newer versions somewhere else (for example,/usr/local/lib
) you may need to tell the linker where to find the newer versions by adding the LDFLAGS options, as inLDFLAGS=-L/usr/local/lib
If ./configure
ended with success, you can now start the actual build process:
make
Once this has succeeded, you may either install the result to the directory given previously to ./configure
by issuing
make install
This will probably fail because.
/bin/install: cannot create regular file ‘/etc/init.d/boinc-client’: Permission denied
The installer tries to put an "init file" into /etc/init.d/
to start boinc client at boot time. This is not a good idea because
1 This works only if you are currently root, and shouldn't be root when building. On the other hand, if you install boinc to
/usr/local/boinc
, you will have to issuemake install
as root anyway. 2 Your system may well be runningsystemd
and no longer use System V-style init files.
Solution: Remove the make target install-exec-hook
from the make target install-exec-am
by editing client/scripts/Makefile
install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
to
install-exec-am: @$(NORMAL_INSTALL) # $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
Distribution package
Alternatively, you may want to create a distribution package:
cd packages/generic/sea/ make
Note that making the distribution package fails if not everything has been built:
cp: cannot stat ‘../../../stage/FOO/bin/boincmgr’: No such file or directory cp: cannot stat ‘../../../stage/FOO/bin/boincscr’: No such file or directory
Fake the presence of those files:
touch ../../../stage/FOO/bin/boincmgr touch ../../../stage/FOO/bin/boincscr
The results can now be found in the sea
directory: located under the folder BOINC and there is also a sea.tar
file as well as a self-extracting archive e.g. boinc_7.4.41_x86_64-pc-linux-gnu.sh
Portable binaries
If instead you intend to build hopefully portable statically linked binaries of the client software that should run on a wide variety of GNU/Linux platforms, it is recommended to build the client software using a virtual machine (e.g. running under Microsoft Virtual PC, download the Compatibility virtual machine image).
In this case you should build using the option --enable-client-release
./_autosetup ./configure --disable-server --enable-client-release --build=i686-pc-linux-gnu \ CXXFLAGS="-O3 -funroll-loops -fforce-addr -ffast-math" make
See details of the build system.
Windows
Visual Studio 2013 Community Edition Build Environment
Software Prerequisites:
- Download and install Visual Studio 2013 Community Edition.
- Download the BOINC source code.
- Download the Visual Studio 2013 Dependency Store.
- All dependency stores can be found here.
All the Visual Studio project files assume that the dependency store is a sibling of the BOINC source repo. An example directory layout would look like this:
C:\Src | +--+ boinc | +--+ boinc_depends_win_vs2013
Building via the Command Line
Most everything developers will need to do during release management is handled by batch files. All these collections of batch files depend on the BOINC Build Environment for Windows.
Launching the BOINC Build Environment for Windows:
cd \src\boinc\win_build buildenv type release platform x64
Buildenv accepts several different parameters to customize what you are going to be able to build. Command parameters are as follows:
Initializing BOINC Build Environment for Windows Usage: buildenv.cmd TYPE <type> PLATFORM <platform> [Optional Commands] Commands: DEVENVDIR: Which build environment executed this batch file. TYPE: Which build environment are you building executables for. Current Values: Release/Debug PLATFORM: Which platform are you building for. Current Values: x86/amd64/ia64
You should get this output on success:
Initializing BOINC Build Environment for Windows Software Platform Detected: Visual Studio 2013
To build everything, execute 'build all' from the build environment:
C:\Src\boinc>build all Building the World... Building BOINC: Success Building BOINC Manager: Success Building BOINC Command: Success Building BOINC Screen Saver: Success Building BOINC Screen Saver Controller: Success Building BOINC Service Controller: Success Building BOINC System Tray: Success
Building via Visual Studio
Double-click on the boinc_vs2013.sln file in the win_build directory to launch Visual Studio 2013. From here you should be able to perform any build operation you want.
Mac OS X
Instructions for building the BOINC client on Mac OS X are on a separate page.