Building BOINC on Unix

From Unofficial BOINC Wiki

Jump to: navigation, search

Contents

[edit] General

Make sure that you have the appropriate Software Prerequisites for Hosting a BOINC Project before you begin.


On UNIX systems such as Linux, Solaris, or Mac OS X, the BOINC software (both server and client) can be built by typing

./_autosetup
./configure [see options below]
make
make install  [optional: installs libraries and header files useful for building apps]

in the top directory of the BOINC Source.

[edit] Configuration

Usage:

./configure [OPTION]... [VAR=VALUE]...

You can use environment variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. Example: to compile BOINC with strict compiler warnings, use

./configure CXXFLAGS="-Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common -Wnested-externs"

Defaults for the options are specified in brackets.

Configuration
-h, --help display this help and exit
Installation directories
--prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]

By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix='.

For better control, use the options below.
Optional Features
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-debug enable tracing and debugging flags for all components
--disable-server disable building the scheduling server
--disable-client disable building the client Default: --enable-server --enable-client: builds both server and client
--enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--disable-static-linkage disable static linking of certain libraries
--enable-client-release Try building a portable 'release-candidate' (currently implemented for Linux and Solaris only): this links libstd++ statically. You will probably need gcc-3.0 for this to produce a portable client-binary. It is therefore recommended to use CC=gcc-3.0 and CXX=g++-3.0 for this. (Default = no)
Optional Packages
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-x use the X Window System
--with-apple-opengl-framework use Apple OpenGL framework (Mac OS X only)
--with-wxdir=PATH Use uninstalled version of wxWindows in PATH
--with-wx-config=CONFIG wx-config script to use (optional)
Environment variables
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags.
CPP C preprocessor
CXXCPP C++ preprocessor
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
MYSQL_CONFIG mysql_config program


[edit] Source Layout

The top-level Makefile.am contains the SUBDIRS= line which sets up directory recursion, and the rules for creating source distributions.

Each subdirectory's Makefile.am contains the rules for making the binaries and libraries in that directory and any extra files to distribute.

Usually you will want to run make from the toplevel (the directory containing the file configure), but sometimes it is useful to run make and make check in certain subdirectories (e.g. client/).

[edit] Adding New Directories

If you create a new directory with another Makefile.am, you should make sure the directory is referenced by a SUBDIRS= line from its parent Makefile.am add it to the AC_CONFIG_FILES directive in configure.ac.

[edit] Version Number

To set the BOINC client version number:

set-version 7.17

in the BOINC top-level source directory. This updates the AC_INIT line in configure.ac and regenerates files that use the version numbers (config.h, py/version.py, test/version.inc, client/win/win_config.h, Makefiles)


[edit] Archival/Source Distribution

To make source distributions:

gmake dist


[edit] UCB Source

[edit] Copyright ©

  • 2005 University of California
  • 2005 Paul D. Buck

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.

Personal tools