Add support for macOS Universal dylib cross-compilation#65
Open
preland wants to merge 8 commits intowoodser:masterfrom
Open
Add support for macOS Universal dylib cross-compilation#65preland wants to merge 8 commits intowoodser:masterfrom
preland wants to merge 8 commits intowoodser:masterfrom
Conversation
Owner
|
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:
|
Author
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)