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 macosx-arm64 library build for libpostal #1207

Merged
merged 2 commits into from
Aug 12, 2022

Conversation

MasseGuillaume
Copy link
Contributor

No description provided.

@saudet
Copy link
Member

saudet commented Aug 12, 2022

I'm pretty sure libffi works, so instead of trying to modify things randomly, could you try to do it exactly the same, including the rpath bit, and check if that works locally on your machine? If that works, there's no reason to try anything different.
https://github.com/bytedeco/javacpp-presets/blob/master/libffi/cppbuild.sh#L86

@MasseGuillaume
Copy link
Contributor Author

@saudet saudet merged commit 916fcf4 into bytedeco:master Aug 12, 2022
@saudet
Copy link
Member

saudet commented Aug 12, 2022

@MasseGuillaume
Copy link
Contributor Author

Got it so you only publish snapshots when it's merged to master.

https://github.com/bytedeco/javacpp-presets/runs/7799698969?check_suite_focus=true#step:2:4855

[INFO] Uploading to sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/libpostal/1.1-1.5.8-SNAPSHOT/libpostal-1.1-1.5.8-20220812.035330-25-macosx-arm64.jar

It looks like the architecture is correct now:

❯ otool -hv libjnipostal.dylib  libpostal.1.dylib
libjnipostal.dylib:
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64    ARM64        ALL  0x00       DYLIB    19       1864   NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS
libpostal.1.dylib:
Mach header
      magic  cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
MH_MAGIC_64    ARM64        ALL  0x00       DYLIB    15       1632   NOUNDEFS DYLDLINK TWOLEVEL NO_REEXPORTED_DYLIBS

@MasseGuillaume
Copy link
Contributor Author

After cleaning up my build tool cache, I was able to run my tests successfully on an M1 chip. Thanks a lot!

@MasseGuillaume MasseGuillaume deleted the libpostal-macosx-arm64-2 branch August 12, 2022 13:45
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.

2 participants