fernandomayer commented on code in PR #37961:
URL: https://github.com/apache/arrow/pull/37961#discussion_r1344457832


##########
r/R/install-arrow.R:
##########
@@ -79,7 +80,8 @@ install_arrow <- function(nightly = FALSE,
     # On the M1, we can't use the usual autobrew, which pulls Intel 
dependencies
     apple_m1 <- grepl("arm-apple|aarch64.*darwin", R.Version()$platform)
     # On Rosetta, we have to build without JEMALLOC, so we also can't autobrew
-    if (on_rosetta()) {
+    rosetta <- identical(sysname, "darwin") && identical(system("sysctl -n 
sysctl.proc_translated", intern = TRUE), "1")
+    if (rosetta) {

Review Comment:
   Hi @thisisnic 
   
   I believe that for the package this is fine. I saw that the `on_rosetta()` 
function was defined in `r/R/arrow-package.R` and that should work.
   
   However, I'm thinking of the case where the user just uses the 
`r/R/install-arrow.R` as a standalone script, as suggested 
[here](https://arrow.apache.org/docs/r/articles/install.html#using-install_arrow)
 (as it's the way I use, for example). In this way, the `on_rosetta()` function 
is not found, as the script is not self-contained anymore.
   
   So my proposal would be to just change the `in_rosetta()` function from 
`r/R/arrow-package.R` to `r/R/install-arrow.R`, as this would not affect the 
former, but it would make the latter self-contained again.



-- 
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]

Reply via email to