unable to build on FreeBSD

Open
#712 13 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
go

Research direction

Reproduce the failure on a FreeBSD 13.0-RELEASE system using the package setup and gmake command shown. Start with Makefile:11 and the reported build errors in the Go dependencies, then verify that gmake completes and produces bin/flyctl on FreeBSD.

Written by the indexing model from the issue text.

Description

enhancement

Describe the bug

I'd like to get flyctl into FreeBSD ports tree. The first step is to compile from source, which fails:

### boot a FreeBSD 13.0-RELEASE image somewhere and get root
$ sudo -s
### install latest go and git tools from packages
# sed -i '' -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
# pkg install -y lang/go devel/gmake git-tiny
# exit
### switch back to non-root
$ git clone https://github.com/superfly/flyctl
$ cd flyctl && gmake

% gmake build
Running Generate for Help
go generate ./...
generating cli help
Running Build
go build -o bin/flyctl -ldflags="-X 'github.com/superfly/flyctl/internal/buildinfo.buildDate=2022-01-06T09:59:32Z'" .
# github.com/buildpacks/lifecycle/cmd
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:14:41: undefined: rootDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:15:41: undefined: rootDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:17:41: undefined: rootDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:17:81: undefined: execExt
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:18:41: undefined: rootDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:21:41: undefined: rootDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:23:41: undefined: rootDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/cmd/flags.go:128:32: undefined: rootDir
# github.com/buildpacks/lifecycle/archive
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/archive/archive.go:45:2: undefined: addSysAttributes
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/archive/extract.go:21:11: undefined: setUmask
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/archive/extract.go:22:8: undefined: setUmask
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/archive/extract.go:68:14: undefined: createSymlink
# github.com/buildpacks/lifecycle/launch
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/exec_d.go:40:13: undefined: setHandle
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/launch.go:25:41: undefined: exe
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/launcher.go:16:31: undefined: CNBDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/launcher.go:17:31: undefined: CNBDir
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/launcher.go:18:56: undefined: exe
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/shell.go:54:45: undefined: appProfile
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/shell.go:58:122: undefined: appProfile
../pkg/mod/github.com/buildpacks/lifecycle@v0.11.4/launch/shell.go:61:31: undefined: appProfile
# github.com/docker/docker/pkg/system
../pkg/mod/github.com/docker/docker@v20.10.8+incompatible/pkg/system/mknod.go:12:19: cannot use dev (type int) as type uint64 in argument to unix.Mknod
# github.com/tonistiigi/fsutil
../pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20210609172227-d72af97c0eaf/diskwriter_unix.go:48:41: cannot use int(mkdev(stat.Devmajor, stat.Devminor)) (type int) as type uint64 in argument to syscall.Mknod
gmake: *** [Makefile:11: build] Error 2
%

not familiar enough with go to know if this is fixable or not.

Dominant language
Go
Stars
1.7k
Forks
311
Avg merge
12h 50m
Merged PRs (30d)
78

Contributor guide

Open the contributing guide

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.

More from superfly/flyctl

All issues in superfly/flyctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.