Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails in dockerfile #42

Open
Speshl opened this issue Mar 13, 2023 · 1 comment
Open

Build fails in dockerfile #42

Speshl opened this issue Mar 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Speshl
Copy link

Speshl commented Mar 13, 2023

Attempting to build in docker file and receiving the following error:

$ docker build --platform "linux/arm/v6" --output "./build" .
[+] Building 18.3s (12/13)
 => [internal] load build definition from Dockerfile                                                                                                                                                        0.0s
 => => transferring dockerfile: 1.52kB                                                                                                                                                                      0.0s 
 => [internal] load .dockerignore                                                                                                                                                                           0.0s 
 => => transferring context: 2B                                                                                                                                                                             0.0s 
 => resolve image config for docker.io/docker/dockerfile:1                                                                                                                                                  0.3s 
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:39b85bbfa7536a5feceb7372a0817649ecb2724562a38360f4d6a7782a409b14                                                                             0.0s
 => [internal] load .dockerignore                                                                                                                                                                           0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                        0.0s 
 => [internal] load metadata for docker.io/crazymax/goxx:latest                                                                                                                                             0.3s 
 => [internal] load build context                                                                                                                                                                           0.2s
 => => transferring context: 50.60kB                                                                                                                                                                        0.1s 
 => [base 1/2] FROM docker.io/crazymax/goxx:latest@sha256:e39c04878d7249622367528c86d4cbedac3a8c916a2177400f055edfc36f6b51                                                                                  0.0s 
 => CACHED [base 2/2] WORKDIR /out                                                                                                                                                                          0.0s 
 => [build 1/2] RUN --mount=type=cache,sharing=private,target=/var/cache/apt   --mount=type=cache,sharing=private,target=/var/lib/apt/lists   goxx-apt-get install -y binutils gcc g++ pkg-config          16.8s 
 => ERROR [build 2/2] RUN --mount=type=bind,source=.   --mount=type=cache,target=/root/.cache   --mount=type=cache,target=/go/pkg/mod   goxx-go build -o /out/simple-cam .                                  0.7s
------
 > [build 2/2] RUN --mount=type=bind,source=.   --mount=type=cache,target=/root/.cache   --mount=type=cache,target=/go/pkg/mod   goxx-go build -o /out/simple-cam .:
#12 0.700 # github.com/vladimirvivien/go4vl/v4l2
#12 0.700 vendor/github.com/vladimirvivien/go4vl/v4l2/capability.go:51:33: could not determine kind of name for C.V4L2_CAP_IO_MC
------
executor failed running [/bin/sh -c goxx-go build -o /out/${OUTPUT} .]: exit code: 1

Using the provided dockerfile in the simple webcam example. Same code compiles and runs successfully on a Pi 4.

@vladimirvivien vladimirvivien added the bug Something isn't working label Mar 17, 2023
@vladimirvivien
Copy link
Owner

Hi @Speshl
I am not sure what the issue is. It looks like it did not install all of the necessary libs for cross compilation. I will mark this as "bug" to take a look again at that Dockerfile.

Honestly, I prefer using the Zig method of cross-compilation (MacOS -> Linux). I may end up removing the docker instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants