Dockerfile https://git.io/Je9tV
FROM golang:1.12
RUN apt-get update && \
apt-get install -y libc6-dev libglu1-mesa-dev libgl1-mesa-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libasound2-dev
RUN go get github.com/hajimehoshi/ebiten/...
RUN go version ;\
go env ;\
cd $(go env GOPATH)/src/github.com/hajimehoshi/ebiten ;\
go build -ldflags '-linkmode external -extldflags -static' -tags=example ./examples/life
docker build -t test .
or
docker build -t test https://git.io/Je9tV
env
go version go1.12.14 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build242151166=/tmp/go-build -gno-record-gcc-switches"
error
# github.com/hajimehoshi/ebiten/examples/life
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Thanks. I'll try this later.
Reproduced.
In the first place, I was wondering if it is possible to create an application statically linked with OpenGL parts.
Most helpful comment
In the first place, I was wondering if it is possible to create an application statically linked with OpenGL parts.