fix: Fixes for Cross-Compilation Issues #272
Open
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 pull request includes two key modifications to address potential issues in the cross-compilation process:
1. Configuration Updates in
CMakeLists.txt
Introducing necessary configurations in
CMakeLists.txt
to ensure the correct discovery and linking of package directories during cross-compilation. The changes include:Problem Addressed:
Previously, the build system struggled to correctly locate package directories during cross-compilation, leading to build failures. These changes ensure that the necessary packages and libraries are correctly found and linked, thereby facilitating a successful build process.
2. Fix for Diverse Compiler Invocation Commands
Resolving issues related to cross-platform compilation on certain operating systems, such as NixOS, by supporting diverse compiler invocation commands.
Details:
clang
andclang++
. However, different operating systems might use different commands. For instance, on NixOS, the commands areaarch64-unknown-linux-gnu-clang
andaarch64-unknown-linux-gnu-clang++
.Problem Addressed:
Certain operating systems were unable to complete cross-platform compilation due to hardcoded compiler invocation commands. By allowing customizable compiler commands, this fix enhances the project's cross-platform compatibility.
Potentially related to #159, since an incorrect compiler could trigger the same error.