k1LoW / tbls

tbls is a CI-Friendly tool for document a database, written in Go.
MIT License
3.44k stars 165 forks source link

go install show warning error #499

Closed haunt98 closed 1 year ago

haunt98 commented 1 year ago

What happened

I install tbls with go install github.com/k1LoW/tbls@latest

What you expected to happened

Install successfully

What stack trace or error message from tbls did you see?

# github.com/goccy/go-graphviz/internal/ccall
In file included from dotgen.c:15:
../../../../pkg/mod/github.com/goccy/go-graphviz@v0.1.0/internal/ccall/dotgen/dotsplines.c:2310:13: warning: a function declar
ation without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
../../../../pkg/mod/github.com/goccy/go-graphviz@v0.1.0/internal/ccall/dotgen/dotsplines.c:2310:13: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
../../../../pkg/mod/github.com/goccy/go-graphviz@v0.1.0/internal/ccall/dotgen/dotsplines.c:2504:16: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
../../../../pkg/mod/github.com/goccy/go-graphviz@v0.1.0/internal/ccall/dotgen/dotsplines.c:2504:16: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]

Environment

image
artemklevtsov commented 1 year ago

Same here with Go 1.21 docker alpine (golang:1.21-alpine):

/go # go install github.com/k1LoW/tbls@latest
go: downloading github.com/k1LoW/tbls v1.68.2
go: downloading github.com/go-sql-driver/mysql v1.7.0
go: downloading github.com/snowflakedb/gosnowflake v1.6.19
go: downloading github.com/microsoft/go-mssqldb v0.19.0
go: downloading github.com/labstack/gommon v0.4.0
go: downloading github.com/lib/pq v1.10.7
go: downloading github.com/mattn/go-sqlite3 v1.14.16
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/spf13/cobra v1.6.1
go: downloading github.com/minio/pkg v1.5.8
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/samber/lo v1.38.1
go: downloading github.com/goccy/go-yaml v1.9.8
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading github.com/antonmedv/expr v1.10.3
go: downloading gitlab.com/golang-commonmark/mdurl v0.0.0-20191124015652-932350d1cb84
go: downloading github.com/aquasecurity/go-version v0.0.0-20210121072130-637058cfe492
go: downloading github.com/gertd/go-pluralize v0.2.1
go: downloading github.com/k1LoW/expand v0.5.5
go: downloading github.com/beta/freetype v0.0.1
go: downloading github.com/goccy/go-graphviz v0.1.0
go: downloading github.com/k1LoW/ffff v0.2.0
go: downloading golang.org/x/image v0.5.0
go: downloading github.com/loadoff/excl v0.0.0-20171207172601-c6a9e4c4b4c4
go: downloading cloud.google.com/go/bigquery v1.45.0
go: downloading github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
go: downloading cloud.google.com/go/spanner v1.43.0
go: downloading github.com/aws/aws-sdk-go v1.44.184
go: downloading github.com/google/go-github/v49 v49.1.0
go: downloading github.com/k1LoW/duration v1.2.0
go: downloading github.com/k1LoW/go-github-client/v49 v49.1.3
go: downloading github.com/xo/dburl v0.13.0
go: downloading go.mongodb.org/mongo-driver v1.11.1
go: downloading cloud.google.com/go v0.107.0
go: downloading golang.org/x/oauth2 v0.4.0
go: downloading google.golang.org/api v0.108.0
go: downloading github.com/rivo/uniseg v0.4.2
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading github.com/mattn/go-isatty v0.0.16
go: downloading github.com/spf13/pflag v1.0.5
go: downloading golang.org/x/exp v0.0.0-20220827204233-334a2380cb91
go: downloading github.com/99designs/keyring v1.2.1
go: downloading github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0
go: downloading github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0
go: downloading github.com/apache/arrow/go/v10 v10.0.1
go: downloading github.com/aws/aws-sdk-go-v2 v1.16.16
go: downloading github.com/aws/aws-sdk-go-v2/credentials v1.12.20
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11
go: downloading github.com/aws/smithy-go v1.13.3
go: downloading github.com/form3tech-oss/jwt-go v3.2.5+incompatible
go: downloading github.com/gabriel-vasile/mimetype v1.4.1
go: downloading github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
go: downloading github.com/sirupsen/logrus v1.9.0
go: downloading golang.org/x/crypto v0.7.0
go: downloading github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe
go: downloading github.com/golang-sql/sqlexp v0.1.0
go: downloading golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
go: downloading github.com/buildkite/interpolate v0.0.0-20200526001904-07f35b4ae251
go: downloading github.com/k1LoW/fontdir v0.1.0
go: downloading github.com/sahilm/fuzzy v0.1.0
go: downloading golang.org/x/text v0.8.0
go: downloading github.com/google/go-querystring v1.1.0
go: downloading golang.org/x/sys v0.6.0
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/googleapis/gax-go/v2 v2.7.0
go: downloading go.opencensus.io v0.24.0
go: downloading google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f
go: downloading google.golang.org/grpc v1.53.0
go: downloading cloud.google.com/go/iam v0.8.0
go: downloading github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d
go: downloading github.com/dvsekhvalnov/jose2go v1.5.0
go: downloading github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2
go: downloading github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c
go: downloading github.com/mtibben/percent v0.2.1
go: downloading golang.org/x/term v0.6.0
go: downloading github.com/goccy/go-json v0.9.11
go: downloading github.com/google/flatbuffers v2.0.8+incompatible
go: downloading github.com/klauspost/compress v1.15.11
go: downloading github.com/pierrec/lz4/v4 v4.1.16
go: downloading github.com/fatih/color v1.13.0
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.8
go: downloading github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.23
go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.14
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.9
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.18
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.17
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.17
go: downloading github.com/fogleman/gg v1.3.0
go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
go: downloading google.golang.org/protobuf v1.28.1
go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: downloading golang.org/x/net v0.8.0
go: downloading github.com/envoyproxy/go-control-plane v0.10.3
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/montanaflynn/stats v0.6.6
go: downloading github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/zeebo/xxh3 v1.0.2
go: downloading cloud.google.com/go/compute/metadata v0.2.3
go: downloading github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.17
go: downloading github.com/xdg-go/scram v1.1.1
go: downloading github.com/xdg-go/stringprep v1.0.3
go: downloading golang.org/x/sync v0.1.0
go: downloading cloud.google.com/go/compute v1.15.1
go: downloading github.com/google/go-cmp v0.5.9
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.1
go: downloading github.com/klauspost/cpuid/v2 v2.0.9
go: downloading github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe
go: downloading github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/andybalholm/brotli v1.0.4
go: downloading github.com/apache/thrift v0.16.0
go: downloading github.com/xdg-go/pbkdf2 v1.0.0
go: downloading github.com/envoyproxy/protoc-gen-validate v0.9.1
go: downloading github.com/census-instrumentation/opencensus-proto v0.4.1
package github.com/k1LoW/tbls
        imports github.com/k1LoW/tbls/cmd
        imports github.com/k1LoW/tbls/output/gviz
        imports github.com/goccy/go-graphviz
        imports github.com/goccy/go-graphviz/cgraph
        imports github.com/goccy/go-graphviz/internal/ccall: build constraints exclude all Go files in /go/pkg/mod/github.com/goccy/go-graphviz@v0.1.0/internal/ccall
/go # echo $?
1
k1LoW commented 1 year ago

tbls uses Cgo. I think you are missing some packages that is needed for compilation.

$ docker container run -it --rm --name test golang:1.21-alpine /bin/sh
/go # apk update -q && apk add alpine-sdk -q
/go # go install github.com/k1LoW/tbls@latest
go: downloading github.com/k1LoW/tbls v1.68.2
go: downloading github.com/snowflakedb/gosnowflake v1.6.19
go: downloading github.com/lib/pq v1.10.7
go: downloading github.com/labstack/gommon v0.4.0
go: downloading github.com/go-sql-driver/mysql v1.7.0
go: downloading github.com/microsoft/go-mssqldb v0.19.0
[...]
go: downloading github.com/xdg-go/pbkdf2 v1.0.0
go: downloading github.com/andybalholm/brotli v1.0.4
go: downloading github.com/apache/thrift v0.16.0
go: downloading github.com/envoyproxy/protoc-gen-validate v0.9.1
go: downloading github.com/census-instrumentation/opencensus-proto v0.4.1
/go # tbls version
1.68.2
/go #

The required packages vary depending on the environment. I cannot provide support for that.