Changes between Version 19 and Version 20 of BuildSystem
- Timestamp:
- Mar 15, 2014, 1:47:58 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildSystem
v19 v20 9 9 * '''Server''': the scheduler, file upload handler, daemons, and tools. 10 10 11 == Compilation pipeline == 12 13 On Unix systems, the BOINC software can be built by: 14 15 * Making sure a number of packages exist on your system (in particular, a missing g++ will mean you get confronted with mysterious error messages later on). In Linux using 'yum', run this as 'root': 16 17 {{{ 18 yum install make autoconf automake libtool libcurl-devel openssl-devel gcc-c++ 19 }}} 20 21 * After that, 'cd' to the directory into which you cloned the BOINC Git repository (probably 'boinc_repo') and run: 11 On UNIX systems, the BOINC software can be built by typing 22 12 23 13 {{{ 24 14 ./_autosetup 25 }}}26 27 * This has created the 'configure' script. Execute that script (passing it a _number of options_) using28 29 {{{30 15 ./configure [see options below] 31 }}}32 33 * This has created the 'Makefile'. Run compilation using34 35 {{{36 16 make 37 17 }}} 38 18 39 Note that none of the above except the installation of missing packages should be run as root.19 in the top directory. 40 20 41 == Use cases == 42 43 * If you are '''creating a project''', you need to build the server and miscellaneous software (you '''don't''' need to build the client software; participants can get that from the BOINC web site). Use 21 * If you're creating a project, you need to build the server and miscellaneous software (you '''don't''' need to build the client software; participants can get that from the BOINC web site). Use 44 22 45 23 {{{ … … 47 25 }}} 48 26 49 * If you are ''porting the BOINC client software to a new platform''', you need the client and miscellaneous components. Use27 * If you're porting the BOINC client software to a new platform, you need the client and miscellaneous components. Use 50 28 51 29 {{{ … … 53 31 }}} 54 32 55 * If you are '''developing or porting a BOINC application''', you need only the miscellaneous component. Use33 * If you're developing or porting a BOINC application, you need only the miscellaneous component. Use 56 34 57 35 {{{ 58 36 ./configure --disable-server --disable-client --disable-manager 59 }}}60 61 * If you are '''compiling the client''', use62 63 {{{64 ./configure --disable-server --disable-manager65 37 }}} 66 38 … … 73 45 }}} 74 46 75 Run76 77 {{{78 ./configure --help79 }}}80 81 for a complete listing of available options.82 83 47 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 84 48 85 49 {{{ 86 ./configure CXXFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common "50 ./configure CXXFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common " 87 51 }}} 88 52 89 In particular, you can set the installation directory like this for example: 53 Defaults for the options are specified in brackets. 90 54 91 {{{ 92 VERSION=7.2.9 93 ./configure CXXFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common" --disable-server --disable-manager --prefix=${HOME}/boinc_${VERSION} 94 }}} 55 === Configuration === 95 56 96 == Problems during compilation == 57 ||'''-h, --help'''||display configuration options and exit|| 58 ||'''--with-boinc-platform=NAME'''||Override the BOINC [BoincPlatforms platform] name determined by autoconf. i.e. Use NAME as [BoincPlatforms platform] to compile into the client. Only necessary if configure does not recognize your platform correctly by default. You can check the platform after the configure step by looking at the value of the HOSTTYPE variable in config.h || 59 ||'''--with-boinc-alt-platform=NAME'''||Use this option to build an client that supports an alternate platform name. For example, on a x86_64 linux system that supports both 64 bit and 32 bit executables, you might specify --with-boinc-platform=x86_64-pc-linux-gnu and --with-boinc-alt-platform=i686-pc-linux-gnu. || 97 60 98 Once you run `make`, a few problems may occur. 61 === Installation directories === 99 62 100 Make breaks off with 63 ||'''--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.|| 101 64 102 {{{ 103 error: wrong number of arguments 104 usage: git config [options] 105 }}} 65 === Optional Features === 106 66 107 Solution: Edit "generate_svn_version.sh" to put quotes around an argument (see https://boinc.berkeley.edu/trac/ticket/1253) 67 ||'''--disable-FEATURE'''||do not include FEATURE (same as --enable-FEATURE=no)|| 68 ||'''--enable-FEATURE[=ARG]'''||include FEATURE [ARG=yes]|| 69 ||'''--enable-debug'''||enable tracing and debugging flags for all components (alternatively, include -g in CFLAGS and CXXFLAGS)|| 70 ||'''--disable-server'''||disable building the server component|| 71 ||'''--disable-manager'''||disable building the manager component (Disabled automatically if configure can't find wxWidgets)|| 72 ||'''--disable-client'''||disable building the client component Default: --enable-server --enable-client --enable-manager: builds server, client and manager.|| 73 ||'''--enable-shared[=PKGS]'''||build shared libraries [default=yes]|| 74 ||'''--enable-static[=PKGS]'''||build static libraries [default=yes]|| 75 ||'''--disable-static-linkage'''||disable static linking of certain libraries|| 76 ||'''--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)|| 108 77 109 == Installation==78 === Optional Packages === 110 79 111 (Apparently 'make install' is not the correct way to install. What _is_ the correct way?) 80 ||'''--with-PACKAGE[=ARG]'''||use PACKAGE [ARG=yes]|| 81 ||'''--without-PACKAGE'''||do not use PACKAGE (same as --with-PACKAGE=no)|| 82 ||'''--with-x'''||use the X Window System|| 83 ||'''--with-apple-opengl-framework'''||use Apple OpenGL framework (Mac OS X only)|| 84 ||'''--with-wxdir=PATH'''||Use installed version of wxWidgets in PATH|| 85 ||'''--with-wx-config=CONFIG'''||wx-config script to use (optional)|| 112 86 113 Once compilation succeeded, run: 87 === Environment variables === 114 88 115 {{{ 116 make install 117 }}} 118 119 == Problems during installation == 120 121 Once you run `make install`, a few problems may occur. 122 123 Make breaks off with: 124 125 {{{ 126 /usr/bin/install -c -d /etc/init.d 127 /usr/bin/install -c -b ./boinc-client /etc/init.d/boinc-client 128 /usr/bin/install: cannot create regular file `/etc/init.d/boinc-client': Permission denied 129 }}} 130 131 This happens if you don't want to 'make install' as root. Edit {{{client/scripts/Makefile}}} and zero out the 'install-exec-hook' make target (see https://boinc.berkeley.edu/trac/ticket/1255) 89 ||'''CC'''||C compiler command|| 90 ||'''CFLAGS'''||C compiler flags|| 91 ||'''LDFLAGS'''||linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>|| 92 ||'''CPPFLAGS'''||C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>|| 93 ||'''CXX'''||C++ compiler command|| 94 ||'''CXXFLAGS'''||C++ compiler flags.|| 95 ||'''CPP'''||C preprocessor|| 96 ||'''CXXCPP'''||C++ preprocessor|| 97 ||'''F77'''||Fortran 77 compiler command|| 98 ||'''FFLAGS'''||Fortran 77 compiler flags|| 99 ||'''MYSQL_CONFIG'''||mysql_config program|| 132 100 133 101 == Source layout ==