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

golang.org/x/crypto/ssh does not Compile #807

Closed
moloch-- opened this issue Nov 16, 2023 · 4 comments · Fixed by #808
Closed

golang.org/x/crypto/ssh does not Compile #807

moloch-- opened this issue Nov 16, 2023 · 4 comments · Fixed by #808

Comments

@moloch--
Copy link

What version of Garble and Go are you using?

$ garble version
mvdan.cc/garble v0.10.1

Build settings:
      -buildmode exe
       -compiler gc
  DefaultGODEBUG panicnil=1
     CGO_ENABLED 1
          GOARCH arm64
            GOOS darwin

$ go version
go version go1.21.4 darwin/arm64

What environment are you running Garble on?

go env Output
$ go env
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/xxxx/Library/Caches/go-build'
GOENV='/Users/xxxxx/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/xxxx/go/pkg/mod'
GONOPROXY='github.com/xxxx/*'
GONOSUMDB='github.com/xxxx/*'
GOOS='darwin'
GOPATH='/Users/xxxx/go'
GOPRIVATE='github.com/xxxxx/*'
GOPROXY='https://proxy.golang.org'
GOROOT='/opt/homebrew/Cellar/go/1.21.4/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.21.4/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/xxxx/git/xxxx/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/j0/sr3cbxmd2r36fmb1vnr0577r0000gn/T/go-build3414893215=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

$ garble -seed=random build .
-seed chosen at random: rEd5yT8YsyoUj29n971RbQ
# golang.org/x/crypto/ssh
:1: cannot convert co_L1EnBG (variable of type pingMsg) to type aHJXcM7LG34h
exit status 2
exit status 1

What did you expect to see?

Build successful

What did you see instead?

Build failure

Reproduction

Compile the following with Garble:

package main

import (
	"io"
	"net"
	"os"

	"golang.org/x/crypto/ssh"
)

func main() {
	ssh.ParsePrivateKey([]byte{})
}
@mvdan
Copy link
Member

mvdan commented Nov 16, 2023

Is this perhaps a duplicate of #801? Have you tried master?

@moloch--
Copy link
Author

Ahh missed that give me a couple minutes.

@moloch--
Copy link
Author

@mvdan I'm still getting this error with versions v0.14.0 and v0.15.0 of the golang.org/x/crypto module, though v0.13.0 doesn't seem affected:

$ ./garble version
mvdan.cc/garble v0.0.0-20231115002856-4271bc45ae25

Build settings:
      -buildmode exe
       -compiler gc
     CGO_ENABLED 1
          GOARCH arm64
            GOOS darwin
             vcs git
    vcs.revision 4271bc45ae2589571111ee5b6859967af003faac
        vcs.time 2023-11-15T00:28:56Z
    vcs.modified false

$ ./garble build .
# golang.org/x/crypto/ssh
wB7GhZgDb.go:1: cannot convert lGFp2a (variable of type pingMsg) to type h7cJOYkur3K
exit status 2
exit status 1

$ cat go.mod
module github.com/x/sshtest

go 1.21.4

require golang.org/x/crypto v0.15.0

lu4p added a commit that referenced this issue Nov 17, 2023
lu4p added a commit that referenced this issue Nov 17, 2023
mvdan pushed a commit that referenced this issue Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants