LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   HOW-TO: Installing BOINC on Slackware 14.2: Dependencies and configure options (https://www.linuxquestions.org/questions/slackware-14/how-to-installing-boinc-on-slackware-14-2-dependencies-and-configure-options-4175591634/)

kingbeowulf 10-18-2016 01:55 AM

HOW-TO: Installing BOINC on Slackware 14.2: Dependencies and configure options
 
There have been a few posts on LQ and elsewhere on getting BOINC running on Slackware. The Linux binaries at https://boinc.berkeley.edu are 2+ years old and have always had issues running on Slackware, especially BOINC Manager, the graphical interface (GUI).

These brief instructions will generate the BOINC Manager binaries and associated files for newer BOINC git branches so they will run using only dependencies available on Slackbuilds.org and a full, stock Slackware installation.

SOURCE
First, we must download a release branch from the BOINC git repository:
https://github.com/BOINC/boinc/releases

I find github a bit non-intuitive to find releases, in a proper format, so here is a script that will clone a branch and create a SBo script compliant tarball:
Code:

#!/bin/sh
# pull in stable release branch and format for SBo

VERSION=${VERSION:-7.6.33}

rm -rf boinc_repo
git clone https://github.com/BOINC/boinc --branch client_release/7/7.6 --single-branch boinc_repo
cd boinc_repo
git archive --format=tar --prefix Boinc-$VERSION/ client_release/7.6/$VERSION | bzip2 > ../Boinc-$VERSION.tar.bz2
cd ..
md5sum Boinc-$VERSION.tar.bz2 >>Boinc.md5

We now have the latest release of the stable 7.6 branch.

DEPENDENCIES
All of these are available at Slackbuilds.org. All other dependencies are part of Slackware.
  1. libwebp-0.5.1 (stock SBo)
  2. webkitgtk-2.4.11 (stock SBo)
  3. wxGTK3-3.0.2 (customized)

For Boinc Manager, the wxGTK3 SBo script's configure stanza must be modified:
Code:

# disable-shared; enable-webview; enable-webkit required for BOINC
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --disable-shared \
  --enable-mediactrl \
  --with-opengl \
  --enable-graphics_ctx \
  --with-gtk=2 \
  --enable-unicode \
  --enable-plugins \
  --enable-ipv6 \
  --enable-webview \
  --enable-webkit \
  $stl \
  --build=$ARCH-slackware-linux

After installation of wxGTK3, make sure that the wx-config symlink is correct: /usr/bin/wx-config -> /usr/lib64/wx/config/gtk2-unicode-static-3.0

With wxGTK/wxGTK3 (and wxPython[3]) varieties on SBo as dependencies for a number of packages, you must make sure this symlink points to the correct one for BOINC. Please read the SBo package READMEs carefully if mixing different wxWidgets versions.

BOINC
Now we are ready to compile BOINC. This SlackBuild script generates all the GUI and CLI client binaries (no server). Since I am only interested in running the GUI as needed and as the currently logged in user, I run it via a small shell script to point boincmgr to the user's $HOME/.boinc_data for data storage. The $DATDIR is blank by default and must be specified when running the script. In the future I will add an /etc/rc.d/rc.boinc startup script for unattended operation.
Code:

#!/bin/bash

# Slackware build script for Boinc

# Copyright 2013-2016 Edward Koenig, Vancouver, WA, USA <kingbeowulf@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# TODO: give choice between boincmgr (this) and boinc CLI and add rc.boinc.

PRGNAM=Boinc
VERSION=${VERSION:-7.6.33}
BUILD=${BUILD:-1}
TAG=${TAG:-_ewk}

# Your default working directory location. Pass with DATADIR=<dir> Boinc.SlackBuild
DATADIR=${DATADIR:-"x"}

if [ "$DATADIR" = "x" ]; then
  echo "Please specify the data directory location. For example:"
  echo "DATADIR=/home/<user>/.boinc_data ./Boinc.SlackBuild"
  exit 1
fi

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
      *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 -exec chmod 644 {} \;

./_autosetup

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --disable-server \
  --disable-shared \
  --enable-manager \
  --with-x \
  --build=$ARCH-slackware-linux

make
make install DESTDIR=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  COPYING COPYRIGHT INSTALL todo notes \
  $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/usr/share/{applications,pixmaps}
cp $CWD/boinc.png $PKG/usr/share/pixmaps
cp $CWD/Boinc.desktop $PKG/usr/share/applications
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/boincgui.sh > $PKG/usr/bin/boincgui.sh
sed -i "s|WORKDIR|$DATADIR|g" $PKG/usr/bin/boincgui.sh
chmod +x $PKG/usr/bin/boincgui.sh
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

To generate only the CLI client, replace "enable-manager" with "enable-client" and you can then omit all the wxGTK3 stuff above. Please note that webgitgtk takes a LONG time to compile (4.5+ hrs on my i7-5820K CPU @ 3.30GHz 16GB RAM system.

RUNNING
My Boinc slackbuild package will include a boincgui.sh startup script for boincmgr so that boincmgr knows where to find everything. This script is also used in a customized Boinc.desktop file for your WM/DE of choice. I hope to add an rc.boinc, for example, in the future.

For those you want to try it out, for Slackware64-14.2, my scripts and packages are here:
http://www.koenigcomputers.com/files/utils/
http://www.koenigcomputers.com/files/sbo-testing/
Packages were compiled in a clean qemu VM. I won't post the Boinc package, since DATADIR points to my $HOME. It doesn't take too long to compile, though.

libwebp, webkitgtk scripts can be obtained from SBo, as well as links to the source code. I will host only Boinc-7.6.33.tar.bz source. Remember to use my wxGTK3 archive and not the one on SBo

Comments, improvements are welcome. If worthy, let me know if this is useful information for inclusion on http://docs.slackware.com

FTIO 10-19-2016 12:33 PM

Thank you for this!! I'll get to trying it out in a few days.

FTIO 10-20-2016 01:31 PM

Okay, question...should I make a BOINC directory and move the git tarball I now have to it and then move the build file into the same directory and proceed to build from there?

If I already have an old version of BOINC running on my system, should I stop using that and this new 'build' you have for us here will take the place of the old build?

Hopefully you'll understand what I'm trying to get at and ask, since there isn't any Slackbuild for BOINC and all one does (or at least what I've always done) is download the tarball from the berkeley place, extract it and just start from that. Is this going to be pretty much the same thing, except that I have to have the tarball and bash file in their own directory? I have no .boinc_data directory that I can find anywhere - hidden or not.

kingbeowulf 10-21-2016 01:25 PM

The file from BIONC is a script that extracts a pre-built binary. You do NOT want to use that. My HOW-TO is for building your own BOINC client binaries directly from BOINC git source.

The simplest process is to download my boinc.tar.gz, untar that, and put get.boinc.sh script into that boinc directory, run it to create the source Boinc-7.6.33.tar.bz2, then, assuming you have the 3 dependencies built and installed (a 4-6+ hr process depending on your CPU), just run
Code:

DATADIR=/home/<user>/.boinc_data ./Boinc.SlackBuild
to create your standard SBo type package in /tmp. Change DATADIR to where your current boinc data is now. Tested on 7.6.32 and 7.6.33 source and for others YMMV. If you download 7.6.33 source from github, you may need to adjust the Slackbuild a bit.

You will need to remove your old BOINC build as some files will conflict, depending on how you installed your version (global or in $HOME, etc). Your data directory must not contain any BOINC client binary files or libraries. And yes you do have a .boinc_data directory (it might tbe called something else): it is whatever directory BOINC sticks the project files and data.

My slackbuild follows Slackbuild.org guidelines as I expect to submit to SBo once I work out a few kinks. You do NOT want to move the slackbuild and source tarball into any existing BOINC directory.

glorsplitz 10-23-2016 09:19 AM

webgitgtk-2.4.11 should be webkitgtk-2.4.11

This has kind of irritated me, I have slackware64 14.2 I upgraded from 14.1 running boinc 7.2.42 (x64) but could not get boinc to install on new install of slackware64 14.2.

Thanks for the howto, working on it now, will post back results.

glorsplitz 10-23-2016 07:14 PM

what happened for me
 
2 Attachment(s)
@kingbeowulf

Everything worked as you documented. I started up boinc, assigned it to seti, laptop sounds like a wind tunnel.

Clicked on prefs and found attached:BOINC_Computing_preferences-7.6.33.jpg

BOINC_Computing_preferences-7.2.42.jpg is from other computer.

I'm not able to get at the values in the preferences except the ones that can be seen, any ideas?

What's your computing preferences look like.

FTIO 10-24-2016 12:14 AM

Got it built and installed, but starting it in konsole says:

Code:

me@FTF:~$ /usr/bin/boincmgr
/usr/bin/boincmgr: error while loading shared libraries: libwebp.so.5: cannot open shared object file: No such file or directory

And yet I have the latest libwebp installed from SlackBuilds.org.

FTIO 10-27-2016 08:38 AM

Okay...got libwebp.so.5 installed by having to downgrade to libwebp-4.4.tar.gz., which got this 7.6.33 working, or I should say at least starting up. It doesn't give me the choice though of switching to the advanced view but that might be because of what's in the following paragraph.

Unfortunately, using the 7.2.25 nor this 7.6.33 is able to get anything from anywhere. It just sits there and eventually times out and disconnects from trying to do anything with the core or local system. The old one won't even do anything when I place my account.xml file back in the BOINC directory and start it in hopes of it finding all it needs.

kingbeowulf 10-29-2016 03:18 PM

Quote:

Originally Posted by glorsplitz (Post 5621794)
webgitgtk-2.4.11 should be webkitgtk-2.4.11

Oops...fixed. damn bifocals..

kingbeowulf 10-29-2016 03:32 PM

1 Attachment(s)
Quote:

Originally Posted by glorsplitz (Post 5622062)
@kingbeowulf
I'm not able to get at the values in the preferences except the ones that can be seen, any ideas?

What's your computing preferences look like.

I use http://bam.boincstats.com/ to manage the my projects. In your screenshots your are using the web-based preferences so anything you enter under local settings is ignored. Once you select local settings (from Options - Computing Preferences) and click OK, Boinc Manager should start using the local ones. I've done this and attached a screen shot.

kingbeowulf 10-29-2016 04:02 PM

@FTIO

You did something out of order or you used the wrong slackbuilds or you are not running the correct binaries. Simple and advanced view works. Make sure you read through everything. You can NOT just start boincmgr or use any of the files from the Boinc precompiled package. You MUST use the boincgui.sh shell script I provide in the boinc package, as well as the customized Boinc.desktop file. The command line binaries all need options to tell them were to look for the binaries and your BOINC directory. In other words, boincmgr needs to know where the actual boinc client is, and where to find or put the data (I don't recall what the default is ATM).
Code:

$ set DATADIR="/path/to/find/the/files"
$ boincmgr --clientdir=/usr/bin --datadir=$DATADIR

If your boinc is looking for libwebp.so.5, then you are either using a pre-compiled binary or you have a mangled /use/lib or /usr/lib64. If you are using multilib...compiling on multilib was not tested. I compiled everything in a clean Slackware64 VM. Those clean x86_64 packages are now running on my multilib system.
Code:

$ ldd /usr/bin/boincmgr |grep libwebp
libwebp.so.6 => /usr/lib64/../lib64/libwebp.so.6 (0x00007f02bec97000)


FTIO 10-29-2016 08:42 PM

Aww....crud. Yes, I'm on a multi-lib x86_64 system. sigh...loks like that'll screw things up.

glorsplitz 10-30-2016 01:00 PM

1 Attachment(s)
@kingbeowulf

Attached says I am using local preferences.

I cannot get at options that are not visible, there's no slider, I can't expand the window.

Even though you are using web preferences, what does your Computing Preferences panel look like?

Why is the Computing Preferences panel being display in this way?

kingbeowulf 10-30-2016 04:41 PM

Quote:

Originally Posted by glorsplitz (Post 5624880)
@kingbeowulf

Attached says I am using local preferences.

I cannot get at options that are not visible, there's no slider, I can't expand the window.

Even though you are using web preferences, what does your Computing Preferences panel look like?

Why is the Computing Preferences panel being display in this way?

The screen I posted earlier is what mine loks like (i.e. normal). Yes, yours is a bit odd. You should check your WM/DE settings for DPI, xorg settings, etc. I'm using Xfce. Are you in KDE? What GPU? This may be one of those GTK/QT issues.

glorsplitz 10-30-2016 06:42 PM

@kingbeowulf

Thank you for following up. This computer is freshly installed Slackware 64 14.2 everything up to date, using KDE.

Yes I figured some GTK/QT issue but I'm not programmer type to figure out whatever issue that way, I'll check on the other things next chance I get.


All times are GMT -5. The time now is 02:15 AM.