go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.28k stars 195 forks source link

Does not build cleanly on FreeBSD #928

Open dBitech opened 1 year ago

dBitech commented 1 year ago

Attempting to build on a fresh FreeBSD 13.1 system, as a non privileged user.

Following the README.md for installation, I check out the source from github

darcy@tegola-01:~/go/src/github.com/go-spatial $ git clone https://github.com/go-spatial/tegola.git
Cloning into 'tegola'...
remote: Enumerating objects: 18723, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 18723 (delta 0), reused 0 (delta 0), pack-reused 18722
Receiving objects: 100% (18723/18723), 50.28 MiB | 16.38 MiB/s, done.
Resolving deltas: 100% (8929/8929), done.
darcy@tegola-01:~/go/src/github.com/go-spatial $

Change to the tegola directory and execute go generate...

darcy@tegola-01:~/go/src/github.com/go-spatial $ cd tegola/
darcy@tegola-01:~/go/src/github.com/go-spatial/tegola $ go generate ...
go: not generating in packages in dependency modules
2023/05/20 06:09:25 open node_gen.go: permission denied
exit status 1
/usr/local/go120/src/cmd/compile/internal/ir/mini.go:5: running "go": exit status 1
/usr/local/go120/src/cmd/compile/internal/syntax/tokens.go:9: running "stringer": exec: "stringer": executable file not found in $PATH
2023/05/20 06:09:25 open builtin.go: permission denied
exit status 1
/usr/local/go120/src/cmd/compile/internal/typecheck/target.go:5: running "go": exit status 1
/usr/local/go120/src/cmd/compile/internal/types/alg.go:13: running "stringer": exec: "stringer": executable file not found in $PATH
/usr/local/go120/src/cmd/go/main.go:5: running "./mkalldocs.sh": fork/exec ./mkalldocs.sh: no such file or directory
=== RUN   TestScript
vcs-test.golang.org rerouted to http://127.0.0.1:53213
https://vcs-test.golang.org rerouted to https://127.0.0.1:40018
go test proxy running at GOPROXY=http://127.0.0.1:57773/mod
=== RUN   TestScript/README
    scriptreadme_test.go:74: testdata/script/README is up to date.
--- PASS: TestScript (0.02s)
    --- PASS: TestScript/README (0.01s)
