OpenBSD

From BOINC
Jump to: navigation, search

NOTE: The OpenBSD support is in progress.

The following description only applies for the i386 architecture. The goal is to compile Boinc on OpenBSD and calculate work units with the linux emulation. Be sure you have the prerequisites: curl, git, ...

Installing

First of all, you will have to enable the linux emulation.

Run in root:

# pkg_add fedora_base
# sysctl kern.emul.linux=1

For this to be done automatically each time the computer boots, remove the # (comment) character at the beginning of the line #kern.emul.linux=1 in /etc/sysctl.conf, so that it reads kern.emul.linux=1 and reboot your system to have it take effect.

Then, obtain the source code:

$ git clone git://boinc.berkeley.edu/boinc.git
$ cd boinc

Export environment variables - to be adapted to your system:

$ export AUTOMAKE_VERSION=1.12
$ export AUTOCONF_VERSION=2.69
$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig
$ export CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/X11R6/include"
$ export LDFLAGS="-L/usr/lib -L/usr/local/lib -L/usr/X11R6/lib"

Compile Boinc:

$ ./_autosetup
$ ./configure --disable-server --disable-manager --with-boinc-platform=i686-pc-linux-gnu
$ make

As you can see, we don't build the server and the manager, and we use i686-pc-linux-gnu as the default platform. If you want to have the gui, pass --enable-manager and see the patch below.

Install it:

$ su root -c 'make install'

To join projects, refer to the Boinccmd tool.

Daemon

You can refer to the OpenBSD FAQ.

Create the boinc data directory:

# mkdir /var/db/boinc

Create the boinc_daemon file in /etc/rc.d/ (needs root), and put these lines in it:

#!/bin/sh
daemon="/usr/local/bin/boinc_client --daemon --dir /var/db/boinc/"
. /etc/rc.d/rc.subr
rc_cmd $1

Chmod it to 555:

# chmod 555 /etc/rc.d/boinc_daemon

Now, edit your /etc/rc.conf file, and add (or modify) your pkg_scripts variable, so that it will look like:

pkg_scripts="boinc_daemon"

Now Boinc will be started at the boot time as a daemon.

Port status

GUI

There is currently an issue with the manager, it will be fixed soon. For the moment, you will need to apply this patch:

diff --git a/clientgui/AsyncRPC.cpp b/clientgui/AsyncRPC.cpp
index 8c5dcd8..e717a11 100644
--- a/clientgui/AsyncRPC.cpp
+++ b/clientgui/AsyncRPC.cpp
@@ -19,6 +19,7 @@
 #pragma implementation "AsyncRPC.h"
 #endif
 
+#include "config.h"
 #include "stdwx.h"
 #include "BOINCGUIApp.h"
 #include "MainDocument.h"
@@ -30,7 +31,8 @@
 #include "DlgEventLog.h"
 #include "util.h"
 
-#if !(defined(_WIN32) || (defined(__WXMAC__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4)))
+#if !(defined(_WIN32) || (defined(__WXMAC__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4))) \
+    && !defined(NO_PER_THREAD_LOCALE)
 #include <xlocale.h>
 #include "gui_rpc_client.h"
 #endif

Projects

Status at 2012/12/14:

Project Tested State
SIMAP Yes Works
Cosmology@home Yes Works
SETI@home No  ?
Einstein@home No  ?
Malariacontrol Yes Doesn't work
FightMalaria@home Yes Doesn't work