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

Not working on FreeBSD systems #81

Open
ARPABoy opened this issue Dec 10, 2023 · 1 comment
Open

Not working on FreeBSD systems #81

ARPABoy opened this issue Dec 10, 2023 · 1 comment

Comments

@ARPABoy
Copy link

ARPABoy commented Dec 10, 2023

My test steps are:

mkdir test
cd test
wget https://raw.githubusercontent.com/prometheus-community/pro-bing/main/cmd/ping/ping.go
go mod init test
go mod tidy

On my FreeBSD system, I get "protocol not supported" error:

root@FreeBSD # ~/test> go run ping.go 8.8.8.8
go run ping.go 8.8.8.8
PING 8.8.8.8 (8.8.8.8):
Failed to ping target host: socket: protocol not supported

The same steps on a Linux system:

root@ubuntu-cloud:~/test# go run ping.go 8.8.8.8
PING 8.8.8.8 (8.8.8.8):
32 bytes from 8.8.8.8: icmp_seq=0 time=15.968962ms ttl=118
32 bytes from 8.8.8.8: icmp_seq=1 time=16.025836ms ttl=118
32 bytes from 8.8.8.8: icmp_seq=2 time=16.281375ms ttl=118
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 3 packets received, 0 duplicates, 25% packet loss
round-trip min/avg/max/stddev = 15.968962ms/16.092057ms/16.281375ms/135.866µs

My FreeBSD system details are as follows:

freebsd-version -kru
13.2-RELEASE-p4
13.2-RELEASE-p4
13.2-RELEASE-p7
go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/kr0m/.cache/go-build"
GOENV="/home/kr0m/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOINSECURE=""
GOMODCACHE="/home/kr0m/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="freebsd"
GOPATH="/home/kr0m/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go120"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go120/pkg/tool/freebsd_amd64"
GOVCS=""
GOVERSION="go1.20.8"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="cc"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2645866918=/tmp/go-build -gno-record-gcc-switches"

If you require any further information feel free to contact me.

@leahneukirchen
Copy link

On FreeBSD, only --privileged mode works (but it works then as root).

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