PASS
ok      cmd/go  0.038s
2023/05/20 06:09:34 open flagdefs.go: permission denied
exit status 1
/usr/local/go120/src/cmd/go/internal/test/testflag.go:21: running "go": exit status 1
2023/05/20 06:09:35 open ../../compile/internal/typecheck/builtin/runtime.go: no such file or directory
exit status 1
/usr/local/go120/src/cmd/internal/goobj/builtin.go:38: running "go": exit status 1
/usr/local/go120/src/cmd/internal/obj/link.go:226: running "stringer": exec: "stringer": executable file not found in $PATH
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/arm/a.out.go:35: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/arm64/a.out.go:485: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/loong64/a.out.go:11: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/mips/a.out.go:36: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/ppc64/a.out.go:34: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/riscv/cpu.go:33: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/s390x/a.out.go:34: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/wasm/a.out.go:9: running "go": exit status 1
2023/05/20 06:09:35 open anames.go: permission denied
exit status 1
/usr/local/go120/src/cmd/internal/obj/x86/aenum.go:7: running "go": exit status 1
/usr/local/go120/src/cmd/internal/objabi/reloctype.go:35: running "stringer": exec: "stringer": executable file not found in $PATH
/usr/local/go120/src/cmd/link/internal/sym/symkind.go:42: running "stringer": exec: "stringer": executable file not found in $PATH
2023/05/20 06:09:36 Generating p224.go...
2023/05/20 06:09:36 open p224.go: permission denied
exit status 1
/usr/local/go120/src/crypto/internal/nistec/nistec.go:15: running "go": exit status 1
2023/05/20 06:09:36 open md5block.go: permission denied
exit status 1
/usr/local/go120/src/crypto/md5/md5.go:5: running "go": exit status 1
/usr/local/go120/src/crypto/tls/common.go:369: running "stringer": exec: "stringer": executable file not found in $PATH
/usr/local/go120/src/debug/dwarf/const.go:9: running "stringer": exec: "stringer": executable file not found in $PATH
/usr/local/go120/src/debug/macho/reloctype.go:7: running "stringer": exec: "stringer": executable file not found in $PATH
decgen: open dec_helpers.go: permission denied
exit status 1
/usr/local/go120/src/encoding/gob/decode.go:5: running "go": exit status 1
checking to see if we can remove build.go  no
checking to see if we can remove cgo.generated.go yes
checking to see if we can remove no_azblob_cache.generated.go yes
checking to see if we can remove no_gpkg_provider.generated.go yes
checking to see if we can remove no_postgis_provider.generated.go yes
checking to see if we can remove no_prometheus_observer.generated.go yes
checking to see if we can remove no_redis_cache.generated.go yes
checking to see if we can remove no_s3_cache.generated.go yes
checking to see if we can remove no_viewer.generated.go yes
checking to see if we can remove no_viewer.go  no
checking to see if we can remove not_cgo.generated.go yes
checking to see if we can remove not_no_azblob_cache.generated.go yes
checking to see if we can remove not_no_gpkg_provider.generated.go yes
checking to see if we can remove not_no_postgis_provider.generated.go yes
checking to see if we can remove not_no_prometheus_observer.generated.go yes
checking to see if we can remove not_no_redis_cache.generated.go yes
checking to see if we can remove not_no_s3_cache.generated.go yes
checking to see if we can remove not_no_viewer.generated.go yes
checking to see if we can remove not_pprof.generated.go yes
checking to see if we can remove pprof.generated.go yes
checking to see if we can remove tags  no
checking to see if we can remove viewer.go  no
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_azblob_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_azblob_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_gcs_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_gcs_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_gpkg_provider.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_gpkg_provider.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_hana_provider.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_hana_provider.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_postgis_provider.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_postgis_provider.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_prometheus_observer.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_prometheus_observer.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_redis_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_redis_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_s3_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_s3_cache.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/no_viewer.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_no_viewer.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/cgo.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_cgo.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/pprof.generated.go
wrote file:  /home/darcy/go/src/github.com/go-spatial/tegola/internal/build/not_pprof.generated.go
Changed to directory: /home/darcy/go/src/github.com/go-spatial/tegola/ui
Running: npm version
Did not find npm, not running.../usr/local/go120/src/go/constant/value.go:26: running "stringer": exec: "stringer": executable file not found in $PATH
/usr/local/go120/src/go/doc/comment/std.go:6: running "./mkstd.sh": fork/exec ./mkstd.sh: no such file or directory
/usr/local/go120/src/html/template/context.go:88: running "stringer": exec: "stringer": executable file not found in $PATH
2023/05/20 06:09:41 open palette.go: permission denied
exit status 1
/usr/local/go120/src/image/color/palette/generate.go:5: running "go": exit status 1
2023/05/20 06:09:41 open impl.go: permission denied
exit status 1
/usr/local/go120/src/image/internal/imageutil/imageutil.go:5: running "go": exit status 1
gen: open sais2.go: permission denied
exit status 1
/usr/local/go120/src/index/suffixarray/sais.go:121: running "go": exit status 1
2023/05/20 06:09:41 open zgoarch_386.go: permission denied
exit status 1
/usr/local/go120/src/internal/goarch/goarch.go:13: running "go": exit status 1
2023/05/20 06:09:41 remove exp_arenas_off.go: permission denied
exit status 1
/usr/local/go120/src/internal/goexperiment/flags.go:45: running "go": exit status 1
2023/05/20 06:09:41 open zgoos_aix.go: permission denied
exit status 1
/usr/local/go120/src/internal/goos/goos.go:13: running "go": exit status 1
/usr/local/go120/src/internal/pkgbits/sync.go:50: running "stringer": exec: "stringer": executable file not found in $PATH
go: downloading golang.org/x/sys v0.3.0
2023/05/20 06:09:42 open zsyscall_windows.go: permission denied
exit status 1
exit status 1
/usr/local/go120/src/internal/syscall/windows/mksyscall.go:9: running "go": exit status 1
2023/05/20 06:09:42 open zsyscall_windows.go: permission denied
exit status 1
exit status 1
/usr/local/go120/src/internal/syscall/windows/registry/mksyscall.go:9: running "go": exit status 1
/usr/local/go120/src/math/big/float.go:144: running "stringer": exec: "stringer": executable file not found in $PATH
2023/05/20 06:09:42 open bits_tables.go: permission denied
exit status 1
/usr/local/go120/src/math/bits/bits.go:5: running "go": exit status 1
/usr/local/go120/src/net/http/http.go:5: running "bundle": exec: "bundle": executable file not found in $PATH
/usr/local/go120/src/regexp/syntax/regexp.go:29: running "stringer": exec: "stringer": executable file not found in $PATH
2023/05/20 06:09:42 open preempt_s390x.s: permission denied
exit status 1
/usr/local/go120/src/runtime/preempt.go:290: running "go": exit status 1
/usr/local/go120/src/runtime/race/doc.go:11: running "./mkcgo.sh": fork/exec ./mkcgo.sh: no such file or directory
2023/05/20 06:09:43 WriteFile:open zsortinterface.go: permission denied
exit status 1
/usr/local/go120/src/sort/sort.go:5: running "go": exit status 1
2023/05/20 06:09:43 open isprint.go: permission denied
exit status 1
/usr/local/go120/src/strconv/quote.go:5: running "go": exit status 1
2023/05/20 06:09:43 open zsyscall_windows.go: permission denied
exit status 1
exit status 1
/usr/local/go120/src/syscall/syscall.go:30: running "go": exit status 1
2023/05/20 06:09:44 open zoneinfo_abbrs_windows.go: permission denied
exit status 1
/usr/local/go120/src/time/zoneinfo.go:13: running "env": exit status 1
open zipdata.go: permission denied
exit status 1
/usr/local/go120/src/time/tzdata/tzdata.go:5: running "go": exit status 1
dBitech commented 1 year ago

