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

Running installation script #216

Open
rshapira1 opened this issue Sep 29, 2023 · 1 comment
Open

Running installation script #216

rshapira1 opened this issue Sep 29, 2023 · 1 comment

Comments

@rshapira1
Copy link

Running on pi 4 running Debian GNU/Linux 11 (bullseye) 64 Bit version using Raspberry pi imager.
I'm trying to run the script $ GO111MODULE=on go run *.go
After it downloading bunch of files I get this error:

gcc: error: unrecognized command-line option '-marm'.

my gcc version gcc (Debian 10.2.1-6) 10.2.1 20210110
go: go version go1.21.1 linux/arm

My environment:
SHELL=/bin/bash
NO_AT_BRIDGE=1
PWD=/home/pi/RTSPtoWeb
LOGNAME=pi
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/pi
LANG=en_GB.UTF-8
LS_COLORS: ...........
SSH_CONNECTION=192.168.1.203 52727 192.168.1.215 22
XDG_SESSION_CLASS=user
TERM=xterm
USER=pi
SHLVL=1
XDG_SESSION_ID=4
XDG_RUNTIME_DIR=/run/user/1000
SSH_CLIENT=192.168.1.203 52727 22
PATH=/home/pi/.local/share/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_TTY=/dev/pts/0
OLDPWD=/home/pi
GOPATH=/home/pi/.local/share/go
TEXTDOMAIN=Linux-PAM
_=/usr/bin/printenv

I added those line
CGO_ENABLED=1
CC=aarch64-linux-gnu-gcc
GOOS=linux GOARCH=arm64
GOARM=
GOMIPS=
GOMIPS64=

However, i still getting the same error, Furthermore, looking for instruction how to install the package on PI since I understand that the gcc doesn't support the -marm on arm.

@maxim729467
Copy link

maxim729467 commented Oct 19, 2023

I managed to run the app on Raspberry Pi using docker
You can just containerize the app for arm-based systems

FROM --platform=linux/arm64 golang:1.18

WORKDIR /go/src/app
COPY .  .

RUN go get -d -v ./...
RUN go install -v ./...

EXPOSE 8083

ENV GO111MODULE=on
ENV GIN_MODE=release

CMD go run *.go

and run it this with docker-compose for example:

version: "3.7"

services:
  webrtc:
    image: your-repo/your-image:your-tag
    container_name: rtsp-to-webrtc
    network_mode: host
    restart: always

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