jeroen opened a new issue, #39068:
URL: https://github.com/apache/arrow/issues/39068
### Describe the enhancement requested
When building the R package on MacOS it automatically downloads static
libarrow builds based on the local host arch:
-
https://nightlies.apache.org/arrow/r/libarrow/bin/darwin-arm64-openssl-1.1/
-
https://nightlies.apache.org/arrow/r/libarrow/bin/darwin-x86_64-openssl-1.1/
However the host arch is sometimes different from the target, for example
when we build on an M1 machine targeting intel using `clang -arch x86_64` or
the other way around. Posit even compiles their `darwin-arm64` binaries on
`linux-arm64`.
Furthermore, R might support universal packages soon that get compiled for
both architectures.
It would be safer to merge static libs for arm64 and x86_64 into a single
universal ("fat") static library that the R package can download without any
guessing of the target arch. You can merge static libs easily using lipo, e.g:
```sh
lipo -create libarrow-arm64.a libarrow-x86_64.a -output libarrow-universal.a
```
This way you can publish a universal static libarrow that will work both
when targeting either arm64 or x86_64, or both.
We also do this for the autobrew libs, and it works very well:
https://github.com/autobrew/bundler
### Component(s)
R
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]