Skip to content

Instantly share code, notes, and snippets.

@jfrey-xx
Last active January 11, 2023 23:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfrey-xx/ed0a8d5d881a7a5734064e6ad89beccd to your computer and use it in GitHub Desktop.
Save jfrey-xx/ed0a8d5d881a7a5734064e6ad89beccd to your computer and use it in GitHub Desktop.
How-to compile OpenViBE 3.2.0 on Linux Ubuntu 20.04.

Instructions to compile OpenViBE 3.2.0 beta on Ubuntu 20.04

Get the sources: wget http://openvibe.inria.fr/pub/src/openvibe-3.2.0-src.tar.xz

Uncompress: tar xvf openvibe-3.2.0-src.tar.xz

Apply patch: patch -p0 < openvibe-3.2.0_compile-ubuntu-20.04.patch

Then proceed with usual install steps:

Go to openvibe-3.2.0-src and run linux-install_dependencies.sh and then buil.sh.

The resuling files will be stored in dist subfolder. Go to openvibe-3.2.0-src/dist/Release/, and run as usual openvibe-acquisition-server.sh and openvibe-designer.sh, enjoy!

symbol lookup errors

Upon running the designer and the acquisition server I had issues because the launching scripts were locating an old Matlab installation, which outdated libraries where placed first in LD_LIBRARY_PATH, creating issues such as symbol lookup error: /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0: undefined symbol: XML_SetHashSalt (caused by an old libexpat lib) or symbol lookup error: /usr/lib/x86_64-linux-gnu/libcairo.so.2: undefined symbol: FT_Get_Var_Design_Coordinates (caused by an old freetype lib, happy bug hunt). My stupid simple fix is to comment out the faulty parts in both dist/Release/openvibe-acquisition-server.sh and dist/Release/openvibe-designer.sh (I've never bridged OpenViBE with Matlab anyways), i.e.:

#if [ "`which matlab`" != "" ] ; then
#        MATLAB_ROOT=`matlab -e | grep "^MATLAB=" | sed -e "s/^MATLAB=//"`
#        MATLAB_ARCH=`matlab -e | grep "^ARCH=" | sed -e "s/^ARCH=//"`
#        MATLAB_LIBPATH="$MATLAB_ROOT/bin/$MATLAB_ARCH"
#        # echo Matlab libs expected at $MATLAB_LIBPATH
#        export LD_LIBRARY_PATH="$MATLAB_LIBPATH:$LD_LIBRARY_PATH"
#fi

A patch won't cut it and you have to get your hands dirty because those script posses hard-coded paths (hence avoid moving around the source folder once compiled).

diff -ru openvibe-3.2.0-src/extras/contrib/plugins/server-drivers/mbt-smarting/src/ovasCSmartingAmp.cpp openvibe-3.2.0-src_patch/extras/contrib/plugins/server-drivers/mbt-smarting/src/ovasCSmartingAmp.cpp
--- openvibe-3.2.0-src/extras/contrib/plugins/server-drivers/mbt-smarting/src/ovasCSmartingAmp.cpp 2021-10-26 14:54:22.000000000 +0200
+++ openvibe-3.2.0-src_patch/extras/contrib/plugins/server-drivers/mbt-smarting/src/ovasCSmartingAmp.cpp 2022-04-20 11:12:45.000000000 +0200
@@ -406,7 +406,9 @@
m_io.stop();
// After a timeout & cancel it seems we need
// to do a reset for subsequent reads to work.
- m_port->get_io_service().reset();
+ //m_port->get_io_service().reset();
+ // FIXME: fix for recent versions of boost, untested
+ ((boost::asio::io_context&)m_port->get_executor().context()).reset();
}
// Called when the timer's deadline expires.
diff -ru openvibe-3.2.0-src/extras/plugins/processing/network-io/src/box-algorithms/ovpCBoxAlgorithmTCPWriter.cpp openvibe-3.2.0-src_patch/extras/plugins/processing/network-io/src/box-algorithms/ovpCBoxAlgorithmTCPWriter.cpp
--- openvibe-3.2.0-src/extras/plugins/processing/network-io/src/box-algorithms/ovpCBoxAlgorithmTCPWriter.cpp 2021-10-26 14:54:23.000000000 +0200
+++ openvibe-3.2.0-src_patch/extras/plugins/processing/network-io/src/box-algorithms/ovpCBoxAlgorithmTCPWriter.cpp 2022-04-20 11:45:08.000000000 +0200
@@ -17,7 +17,9 @@
void CBoxAlgorithmTCPWriter::startAccept()
{
- tcp::socket* socket = new tcp::socket(m_acceptor->get_io_service());
+ //tcp::socket* socket = new tcp::socket(m_acceptor->get_io_service());
+ // FIXME: fix for recent versions of boost, untested
+ tcp::socket* socket = new tcp::socket((boost::asio::io_context&)m_acceptor->get_executor().context());
// Since startAccept will only be called inside ioService.poll(), there is no need to access control m_sockets
m_sockets.push_back(socket);
diff -ru openvibe-3.2.0-src/sdk/scripts/linux-install_dependencies.pl openvibe-3.2.0-src_patch/sdk/scripts/linux-install_dependencies.pl
--- openvibe-3.2.0-src/sdk/scripts/linux-install_dependencies.pl 2021-10-26 14:54:23.000000000 +0200
+++ openvibe-3.2.0-src_patch/sdk/scripts/linux-install_dependencies.pl 2022-04-20 11:14:31.000000000 +0200
@@ -103,7 +103,8 @@
if ($lsb_release =~ '14.04'
|| $lsb_release =~ '16.04'
|| $lsb_release =~ '18.04'
- || $lsb_release =~ '19.10') {
+ || $lsb_release =~ '19.10'
+ || $lsb_release =~ '20.04') {
$distribution = 'Ubuntu ' . $lsb_release;
}
} elsif ($lsb_distributor =~ 'Fedora') {
@stellarpower
Copy link

https://gist.github.com/stellarpower/4fde7fa21480acef40549d0b07a2e66a

As Earthfile for anyone interested. Shouldn't be hard to decompose Earthfile back to Dockerfile if this is preferred over Earthly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment