Ringo
12/06/2022, 9:33 PMgo test -v .
, I get this output:
$ go test -v .
# <http://github.com/ringods/pulumi-pact-poc.test|github.com/ringods/pulumi-pact-poc.test>
/usr/local/Cellar/go/1.19.3/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: -no_pie is deprecated when targeting new OS versions
Undefined symbols for architecture x86_64:
"_pactffi_verifier_add_provider_transport", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_verifier_add_provider_transport in 000004.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_verifier_add_provider_transport)
"_pactffi_verifier_set_no_pacts_is_error", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_verifier_set_no_pacts_is_error in 000004.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_verifier_set_no_pacts_is_error)
"_pactffi_with_header_v2", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_with_header_v2 in 000003.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_with_header_v2)
"_pactffi_with_query_parameter_v2", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_with_query_parameter_v2 in 000003.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_with_query_parameter_v2)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FAIL <http://github.com/ringods/pulumi-pact-poc|github.com/ringods/pulumi-pact-poc> [build failed]
FAIL
I don’t really have a test yet. I’m trying to get our language host started. (FYI, language host is a Pulumi concept, see the readme of my repo)
But does this error tell you something whether I’m missing something in my setup?Yousaf Nabi (pactflow.io)
uname -sm
should be arm64
i think.
You get different results using the x86_64 libs on an m1 machineYousaf Nabi (pactflow.io)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
pact-go install -f
should force install the latest versionRingo
12/07/2022, 2:04 PMRingo
12/07/2022, 2:07 PM$ pact-go -l DEBUG install -f
2022/12/07 15:04:09 [INFO] downloading library from <https://github.com/pact-foundation/pact-reference/releases/download/libpact_ffi-v0.3.2/libpact_ffi-osx-x86_64.dylib.gz> to /usr/local/lib/libpact_ffi.dylib
&{}
2022/12/07 15:04:11 [DEBUG] obtaining hash for file /usr/local/lib/libpact_ffi.dylib
2022/12/07 15:04:11 [DEBUG] writing config {map[libpact_ffi:{libpact_ffi 0.3.2 d6503769896eecbc027815d20aff19c3}]}
2022/12/07 15:04:11 [DEBUG] writing yaml config to file libraries:
libpact_ffi:
libname: libpact_ffi
version: 0.3.2
hash: d6503769896eecbc027815d20aff19c3
2022/12/07 15:04:11 [INFO] setting install_name on library libpact_ffi for osx
2022/12/07 15:04:16 [DEBUG] output from command []
2022/12/07 15:04:16 [INFO] package libpact_ffi found
2022/12/07 15:04:16 [INFO] checking version 0.3.2 of libpact_ffi against semver constraint >= 0.3.0, < 1.0.0
2022/12/07 15:04:16 [DEBUG] 0.3.2 satisfies constraints 0.3.2 >= 0.3.0, < 1.0.0
2022/12/07 15:04:16 [INFO] package libpact_ffi is correctly installed
2022/12/07 15:04:16 [DEBUG] skip checking ffi version() call because FFI not loaded. This is expected when running the 'pact-go' command.
Time: 0h:00m:07s
$ go test -v .
# <http://github.com/ringods/pulumi-pact-poc.test|github.com/ringods/pulumi-pact-poc.test>
/usr/local/Cellar/go/1.19.3/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: -no_pie is deprecated when targeting new OS versions
Undefined symbols for architecture x86_64:
"_pactffi_verifier_add_provider_transport", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_verifier_add_provider_transport in 000004.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_verifier_add_provider_transport)
"_pactffi_verifier_set_no_pacts_is_error", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_verifier_set_no_pacts_is_error in 000004.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_verifier_set_no_pacts_is_error)
"_pactffi_with_header_v2", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_with_header_v2 in 000003.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_with_header_v2)
"_pactffi_with_query_parameter_v2", referenced from:
__cgo_6fba9656f5d3_Cfunc_pactffi_with_query_parameter_v2 in 000003.o
(maybe you meant: __cgo_6fba9656f5d3_Cfunc_pactffi_with_query_parameter_v2)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FAIL <http://github.com/ringods/pulumi-pact-poc|github.com/ringods/pulumi-pact-poc> [build failed]
FAIL
Time: 0h:00m:05s
For your information:
$ ls -lsa /usr/local/lib/libpact_ffi.dylib
43392 -rw------- 1 ringods staff 22214200 7 Dec 15:04 /usr/local/lib/libpact_ffi.dylib
Yousaf Nabi (pactflow.io)
/usr/local/Cellar/go/1.19.3/libexec/pkg/tool/darwin_amd64/link
shows darwin_amd64
I've had it running on my m1 mac, I've got an intel mac (although it's a hackintosh) will test on there today at some point (might take a little while, as I haven't used the machine in quite a while)
Which version of pact-go
are you using?
The pact ffi version is 0.3.2
- Pact-go on v2.0.0-beta.16 https://github.com/pact-foundation/pact-go/releases/tag/v2.0.0-beta.16 is using 0.3.15
Yousaf Nabi (pactflow.io)
❯ go version
go version go1.19.3 darwin/arm64
Just pulled the latest pact-go to install the latest binary on my m1, had to sudo as install doesn't have perms to write to /usr/local/lib
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Ringo
12/07/2022, 3:19 PM$ pact-go version
Pact Go CLI v2.0.0-beta.11%
Ringo
12/07/2022, 3:28 PMYousaf Nabi (pactflow.io)
Matt (pactflow.io / pact-js / pact-go)