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 Issue #56

Open
pgsnimble opened this issue Aug 21, 2024 · 2 comments
Open

Build Issue #56

pgsnimble opened this issue Aug 21, 2024 · 2 comments

Comments

@pgsnimble
Copy link

Hey!!

I am trying to use this library to encode the video and I can't find a way to make it work, everytime I try to build the app I am always getting the following error:

 => ERROR [builder-debug 2/2] RUN --mount=type=cache,target=/root/.cache/go-build     go build -gcflags="all=-N -l" -ldflags "-X main.BuildVersion=dev-debug" -o /tmp/gobuild/bin/jbl                            0.5s
------
 > [builder-debug 2/2] RUN --mount=type=cache,target=/root/.cache/go-build     go build -gcflags="all=-N -l" -ldflags "-X main.BuildVersion=dev-debug" -o /tmp/gobuild/bin/jbl:
#0 0.489 # github.com/hraban/opus
#0 0.489 /go/pkg/mod/github.com/hraban/[email protected]/streams_map.go:32:23: undefined: Stream
#0 0.489 /go/pkg/mod/github.com/hraban/[email protected]/streams_map.go:36:40: undefined: Stream
#0 0.489 /go/pkg/mod/github.com/hraban/[email protected]/streams_map.go:42:30: undefined: Stream
#0 0.489 /go/pkg/mod/github.com/hraban/[email protected]/streams_map.go:53:31: undefined: Stream
#0 0.489 /go/pkg/mod/github.com/hraban/[email protected]/streams_map.go:62:25: undefined: Stream

Do you mind to help me?

This is a piece of my docker file

ARG UBUNTU_IMAGE_VERSION=24.04
ARG YT_DLP=2024.08.06

FROM golang:1.21.3 AS base

ENV CGO_ENABLED=0
ENV GOPRIVATE=github.com/ppaulogustavo

RUN go install github.com/jstemmer/go-junit-report@latest
RUN go install github.com/go-delve/delve/cmd/dlv@latest

WORKDIR /tmp/gobuild
COPY ./go.mod ./go.sum ./
RUN go mod download -x
COPY . .

FROM base as builder-debug
ARG BUILD_VERSION='dev-debug'

RUN apt-get update && apt-get install -y pkg-config libopus-dev libopusfile-dev moreutils

RUN --mount=type=cache,target=/root/.cache/go-build \
    go build -gcflags="all=-N -l" -ldflags "-X main.BuildVersion=${BUILD_VERSION}" -o /tmp/gobuild/bin/jbl

This is triggering the error when the build command is executed

@hraban
Copy link
Owner

hraban commented Aug 22, 2024

Hi, weird, it looks like the stream.go file isn't available in that directory. Is the directory mounted from somewhere else, without that file? Try an ls and see if it exists before building.

@ErikGoldman
Copy link

I'm having the same issue on Windows. @pgsnimble were you able to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants