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

Go test fails to compile #47

Closed
asiragusa opened this issue Jun 4, 2019 · 16 comments
Closed

Go test fails to compile #47

asiragusa opened this issue Jun 4, 2019 · 16 comments

Comments

@asiragusa
Copy link

Go test fails to compile on my computer after installing the latest updates of Xcode command line tools, it worked fine until yesterday.

go test -v ./...  -tags skipsecretserviceintegrationtests
# github.com/keybase/go-keychain
./macos_1.10.go:89:13: could not determine kind of name for C.SecTrustedApplicationCreateFromPath
FAIL	github.com/keybase/go-keychain [build failed]
# github.com/keybase/go-keychain
./macos_1.10.go:89:13: could not determine kind of name for C.SecTrustedApplicationCreateFromPath
FAIL	github.com/keybase/go-keychain/bindtest [build failed]
=== RUN   TestNewKeypair
--- PASS: TestNewKeypair (0.00s)
=== RUN   TestKeygen
--- PASS: TestKeygen (0.00s)
=== RUN   TestEncryption
--- PASS: TestEncryption (0.00s)
=== RUN   TestEncryptionRng
--- PASS: TestEncryptionRng (0.00s)
=== RUN   TestPKCS7
--- PASS: TestPKCS7 (0.00s)
PASS
ok  	github.com/keybase/go-keychain/secretservice	0.015s

Xcode Version 10.2.1 (10E1001)

go version
go version go1.12.5 darwin/amd64
@zbuc
Copy link

zbuc commented Jun 21, 2019

Seeing the same here.

go version go1.12.5 darwin/amd64

@mtrung
Copy link

mtrung commented Jul 29, 2019

Same here:

github.com/keybase/go-keychain
../../.go/pkg/mod/github.com/keybase/[email protected]/macos_1.10.go:89:13: could not determine kind of name for C.SecTrustedApplicationCreateFromPath
make: *** [build] Error 2

go version go1.12.7 darwin/amd64

@benbooth493
Copy link

benbooth493 commented Jul 31, 2019

Same here.

go version go1.12.7 darwin/amd64

@nodefortytwo
Copy link

Any chance of an update on this?

@maxtaco
Copy link
Contributor

maxtaco commented Sep 3, 2019

We'll check out a PR if anyone has a fix.

@zbuc
Copy link

zbuc commented Sep 3, 2019 via email

@groob
Copy link

groob commented Sep 3, 2019

Is this still an issue in master? the macos_1.10.go etc files are removed.

@zbuc
Copy link

zbuc commented Sep 3, 2019

Is this still an issue in master? the macos_1.10.go etc files are removed.

Yep, they just renamed them:

 macos_1.10.go => macos.go                               |  13 ++--
 macos_1.10_test.go                                      |  65 ----------------
 macos_pre1.10.go                                        | 274 ----------------------------------------------------------------
 macos_pre1.10_test.go                                   |  47 -----------
 macos_test.go                                           |  56 ++++++++++++++

Still get the same error here on go version go1.12.9 darwin/amd64/XCode Command Line Tools 11.0.0.0.1.1559496560

@groob
Copy link

groob commented Sep 3, 2019

I cloned the project and ran the following, but I can't reproduce:

