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

fix: set install_name to absolute path for libpact_ffi.dylib (#345) #350

Merged
merged 1 commit into from Oct 3, 2023

Conversation

stan-is-hate
Copy link
Contributor

Addresses #345
Tested by running the install command with and without --libDir.
Verified that my project's pact test compile and run correctly after installing libpact_ffi.dylib via a freshly built pact-go.
Verified otool output matches full path.
E.g.

~/github/pact-go install-name-tool ≡
15:05:16 🐠 
build/pact-go -l DEBUG install --libDir /tmp/
2023/10/02 15:05:18 [INFO] set lib dir target to /tmp/
2023/10/02 15:05:18 [INFO] package libpact_ffi not found
2023/10/02 15:05:18 [INFO] downloading library from https://github.com/pact-foundation/pact-reference/releases/download/libpact_ffi-v0.4.5/libpact_ffi-osx-x86_64.dylib.gz to /tmp/libpact_ffi.dylib
&{}
2023/10/02 15:05:19 [DEBUG] obtaining hash for file /tmp/libpact_ffi.dylib
2023/10/02 15:05:19 [DEBUG] writing config {map[libpact_ffi:{libpact_ffi 0.4.5 5971854e21bf8b41db8b821a77caa268}]}
2023/10/02 15:05:19 [DEBUG] writing yaml config to file libraries:
  libpact_ffi:
    libname: libpact_ffi
    version: 0.4.5
    hash: 5971854e21bf8b41db8b821a77caa268

2023/10/02 15:05:19 [INFO] setting install_name on library libpact_ffi for osx
2023/10/02 15:05:19 [DEBUG] running command: /usr/bin/install_name_tool -id /tmp/libpact_ffi.dylib /tmp/libpact_ffi.dylib
2023/10/02 15:05:20 [DEBUG] output from command []
2023/10/02 15:05:20 [INFO] package libpact_ffi found
2023/10/02 15:05:20 [INFO] checking version 0.4.5 of libpact_ffi against semver constraint >= 0.4.0, < 1.0.0
2023/10/02 15:05:20 [DEBUG] 0.4.5 satisfies constraints 0.4.5 >= 0.4.0, < 1.0.0
2023/10/02 15:05:20 [INFO] package libpact_ffi is correctly installed
2023/10/02 15:05:20 [DEBUG] skip checking ffi version() call because FFI not loaded. This is expected when running the 'pact-go' command.

~/github/pact-go install-name-tool ≡
15:05:23 🐠 
otool -D /tmp/libpact_ffi.dylib
/tmp/libpact_ffi.dylib:
/tmp/libpact_ffi.dylib

@mefellows
Copy link
Member

Thanks for this, it looks OK to me and also works for me locally. If the build passes, I'll merge and release.

@YOU54F
Copy link
Member

YOU54F commented Oct 2, 2023

FYI golanglint-ci build failures & test failures addressed in the first commit of #351 but tangled in adding CI testing for other platforms which I haven't got passing x-plat yet. They are related to some modules not being supported after dropping go 1.17

@mefellows
Copy link
Member

Thanks Saf. I'll see what I can do to address #312 and related PRs this morning.

@mefellows mefellows merged commit 4fde79c into pact-foundation:master Oct 3, 2023
6 of 9 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants