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

2.x.x: Support for Arm64 Architecture #199

Closed
frederic-gendebien opened this issue Feb 3, 2022 · 10 comments
Closed

2.x.x: Support for Arm64 Architecture #199

frederic-gendebien opened this issue Feb 3, 2022 · 10 comments

Comments

@frederic-gendebien
Copy link

Software versions

  • OS: e.g. Mac OSX 12.1
  • Consumer Pact library: Pact Go v2.0.0-beta.9
  • Provider Pact library: e.g. pact-go v 2.0.0-beta.9
  • Golang Version: go1.17.6 darwin/arm64
  • Golang environment:
    GO111MODULE="on"
    GOARCH="arm64"
    GOBIN="/Users/f.gendebien/go/bin"
    GOCACHE="/Users/f.gendebien/Library/Caches/go-build"
    GOENV="/Users/f.gendebien/Library/Application Support/go/env"
    GOEXE=""
    GOEXPERIMENT=""
    GOFLAGS=""
    GOHOSTARCH="arm64"
    GOHOSTOS="darwin"
    GOINSECURE=""
    GOMODCACHE="/Users/f.gendebien/go/pkg/mod"
    GONOPROXY=""
    GONOSUMDB=""
    GOOS="darwin"
    GOPATH="/Users/f.gendebien/go"
    GOPRIVATE=""
    GOPROXY="https://proxy.golang.org,direct"
    GOROOT="/opt/homebrew/Cellar/go/1.17.6/libexec"
    GOSUMDB="sum.golang.org"
    GOTMPDIR=""
    GOTOOLDIR="/opt/homebrew/Cellar/go/1.17.6/libexec/pkg/tool/darwin_arm64"
    GOVCS=""
    GOVERSION="go1.17.6"
    GCCGO="gccgo"
    AR="ar"
    CC="clang"
    CXX="clang++"
    CGO_ENABLED="1"
    GOMOD="/Users/f.gendebien/Documents/projects/pact-poc/go.mod"
    CGO_CFLAGS="-g -O2"
    CGO_CPPFLAGS=""
    CGO_CXXFLAGS="-g -O2"
    CGO_FFLAGS="-g -O2"
    CGO_LDFLAGS="-g -O2"
    PKG_CONFIG="pkg-config"
    GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wj/nz5n4tcj4q78bdnp9zx6s7wh0000gp/T/go-build1088991691=/tmp/go-build -gno-record-gcc-switches -fno-common"

Expected behaviour

The execution of the tests should work correctly

Actual behaviour

The execution crashes:

github.com/pact-foundation/pact-go/v2/internal/native

Undefined symbols for architecture arm64:
"_pactffi_cleanup_mock_server", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_cleanup_mock_server in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_cleanup_mock_server)
"_pactffi_create_mock_server", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server, __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server_for_pact )
"_pactffi_create_mock_server_for_pact", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server_for_pact in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server_for_pact)
"_pactffi_free_string", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_free_string in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_free_string)
"_pactffi_get_tls_ca_certificate", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_get_tls_ca_certificate in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_get_tls_ca_certificate)
"_pactffi_given", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_given in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_given, __cgo_c5f0653e4b8d_Cfunc_pactffi_given_with_param )
"_pactffi_given_with_param", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_given_with_param in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_given_with_param)
"_pactffi_init", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_init in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_init)
"_pactffi_message_expects_to_receive", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_message_expects_to_receive in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_expects_to_receive)
"_pactffi_message_given", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_message_given in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given_with_param, __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given )
"_pactffi_message_given_with_param", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_message_given_with_param in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given_with_param)
"_pactffi_message_reify", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_message_reify in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_reify)
"_pactffi_message_with_contents", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_contents in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_contents)
"_pactffi_message_with_metadata", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_metadata in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_metadata)
"_pactffi_mock_server_mismatches", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_mock_server_mismatches in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_mock_server_mismatches)
"_pactffi_new_interaction", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_new_interaction in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_interaction)
"_pactffi_new_message", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_new_message in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message_pact, __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message )
"_pactffi_new_message_pact", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_new_message_pact in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message_pact)
"_pactffi_new_pact", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_new_pact in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_pact)
"_pactffi_response_status", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_response_status in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_response_status)
"_pactffi_upon_receiving", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_upon_receiving in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_upon_receiving)
"_pactffi_verify", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_verify in _x005.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_verify)
"_pactffi_version", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_version in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_version)
"_pactffi_with_binary_file", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_binary_file in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_binary_file)
"_pactffi_with_body", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_body in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_body)
"_pactffi_with_header", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_header in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_header)
"_pactffi_with_message_pact_metadata", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_message_pact_metadata in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_message_pact_metadata)
"_pactffi_with_multipart_file", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_multipart_file in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_multipart_file)
"_pactffi_with_pact_metadata", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_pact_metadata in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_pact_metadata)
"_pactffi_with_query_parameter", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_query_parameter in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_query_parameter)
"_pactffi_with_request", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_request in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_request)
"_pactffi_with_specification", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_with_specification in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_specification)
"_pactffi_write_message_pact_file", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_write_message_pact_file in _x003.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_write_message_pact_file)
"_pactffi_write_pact_file", referenced from:
__cgo_c5f0653e4b8d_Cfunc_pactffi_write_pact_file in _x004.o
(maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_write_pact_file)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FAIL github.com/frederic-gendebien/pact-poc/application/server/pkg/interfaces/client [build failed]
FAIL

