wzshiming / bridge

Bridge is a multi-level proxy that supports clients and servers with multiple protocols. SSHProxy, HTTPProxy, Socks4, Socks5, Shadowsocks.
MIT License
158 stars 15 forks source link

How to compile Bridge with gccgo? #17

Closed przemyslaw0 closed 2 weeks ago

przemyslaw0 commented 3 weeks ago

When I try to compile Bridge with gccgo I get the following error:


me@localhost:/tmp/bridge/cmd/bridge$ go build -compiler=gccgo
/home/me/go/pkg/mod/golang.org/x/crypto@v0.21.0/curve25519/curve25519_go120.go:9:8: package crypto/ecdh is not in std (/usr/lib/go-1.22/src/crypto/ecdh)
../../logger/logger.go:5:2: package log/slog is not in std (/usr/lib/go-1.22/src/log/slog)

The folders /usr/lib/go-1.22/src/crypto/ecdh and /usr/lib/go-1.22/src/log/slog does exist:

me@localhost:/tmp/bridge/cmd/bridge$ ls /usr/lib/go-1.22/src/crypto/ecdh
ecdh.go  ecdh_test.go  nist.go  x25519.go

me@localhost:/tmp/bridge/cmd/bridge$ ls /usr/lib/go-1.22/src/log/slog
attr.go                           example_wrap_test.go  logger_test.go
attr_test.go                      handler.go            record.go
doc.go                            handler_test.go       record_test.go
example_custom_levels_test.go     internal              slogtest_test.go
example_level_handler_test.go     json_handler.go       text_handler.go
example_log_level_test.go         json_handler_test.go  text_handler_test.go
example_logvaluer_group_test.go   level.go              value_access_benchmark_test.go
example_logvaluer_secret_test.go  level_test.go         value.go
example_test.go                   logger.go             value_test.go

How can I fix this?

wzshiming commented 2 weeks ago

log/slog and crypto/ecdh both are standard libraries for go, maybe you can get them from the source https://github.com/golang/go/tree/master/src

przemyslaw0 commented 2 weeks ago

@wzshiming

How can I install them and make work?

I tried everything, nothing works. It seems it's a bug in the go build. Closing.