Closed shpala closed 8 months ago
@shpala, any updates on this? I think there are just 2 small changes required (and the CLA).
Done. Though there's a git error on the build server. The reason this happened is that I've rebased my branch over latest origin/main in order to be in sync with the current branch and I've force pushed my commit as if it was a new commit in a new branch. You need to run "git fetch --all" in order to build successfully.
@ofriedma @jhult do you want me to close this PR and reopen with the same changes?
Compilation succeed for linux arm
@shpala Merged, Thank you for your contribution
Fix cross-compilation on macOS x86_64 CPUs with target CPU arm64 by manually setting CMAKE_SYSTEM_PROCESSOR to the cross-compilation target whenever CMAKE_SYSTEM_PROCESSOR doesn't match CMAKE_OSX_ARCHITECTURES after project() call. This is probably a Cmake bug that happens on macOS. (#822).
The issue happens when SpeeDB is built using the follwoing command:
cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_PROCESSOR=arm64 ..
The build itself succeeds, but because Cmake wrongly sets CMAKE_SYSTEM_PROCESSOR to x86_64 instead of arm64 and causes crc32c_arm64.cc not to be compiled. This in turn makes the project fails any linking with SpeeDB: