You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2023/06/27 00:56:57 UTC

[GitHub] [arrow] kou commented on issue #36193: [R] Linux arm64 binary hosting

kou commented on issue #36193:
URL: https://github.com/apache/arrow/issues/36193#issuecomment-1608543191

   @eitsupi If you want to worn on this, the following steps will be good:
   
   1. Run `ARCH=arm64v8 UBUNTU=22.04 archery docker run ubuntu-cpp-static` on local
   2. Add a job to build binary package for 1.:
       ```diff
      diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml
      index e3e3d34e1..2b89a27a5 100644
      --- a/dev/tasks/r/github.packages.yml
      +++ b/dev/tasks/r/github.packages.yml
      @@ -58,21 +58,30 @@ jobs:
   
         linux-cpp:
   	name: C++ Binary Linux OpenSSL {{ '${{ matrix.openssl }}' }}
      -    runs-on: ubuntu-latest
      +    runs-on: {{ '${{ matrix.runs-on }}' }}
   	needs: source
   	strategy:
   	  fail-fast: false
   	  matrix:
   	    include:
      -          - openssl: "3.0"
      +          - arch: amd64
      +            openssl: "3.0"
      +            os: ubuntu
      +            runs-on: ubuntu-latest
      +            ubuntu: "22.04"
      +          - arch: arm64
      +            openssl: "3.0"
   		os: ubuntu
      +            runs-on: ["self-hosted", "Linux", "arm64"]
   		ubuntu: "22.04"
      -          - extra-cmake-flags: >-
      +          - arch: amd64
      +            extra-cmake-flags: >-
   		  -DCMAKE_INCLUDE_PATH=/usr/include/openssl11
   		  -DCMAKE_LIBRARY_PATH=/usr/lib64/openssl11
   		openssl: "1.1"
   		os: centos
      -          - openssl: "1.0"
      +          - arch: amd64
      +            openssl: "1.0"
   		os: centos
   	steps:
   	  {{ macros.github_checkout_arrow()|indent }}
      @@ -103,7 +112,7 @@ jobs:
   	  - name: Upload binary artifact
   	    uses: actions/upload-artifact@v3
   	    with:
      -          name: r-lib__libarrow__bin__linux-openssl-{{ '${{ matrix.openssl }}' }}
      +          name: r-lib__libarrow__bin__linux-openssl-{{ '${{ matrix.openssl }}' }}__{{ '${{ matrix.arch }}' }}
   	      path: arrow/r/libarrow/dist/arrow-*.zip
   
         windows-cpp:
      ```
      We can run it on a PR by `@github-actions crossbow submit r-binary-packages`.
      We may need to change `r/tools/nixlibs.R` something like:
      ```diff
      diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R
      index f8e42ecea..aa2729d3e 100644
      --- a/r/tools/nixlibs.R
      +++ b/r/tools/nixlibs.R
      @@ -87,7 +87,7 @@ thirdparty_dependency_dir <- Sys.getenv("ARROW_THIRDPARTY_DEPENDENCY_DIR", "tool
   
       download_binary <- function(lib) {
         libfile <- tempfile()
      -  binary_url <- paste0(arrow_repo, "bin/", lib, "/arrow-", VERSION, ".zip")
      +  binary_url <- paste0(arrow_repo, "bin/", lib, "/", detect_arch(), "/arrow-", VERSION, ".zip")
         if (try_download(binary_url, libfile)) {
   	if (!quietly) {
   	  cat(sprintf("*** Successfully retrieved C++ binaries (%s)\n", lib))
      ```
   3. Add a test job for the binary package to `dev/tasks/r/github.packages.yml`.
   4. (We may want to add more patterns for old Linux distributions such as CentOS/AlmaLinux/Ubuntu < 22.04.)
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org