-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add support for macOS Universal dylib cross-compilation #65
base: master
Are you sure you want to change the base?
Conversation
I'm not able to build successfully from macOS for some reason:
I assume it should work from macOS and not just from Debian? Then I can continue reviewing, but just preliminary feedback:
|
Looks like a boost error; not surprising to me unfortunately I can begin work on integrating the changes more cohesively; I only did it the way I did because I had to keep making large changes to the pipeline to address issues |
This PR introduces a series of bash scripts and modified CMakeLists.txt files that allows for a universal MacOS dylib (libmonero-cpp.dylib) to be cross-compiled.
This has only been tested on Debian 12, with all the dependencies required to build monero-project and monero-cpp installed. There might've been some other system-side changes introduced in order to get it to build properly, I am currently unsure.
The build.sh located in macos_universal (directory name pending), if ran nominally, will complete the build from beginning to end, without the need to run any other scripts beforehand. (ie you can just clone the repo, navigate to the directory, and run the script).
This also has the side effect of creating statically built libmonero-cpp dylibs for the individual macOS platforms. These can be found in macos_universal/{arm||x86}/build. The universal binary is placed in macos_universal/universal/build.
This PR is related to this issue, though it should be noted that the universal dylib itself likely won't be used; rather, the individual static libmonero-cpp dylibs will be used to create their java equivalents. These will then be combined in a similar manner to libmonero-cpp.
(Quick P.S: I'll squash commits once the PR is closer to finalization)