Steps to reproduce

https://github.com/frederic-gendebien/pact-poc/tree/feature/pact_2.x.x

make -e client-pact-test

Relevent log files

Already provided above

@mefellows
Copy link
Member

It looks like you have two versions of Pact Go in your repository - the new 2.x.x and the current 1.x.x line.

The current 1.x.x line should work in Rosetta mode, but I think because you also have 2.x.x running you are hitting a separate problem (we use a shared library). I've just pushed up a minor change to the installer, which will pull in the arm artifacts that we publish for the core. But I can see that your test project is not pulling the new dependencies in (1.x.x uses a Ruby shared core, 2.x.x uses a rust shared core. The CLI that you pull in is worth keeping around though, because it has the publishing and other useful commands).

Make sure you either run the install command, or manually drop the library into the correct path as per the instructions. I don't have an M1 to test on I'm afraid, but it should work as Pact JS works on an M1.

@mefellows
Copy link
Member

I'll leave this open for you to test and confirm it's all working.

@frederic-gendebien
Copy link
Author

  1. I removed pact binary and library from my system
  2. a. executed rm $(which pact-go)
  3. b. executed sudo rm /usr/local/lib/libpact*
  4. Reinstall pact
  5. a. executed: go install github.com/pact-foundation/pact-go/v2@2.x.x
  6. b. executed: sudo pact-go install
2022/02/15 09:17:14 [INFO] package libpact_ffi not found
2022/02/15 09:17:14 [INFO] downloading library from https://github.com/pact-foundation/pact-reference/releases/download/libpact_ffi-v0.1.2/libpact_ffi-osx-aarch64-apple-darwin.dylib.gz to /usr/local/lib/libpact_ffi.dylib
2022/02/15 09:17:15 [INFO] setting install_name on library libpact_ffi for osx
2022/02/15 09:17:15 [INFO] package libpact_ffi found
  1. Try consumer test
# github.com/pact-foundation/pact-go/v2/internal/native
Undefined symbols for architecture arm64:
  "_pactffi_cleanup_mock_server", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_cleanup_mock_server in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_cleanup_mock_server)
  "_pactffi_create_mock_server", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server, __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server_for_pact )
  "_pactffi_create_mock_server_for_pact", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server_for_pact in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_create_mock_server_for_pact)
  "_pactffi_free_string", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_free_string in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_free_string)
  "_pactffi_get_tls_ca_certificate", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_get_tls_ca_certificate in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_get_tls_ca_certificate)
  "_pactffi_given", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_given in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_given, __cgo_c5f0653e4b8d_Cfunc_pactffi_given_with_param )
  "_pactffi_given_with_param", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_given_with_param in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_given_with_param)
  "_pactffi_init", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_init in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_init)
  "_pactffi_message_expects_to_receive", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_message_expects_to_receive in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_expects_to_receive)
  "_pactffi_message_given", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given_with_param, __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given )
  "_pactffi_message_given_with_param", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given_with_param in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_given_with_param)
  "_pactffi_message_reify", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_message_reify in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_reify)
  "_pactffi_message_with_contents", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_contents in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_contents)
  "_pactffi_message_with_metadata", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_metadata in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_message_with_metadata)
  "_pactffi_mock_server_mismatches", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_mock_server_mismatches in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_mock_server_mismatches)
  "_pactffi_new_interaction", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_new_interaction in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_interaction)
  "_pactffi_new_message", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message_pact, __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message )
  "_pactffi_new_message_pact", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message_pact in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_message_pact)
  "_pactffi_new_pact", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_new_pact in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_new_pact)
  "_pactffi_response_status", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_response_status in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_response_status)
  "_pactffi_upon_receiving", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_upon_receiving in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_upon_receiving)
  "_pactffi_verify", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_verify in _x005.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_verify)
  "_pactffi_version", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_version in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_version)
  "_pactffi_with_binary_file", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_binary_file in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_binary_file)
  "_pactffi_with_body", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_body in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_body)
  "_pactffi_with_header", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_header in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_header)
  "_pactffi_with_message_pact_metadata", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_message_pact_metadata in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_message_pact_metadata)
  "_pactffi_with_multipart_file", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_multipart_file in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_multipart_file)
  "_pactffi_with_pact_metadata", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_pact_metadata in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_pact_metadata)
  "_pactffi_with_query_parameter", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_query_parameter in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_query_parameter)
  "_pactffi_with_request", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_request in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_request)
  "_pactffi_with_specification", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_with_specification in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_with_specification)
  "_pactffi_write_message_pact_file", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_write_message_pact_file in _x003.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_write_message_pact_file)
  "_pactffi_write_pact_file", referenced from:
      __cgo_c5f0653e4b8d_Cfunc_pactffi_write_pact_file in _x004.o
     (maybe you meant: __cgo_c5f0653e4b8d_Cfunc_pactffi_write_pact_file)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