stringer can be resolved by: go install golang.org/x/tools/cmd/stringer@latest

ARolek commented 1 year ago

@dBitech can you run go mod tidy then go mod vendor and see if any dependencies are being added? Everything needed to build locally should already be vendored.

ARolek commented 6 months ago

@dBitech did you ever get resolution on this?

dBitech commented 3 months ago

No,

So if I:

darcy@tegola-01:~/src/github.com/go-spatial/tegola $ go install golang.org/x/tools/cmd/stringer@latest
darcy@tegola-01:~/src/github.com/go-spatial/tegola $ go mod tidy
darcy@tegola-01:~/src/github.com/go-spatial/tegola $ go mod vendor

then try and do a go generate ... I still get errors such as the following:

darcy@tegola-01:~/src/github.com/go-spatial/tegola $ go generate ... 2>&1 | less
go: not generating in packages in dependency modules
2024/06/26 19:32:12 open node_gen.go: permission denied
exit status 1
/usr/local/go121/src/cmd/compile/internal/ir/mini.go:5: running "go": exit status 1
2024/06/26 19:32:12 can't write output: open ../allocators.go: permission denied
exit status 1
/usr/local/go121/src/cmd/compile/internal/ssa/generate.go:9: running "go": exit status 1
stringer: writing output: open token_string.go: permission denied
/usr/local/go121/src/cmd/compile/internal/syntax/tokens.go:9: running "stringer": exit status 1
2024/06/26 19:32:12 open builtin.go: permission denied
exit status 1
/usr/local/go121/src/cmd/compile/internal/typecheck/target.go:5: running "go": exit status 1
stringer: writing output: open algkind_string.go: permission denied
/usr/local/go121/src/cmd/compile/internal/types/alg.go:13: running "stringer": exit status 1
....

though it looks like if i ignore the errors, and then proceed with cd cmd/tegola/ && go build -mod vendor i do get a valid binary being built. This is less than ideal, and should try and resolve what ever is causing all of the errors in the go generate ...