From 9c768277c7a3e433e99cba46e7359c4682e5bcfc Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Tue, 17 Oct 2023 19:12:54 +0300 Subject: [PATCH] Use sudo static Docker builds --- Dockerfile | 5 +++-- README.md | 4 ++-- pkg/encoder/yuv/libyuv/libyuv.go | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d874271d..0d696da1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG VERSION=master # base build stage FROM ubuntu:lunar AS build0 -ARG GO=1.20.7 +ARG GO=1.20.8 ARG GO_DIST=go${GO}.linux-amd64.tar.gz ADD https://go.dev/dl/$GO_DIST ./ @@ -47,11 +47,12 @@ WORKDIR ${BUILD_PATH} # install deps RUN apt-get -q update && apt-get -q install --no-install-recommends -y \ - gcc \ + build-essential \ libopus-dev \ libsdl2-dev \ libvpx-dev \ libyuv-dev \ + libjpeg-turbo8-dev \ libx264-dev \ pkg-config \ && rm -rf /var/lib/apt/lists/* diff --git a/README.md b/README.md index d1d837ad..db4e23cf 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,13 @@ a better sense of performance. ``` # Ubuntu / Windows (WSL2) -apt-get install -y make gcc pkg-config libvpx-dev libx264-dev libopus-dev libsdl2-dev libyuv-dev +apt-get install -y make gcc pkg-config libvpx-dev libx264-dev libopus-dev libsdl2-dev libyuv-dev libjpeg-turbo8-dev # MacOS brew install pkg-config libvpx x264 opus sdl2 jpeg-turbo # Windows (MSYS2) -pacman -Sy --noconfirm --needed git make mingw-w64-x86_64-{gcc,pkgconf,dlfcn,libvpx,opus,x264-git,SDL2,libyuv} +pacman -Sy --noconfirm --needed git make mingw-w64-x86_64-{gcc,pkgconf,dlfcn,libvpx,opus,x264-git,SDL2,libyuv,libjpeg-turbo} ``` Because the coordinator and workers need to run simultaneously. Workers connect to the coordinator. diff --git a/pkg/encoder/yuv/libyuv/libyuv.go b/pkg/encoder/yuv/libyuv/libyuv.go index 8bde0ad8..8eba7a31 100644 --- a/pkg/encoder/yuv/libyuv/libyuv.go +++ b/pkg/encoder/yuv/libyuv/libyuv.go @@ -3,7 +3,8 @@ package libyuv /* -#cgo !darwin LDFLAGS: -lyuv +#cgo !darwin,!st LDFLAGS: -lyuv +#cgo !darwin,st LDFLAGS: -l:libyuv.a -l:libjpeg.a -lstdc++ #cgo darwin CFLAGS: -DINCLUDE_LIBYUV_VERSION_H_ #cgo darwin LDFLAGS: -L${SRCDIR} -lstdc++