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

Installation issue Debian and Mac #73

Open
ronappleton opened this issue May 23, 2021 · 2 comments
Open

Installation issue Debian and Mac #73

ronappleton opened this issue May 23, 2021 · 2 comments

Comments

@ronappleton
Copy link

Hi, I have been trying to build and use media-server-go in both Mac and in a docker container based on Debian

Building and installing appears to happen fine but when running the WebRTC-Broadcast: WebRTC publish and play example

I constantly get the following:

image

This happens both when trying to build locally on the Mac and within my docker container:

This is my dockerfile:

FROM golang:latest as build

ENV APPLICATION_NAME=app

# Set necessary environmet variables needed for our image
ENV GO111MODULE=on \
    CGO_ENABLED=1 \
    GOOS=linux \
    GOARCH=amd64

# Move to working directory /build
WORKDIR /build/src

## Copy and download dependency using go mod
COPY ./src/go.mod .
COPY ./src/go.sum .
RUN go mod download

## Update our list
RUN apt-get update -y
RUN apt-get upgrade -y

## Install os dependancies
RUN apt-get install -y \
    debian-archive-keyring \
    curl \
    gnupg \
    apt-transport-https \
    git \
    wget \
    vim \
    lsb-release \
    autoconf \
    libtool \
    automake \
    software-properties-common \
    g++-7

RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90

RUN git clone --recurse-submodules https://github.com/notedit/media-server-go.git
RUN cp /build/src/media-server-go/media-server/ext/crc32c/config/Linux-x86_64/crc32c/crc32c_config.h /build/src/media-server-go/media-server/ext/crc32c/include/crc32c/

WORKDIR /build/src/media-server-go

RUN make

RUN go install

WORKDIR /build/src

# Add our application folder and change to it for working
ADD ./src /go/src/${APPLICATION_NAME}
#WORKDIR /go/src/${APPLICATION_NAME}

# Build our go application
RUN go get
RUN go build -o main /go/src/${APPLICATION_NAME}

WORKDIR /go/src/main-server-go
RUN go build

# Export necessary port
EXPOSE 3000

# Run our go application
RUN ln -s /go/src/${APPLICATION_NAME}/main /go/src/docker_entrypoint.sh
CMD ["/go/src/docker_entrypoint.sh"]

This is the container result:

image

I have looked all over the net and cannot find any similar issues for media-serger-go.

Has anyone else experienced this issue and solved it?

Many Thanks

@alexalmadav
Copy link

@ronappleton I just tried it on macos and got the same issue, did you ever solve it?

@alexalmadav
Copy link

fixed, so after following the instructions and running go install, the library gets installed in $GOPATH/pkg/mod/github.com/notedit/media-server-go@v0.2.1 but the C++ files aren't copied from the cloned folder. I copied media-server and thirdparty folders over and that solved 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

2 participants