Building & running server v2.3.0 LTS on Ubuntu 20.04

I’ve downloaded the repo and ran build-in-docker and extract-from-docker. The server runs on Ubuntu 18.04, but on 20.04 I get this error:

bin/casparcg: symbol lookup error: lib/libpthread.so.0: undefined symbol: __libc_vfork, version GLIBC_PRIVATE

Curious if anyone has been able to do this on Ubuntu 20.04.

Did you modify the dockerfile so that it’s using nvidia/opengl for 20.04?

Otherwise: You ran ldconfig after installing dependencies? Could also be a 32/64bit issue.

@hreinnbeck I’ve made these changes, but got the same error:

diff --git a/tools/linux/Dockerfile b/tools/linux/Dockerfile
index d130cd98a..059397e6c 100644
--- a/tools/linux/Dockerfile
+++ b/tools/linux/Dockerfile
@@ -35,7 +35,7 @@ FROM ${IMAGE_BASE} as build-casparcg
        RUN ln -s /build/staging /staging && \
                /source/shell/copy_deps.sh shell/casparcg /staging/lib
 
-FROM nvidia/opengl:1.0-glvnd-devel-ubuntu18.04
+FROM nvidia/opengl:1.0-glvnd-devel-ubuntu20.04
        COPY --from=build-casparcg /staging /opt/casparcg
 
        RUN set -ex; \
diff --git a/tools/linux/base/Dockerfile b/tools/linux/base/Dockerfile
index fd96efaad..bfd396b97 100644
--- a/tools/linux/base/Dockerfile
+++ b/tools/linux/base/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:bionic
+FROM buildpack-deps:20.04
 
 RUN apt-get update && apt-get install -yq --no-install-recommends \
        autoconf \

Where would I run ldconfig?

You’ll probably need to change all the other dockerfiles also. Does it run in Docker and just fail when extracted to host OS?

You would run ldconfig after installing the dependencies mentioned in BUILDING .md (usually not needed though). You’d also need to check whether all the dependencies are available on 20.04, you might need to change version numbers on some of the packages if some of them are not available. Some newer versions of the dependencies might have API changes that CCG doesn’t support.

Thanks @hreinnbeck but this is reaching about the same level of complexity as building from source. So, I just went ahead and started doing that.

In case anyone is interested, here are the steps I’ve followed to build CasparCG server v2.3.0 LTS for Ubuntu 20.04. The build is done inside Docker container so as not to pollute your system.

WARNING: This is work in progress, so some things may not work.

docker run -it --name casparcg nvidia/opengl:1.2-glvnd-devel-ubuntu20.04 /bin/bash

## inside container ##
apt update
apt dist-upgrade

# base
apt install --no-install-recommends git ca-certificates cmake build-essential g++ wget libglew-dev libfreeimage-dev libtbb-dev libsndfile1-dev libopenal-dev libjpeg-dev libfreetype6-dev libxcursor-dev libxinerama-dev libxi-dev libsfml-dev libvpx-dev libwebp-dev liblzma-dev libmp3lame-dev libopus-dev libtheora-dev libx264-dev libx265-dev libbz2-dev libcrypto++-dev librtmp-dev libgmp-dev libxcb-shm0-dev libass-dev libgconf2-dev libnss3 libnspr4 libxtst6 libatspi2.0-dev libatk-bridge2.0-dev libxcomposite1

# boost
apt install --no-install-recommends libboost-system1.67-dev libboost-thread1.67-dev libboost-chrono1.67-dev libboost-filesystem1.67-dev libboost-log1.67-dev libboost-locale1.67-dev libboost-regex1.67-dev libboost-date-time1.67-dev libboost-coroutine1.67-dev

# ffmpeg
apt install --no-install-recommends libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev libswresample-dev

# cef
cd /opt
wget http://opensource.spotify.com/cefbuilds/cef_binary_3.3578.1870.gc974488_linux64_minimal.tar.bz2 -O cef.tar.bz2
tar -xvjf cef.tar.bz2
mv cef_binary_* cef

mkdir -p /opt/build/cef
cd /opt/build/cef
cmake /opt/cef
make CXX_FLAGS="-Wno-attributes" -j8

cp libcef_dll_wrapper/libcef_dll_wrapper.a /opt/cef/Release/
strip /opt/cef/Release/libcef.so

# server
cd /opt
git clone https://github.com/CasparCG/server.git -b v2.3.0-lts-stable --depth 1 server

sed -i -e "s/Boost 1.66.0/Boost 1.67.0/" server/src/CMakeModules/Bootstrap_Linux.cmake
sed -i -e "s/pthread$/pthread X11/" server/src/shell/CMakeLists.txt

mkdir -p /opt/build/server
cd /opt/build/server
cmake /opt/server/src/
make -j8

exit

## outside container ##
docker cp casparcg:/opt/build/server/staging server
docker rm casparcg

If everything went well, you should have server v2.3.0 LTS built inside the server folder. You might need to install a few missing packages (eg, libsfml-graphics2.5) on your system, if it fails to run.

NB: This version of the server uses native boost and ffmpeg packages.

6 Likes

That works! Thanks!
I needed only to change the base URL in the command

wget http://opensource.spotify.com/cefbuilds/cef_binary_3.3578.1870.gc974488_linux64_minimal.tar.bz2 -O cef.tar.bz2

from http://opensource.spotify.com/cefbuilds to https://cef-builds.spotifycdn.com
so finally the command lools like

wget https://cef-builds.spotifycdn.com/cef_binary_3.3578.1870.gc974488_linux64_minimal.tar.bz2 -O cef.tar.bz2

Seems the domain http://opensource.spotify.com no more available.

Thanks @silencedis. Strangely, I can’t figure out how to edit my own post… :face_with_raised_eyebrow: Hopefully people will your post with an updated link.

You should have a button with 3 dots. Clicking this shows a pencil icon. Clicking this allows editing.

@didikunz one would think so, right?.. but I don’t have that button. Maybe because the post is too old?

Things changed again :sweat_smile:
Now if you follow the first link, you will be redirected to the Spotify main page.
The second link’s no more available.
But http://opensource.spotify.com now is available again, although it just redirects to https://www.spotify.com/us/opensource which provides a list of links for CEF sources downloading.

Probably because it’s marked as a solution?

Sorry for the off topic input… The forum lets you edit your posts only for a couple of days (maybe weeks), after that the posts get locked and the edit button dissapears.
Same thing happened to me with the launcher thread.

@silencedis the second link still works for me:

https://cef-builds.spotifycdn.com/cef_binary_3.3578.1870.gc974488_linux64_minimal.tar.bz2

In case anyone is interested, here are the steps I’ve followed to build CasparCG server v2.3.0 LTS for Ubuntu 20.04. The build is done inside Docker container so as not to pollute your system.

WARNING: This is work in progress, so some things may not work.

docker run -it --name casparcg nvidia/opengl:1.2-glvnd-devel-ubuntu20.04 /bin/bash

## inside container ##
apt update
apt dist-upgrade

# base
apt install --no-install-recommends git ca-certificates cmake build-essential g++ wget libglew-dev libfreeimage-dev libtbb-dev libsndfile1-dev libopenal-dev libjpeg-dev libfreetype6-dev libxcursor-dev libxinerama-dev libxi-dev libsfml-dev libvpx-dev libwebp-dev liblzma-dev libmp3lame-dev libopus-dev libtheora-dev libx264-dev libx265-dev libbz2-dev libcrypto++-dev librtmp-dev libgmp-dev libxcb-shm0-dev libass-dev libgconf2-dev libnss3 libnspr4 libxtst6 libatspi2.0-dev libatk-bridge2.0-dev libxcomposite1

# boost
apt install --no-install-recommends libboost-system1.67-dev libboost-thread1.67-dev libboost-chrono1.67-dev libboost-filesystem1.67-dev libboost-log1.67-dev libboost-locale1.67-dev libboost-regex1.67-dev libboost-date-time1.67-dev libboost-coroutine1.67-dev

# ffmpeg
apt install --no-install-recommends libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libswscale-dev libpostproc-dev libswresample-dev

# cef
cd /opt
wget https://cef-builds.spotifycdn.com/cef_binary_3.3578.1870.gc974488_linux64_minimal.tar.bz2 -O cef.tar.bz2
tar -xvjf cef.tar.bz2
mv cef_binary_* cef

mkdir -p /opt/build/cef
cd /opt/build/cef
cmake /opt/cef
make CXX_FLAGS="-Wno-attributes" -j8

cp libcef_dll_wrapper/libcef_dll_wrapper.a /opt/cef/Release/
strip /opt/cef/Release/libcef.so

# server
cd /opt
git clone https://github.com/CasparCG/server.git -b v2.3.0-lts-stable --depth 1 server

sed -i -e "s/Boost 1.66.0/Boost 1.67.0/" server/src/CMakeModules/Bootstrap_Linux.cmake
sed -i -e "s/pthread$/pthread X11/" server/src/shell/CMakeLists.txt

mkdir -p /opt/build/server
cd /opt/build/server
cmake /opt/server/src/
make -j8

exit

## outside container ##
docker cp casparcg:/opt/build/server/staging server
docker rm casparcg

If everything went well, you should have server v2.3.0 LTS built inside the server folder. You might need to install a few missing packages (eg, libsfml-graphics2.5) on your system, if it fails to run.

NB: This version of the server uses native boost and ffmpeg packages.

1 Like

@didikunz @rrebuffo well, I’ve just created a new post with updated link and accepted it as a solution :sunglasses:

So does this run inside a docker or outside of it.

@bifuteki outside.

So i can do this without being in a docker. I dont mind it polluting my system as I want it to only run caspar

@bifuteki was that a question?