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

Cross-compile darwin targets with osxcross #272

Merged
merged 1 commit into from
Aug 9, 2022
Merged

Cross-compile darwin targets with osxcross #272

merged 1 commit into from
Aug 9, 2022

Conversation

k0kubun
Copy link
Collaborator

@k0kubun k0kubun commented Aug 9, 2022

Fix #270

There are some challenges in cross-compiling cgo programs for darwin with zig cc ziglang/zig#9050 (comment). While they gave a solution to each of the mentioned problems, even if we use all of them for sqldef, darwin binaries result in a segmentation fault on runtime.cgocall like #270.

This implementation is based on itamae-kitchen/mitamae#105. I confirmed that both amd64 and arm64 binaries generated by it don't cause a segmentation fault when it calls the cgo path, unlike the ones generated by zig cc. So I'm switching to osxcross for darwin builds.

@k0kubun k0kubun force-pushed the osxcross branch 2 times, most recently from f9480bd to 7472392 Compare August 9, 2022 07:57
@k0kubun k0kubun marked this pull request as ready for review August 9, 2022 08:12
@k0kubun k0kubun merged commit 4212b49 into master Aug 9, 2022
@k0kubun k0kubun deleted the osxcross branch August 9, 2022 08:12
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.

[psqldef] fatal error: unexpected signal during runtime execution
1 participant