~/go/src/github.com/keybase/go-keychain >>> go test -count=1 -v ./...  -tags skipsecretserviceintegrationtests
=== RUN   TestUnixToAbsoluteTime
--- PASS: TestUnixToAbsoluteTime (0.00s)
=== RUN   TestAbsoluteTimeToUnix
--- PASS: TestAbsoluteTimeToUnix (0.00s)
=== RUN   TestTimeToCFDate
--- PASS: TestTimeToCFDate (0.00s)
=== RUN   TestCFDateToTime
--- PASS: TestCFDateToTime (0.00s)
=== RUN   TestAccess
--- PASS: TestAccess (0.04s)
=== RUN   TestAccessWithImpliedSelf
--- PASS: TestAccessWithImpliedSelf (0.01s)
=== RUN   TestAccessWithoutTrust
--- PASS: TestAccessWithoutTrust (0.01s)
=== RUN   TestUpdateItem
--- PASS: TestUpdateItem (0.02s)
=== RUN   TestAddingAndQueryingNewKeychain
--- PASS: TestAddingAndQueryingNewKeychain (0.02s)
=== RUN   TestNewWithPath
--- PASS: TestNewWithPath (0.02s)
=== RUN   TestStatus
--- PASS: TestStatus (0.01s)
=== RUN   TestGenericPasswordRef
--- PASS: TestGenericPasswordRef (0.01s)
=== RUN   TestInternetPassword
--- PASS: TestInternetPassword (0.00s)
PASS
ok  	github.com/keybase/go-keychain	0.165s
?   	github.com/keybase/go-keychain/bind	[no test files]
=== RUN   TestGenericPassword
--- PASS: TestGenericPassword (0.04s)
PASS
ok  	github.com/keybase/go-keychain/bindtest	0.088s
=== RUN   TestNewKeypair
--- PASS: TestNewKeypair (0.00s)
=== RUN   TestKeygen
--- PASS: TestKeygen (0.00s)
=== RUN   TestEncryption
--- PASS: TestEncryption (0.00s)
=== RUN   TestEncryptionRng
--- PASS: TestEncryptionRng (0.00s)
=== RUN   TestPKCS7
--- PASS: TestPKCS7 (0.00s)
PASS
ok  	github.com/keybase/go-keychain/secretservice	0.047s
~/go/src/github.com/keybase/go-keychain >>>

@groob
Copy link

groob commented Sep 3, 2019


package-id: com.apple.pkg.CLTools_Executables
version: 11.0.0.0.1.1559496560
volume: /
location: /
install-time: 1559666156
groups: com.apple.FindSystemFiles.pkg-group```

@groob
Copy link

groob commented Sep 3, 2019

@zbuc can you tell me a bit more about your setup:

pwd and go env output.

Newer versions of Go try to default to modules, but this project vendors dependencies and doesn't have go.mod support. I wonder if it's something related.

@zbuc
Copy link

zbuc commented Sep 3, 2019 via email

@alexanderbez
Copy link

alexanderbez commented Sep 21, 2019

Getting this error on go 1.13:

/Users/aleksbez/go/pkg/mod/github.com/keybase/[email protected]/macos_1.10.go:89:13: could not determine kind of name for C.SecTrustedApplicationCreateFromPath
$ go get github.com/keybase/go-keychain@latest

go: finding github.com/keybase/go-keychain latest
go: downloading github.com/keybase/go-keychain v0.0.0-20190828153431-2390ae572545
go: extracting github.com/keybase/go-keychain v0.0.0-20190828153431-2390ae572545
# github.com/keybase/go-keychain
../../../../pkg/mod/github.com/keybase/[email protected]/macos.go:88:13: could not determine kind of name for C.SecTrustedApplicationCreateFromPath

Update: Updating my xcode dev tools fixed this.

$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install

@alessio
Copy link

alessio commented Sep 21, 2019

It seems that SecTrustedApplication has been introduced in macOS SDK 10.2: https://developer.apple.com/documentation/security/sectrustedapplication

I'd advise to drop a note in the README.

@joshblum
Copy link
Member

closed via #60

@Just4Ease
Copy link

Getting this error on go 1.13:

/Users/aleksbez/go/pkg/mod/github.com/keybase/[email protected]/macos_1.10.go:89:13: could not determine kind of name for C.SecTrustedApplicationCreateFromPath
$ go get github.com/keybase/go-keychain@latest

go: finding github.com/keybase/go-keychain latest
go: downloading github.com/keybase/go-keychain v0.0.0-20190828153431-2390ae572545
go: extracting github.com/keybase/go-keychain v0.0.0-20190828153431-2390ae572545
# github.com/keybase/go-keychain
../../../../pkg/mod/github.com/keybase/[email protected]/macos.go:88:13: could not determine kind of name for C.SecTrustedApplicationCreateFromPath

Update: Updating my xcode dev tools fixed this.

$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install

This didn't work for me, i use BigSur

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