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

Build on linux for windows faild #448

Open
ruslan-gennadievich opened this issue May 14, 2022 · 1 comment
Open

Build on linux for windows faild #448

ruslan-gennadievich opened this issue May 14, 2022 · 1 comment

Comments

@ruslan-gennadievich
Copy link

ruslan-gennadievich commented May 14, 2022

root@ddd:/tmp/mkcert# go install
go: downloading golang.org/x/net v0.0.0-20220421235706-1d1ef9303861
go: downloading software.sslmate.com/src/go-pkcs12 v0.2.0
go: downloading golang.org/x/text v0.3.7
go: downloading golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29
root@ddd:/tmp/mkcert# CGO_ENABLED=0 GOOS=windows GOARACH=amd64 go build -ldflags "-s -w" -trimpath main.go
./main.go:177:4: m.loadCA undefined (type *mkcert has no field or method loadCA)
./main.go:193:29: undefined: hasNSS
./main.go:193:39: undefined: CertutilInstallHelp
./main.go:193:71: m.checkNSS undefined (type *mkcert has no field or method checkNSS)
./main.go:195:77: undefined: NSSBrowsers
./main.go:197:30: undefined: hasJava
./main.go:197:44: m.checkJava undefined (type *mkcert has no field or method checkJava)
./main.go:207:5: m.makeCertFromCSR undefined (type *mkcert has no field or method makeCertFromCSR)
./main.go:237:4: m.makeCert undefined (type *mkcert has no field or method makeCert)
./main.go:272:9: m.installPlatform undefined (type *mkcert has no field or method installPlatform)
./main.go:272:9: too many errors

root@ddd:/tmp/mkcert# go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/mkcert/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3415286915=/tmp/go-build -gno-record-gcc-switches"

@craigtao
Copy link

craigtao commented Jul 3, 2024

enter the directory of mkcert source code, and then execute command: go build

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