DEV Community

Slavius
Slavius

Posted on

Fixing issues running Folding@Home on Gentoo/Sabayon Linux

The problem

Directly after installing Folding@Home (FaH from now on) on recent version of Sabayon Linux (based on Gentoo Linux) there are issues with OpenSSL libraries linked. One of the dependent packages installed is openssl-compat which however is also too recent for ancient FaH client released in 2018.

Source of the problems

Examining the original dependencies of FaH client is OpenSSL 1.0.1 while openssl-compat package includes version 1.0.2u which results in unrecoverable errors during FaH application runtime due to ABI changes.

The solution

Solution is to install older OpenSSL libopenssl.so and libcrypto.so libraries. To avoid collisions with openssl-compat package, which can now be safely uninstalled (if you validate no other packages depend on it) by:
sudo equo rm --ask --nodeps openssl-compat

I opted to download OpenSSL 1.0.1 from GitHub repository, compile the shared libraries and install them inplace.

This can be easily achieved by:

#clone GitHub repo
git clone https://github.com/openssl/openssl.git 
cd openssl 
# switch to 1.0.1 branch
git checkout OpenSSL_1_0_1-stable 
# configure with the same Sabayon system wide CFLAGS
CFLAG="-O2 -march=x86-64 -pipe -fno-strict-aliasing -Wa,--noexecstack" ./Configure linux-x86_64 shared 
# make libs only - libssl.so and libcrypto.so
make build_libs 
# remove now invalid symlinks in FaH client folder
sudo rm –f /opt/foldingathome/libcrypto.so.10 /opt/foldingathome/libssl.so.10 
# copy new libraries over
sudo cp ./libcrypto.so.1.0.0 /opt/foldingathome/libcrypto.so.10 
sudo cp ./libssl.so.1.0.0 /opt/foldingathome/libssl.so.10

Now running FaH client works correctly.

Happy folding against COVID-19! Stay safe!

Top comments (0)