moby / moby/libnetwork

compile on freebsd 11

Open
#1,679 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
875
PR merge metrics
No merged PRs in 30d

Description

$go version
go version go1.8 freebsd/amd64

$cd /tmp
$git clone git://github.com/docker/docker.git
$cd docker
$./hack/make.sh
...
Building: bundles/17.04.0-dev/binary-daemon/dockerd-17.04.0-dev
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/drivers/bridge/bridge.go:22:2: no buildable Go source files in /tmp/docker/.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns

$cp /tmp/docker/vendor/github.com/docker/libnetwork/ns/init_linux.go /tmp/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go

$./hack/make.sh
...
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:67: undefined: syscall.Gettid
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:77: undefined: syscall.NETLINK_ROUTE
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:84: undefined: syscall.NETLINK_XFRM
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:99: undefined: syscall.AF_NETLINK
.gopath/src/github.com/docker/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go:99: undefined: syscall.NETLINK_XFRM

Does syscall.Gettid, syscall.NETLINK_ROUTE, syscall.NETLINK_XFRM, syscall.AF_NETLINK, syscall.NETLINK_XFRM not exist for Freebsd?
So, I did move it all from init_freebsd.go for testing only!

$cat /tmp/docker/vendor/github.com/docker/libnetwork/ns/init_freebsd.go
package ns

import (

)

$./hack/make.sh

$ls -l /tmp/docker/bundles/17.04.0-dev/binary-client/docker-17.04.0-dev
-rwxr-xr-x 1 root wheel 12386457 8 марта 16:22 /tmp/docker/bundles/17.04.0-dev/binary-client/docker-17.04.0-dev

So, libnetwork doesn't compile for me on freebsd 11 without any ns/init_freebsd.go
So, should add ns/init_freebsd.go for freesbd support

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with vendor/github.com/docker/libnetwork/ns/init_linux.go and the FreeBSD build errors reported for init_freebsd.go, especially the missing syscall symbols. Run hack/make.sh on FreeBSD 11 to reproduce the failure, then verify that the libnetwork namespace package and the Docker build compile successfully for that platform.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.