...

@mefellows
Copy link
Member

Thanks, I think I'll need to get an M1 machine to setup builds. Sadly, GH doesn't support it yet.

Just to confirm - did you run this in a Rosetta terminal or a normal one?

Have you tried running it in Rosetta mode? In rosetta mode, the standard dylib should be used.

I was working with a colleague yesterday who was running the new Pact .NET package on an M1 Mac, that used the standard OSX dylib and that worked, so I'm hoping it should work the same here.

@KEdore
Copy link

KEdore commented Mar 8, 2022

Any update on this? Is there going to be a README section for this? @mefellows

@mefellows
Copy link
Member

No update on this - what do you want to see in the README?

I'd first like feedback that it does run in Rosetta mode. If that's the case, it'll be the easiest initial fix.

Until we get GH build agents with ARM M1 support I can't reliably run and test Pact Go on that setup.

@jeronimus-dojo
Copy link

Hi Matt :)

I've followed the same steps as Frederic did and get the same error, in both the normal Terminal and the Rosetta Terminal.

I also installed (#199 (comment)) using the Rosetta Terminal.

@mefellows
Copy link
Member

mefellows commented May 20, 2022

OK so today I received a shiny new M1 Max. I'm still figuring things out, but I managed to get this working:

go env:

GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/matthew.fellows/Library/Caches/go-build"
GOENV="/Users/matthew.fellows/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/matthew.fellows/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/matthew.fellows/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.18.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.18.2/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/matthew.fellows/development/public/pact-go/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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gl/c3f3yhws1mg754r_t7l5hfm80000gp/T/go-build2679427220=/tmp/go-build -gno-record-gcc-switches -fno-common"

No lib installed ls /usr/local/lib/:

docker   security

In the pact-go project, run the installer pact-go install -l DEBUG:

2022/05/20 22:23:39 [INFO] package libpact_ffi not found
2022/05/20 22:23:39 [INFO] downloading library from https://github.com/pact-foundation/pact-reference/releases/download/libpact_ffi-v0.1.2/libpact_ffi-osx-aarch64-apple-darwin.dylib.gz to /usr/local/lib/libpact_ffi.dylib
2022/05/20 22:23:41 [INFO] setting install_name on library libpact_ffi for osx
2022/05/20 22:23:41 [DEBUG] output from command []
2022/05/20 22:23:41 [INFO] package libpact_ffi found
2022/05/20 22:23:41 [DEBUG] unable to determine current version of package libpact_ffi this is probably because the package is currently being installed

Now the lib is there ls /usr/local/lib/:

docker            libpact_ffi.dylib security

(I have to sudo chmod 644 /usr/local/lib/libpact_ffi.dylib because of perms on that folder)

But then running make test works just fine!

So how did I do it?

686f649

@mefellows
Copy link
Member

Should be fixed in v2.0.0-beta.11.

@mefellows
Copy link
Member

Just noting that as of 7a1c264 it should also work on Linux arm64.

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

4 participants