Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails on ARM64 Docker container #156

Open
vgonzenbach opened this issue Mar 2, 2023 · 1 comment
Open

Compilation fails on ARM64 Docker container #156

vgonzenbach opened this issue Mar 2, 2023 · 1 comment

Comments

@vgonzenbach
Copy link

vgonzenbach commented Mar 2, 2023

Describe the bug
Compilation fails for ANTsRCore package when building a Docker image on an Macbook Pro with M1 chip. I'm building natively (no emulation) using this Dockerfile. ANTs and ITKR install/compile successfully, however.

To Reproduce
On an M1 Macbook Pro:

git clone https://github.com/vgonzenbach/ANTsRCore-arm64.git
cd ANTsRCore-arm64
docker build -t antsrcore-arm64-debug . &> build.log

Please include output from R docker build:

#11 3356.7 [output clipped, log limit 1MiB reached]
#11 3369.2 /usr/bin/ld: antsImageMutualInformation.o: in function `Rcpp::SlotProxyPolicy<Rcpp::S4_Impl<Rcpp::PreserveStorage> >::slot(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .part.273]':
#11 3369.2 /usr/local/lib/R/library/Rcpp/include/Rcpp/exceptions.h:209:(.text+0x14): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `vtable for Rcpp::not_s4' defined in .data.rel.ro._ZTVN4Rcpp6not_s4E[_ZTVN4Rcpp6not_s4E] section in antsImage.o
#11 3369.2 /usr/bin/ld: /usr/local/lib/R/library/Rcpp/include/Rcpp/exceptions.h:209: warning: too many GOT entries for -fpic, please recompile with -fPIC
#11 3369.2 /usr/bin/ld: final link failed: nonrepresentable section on output
#11 3369.2 collect2: error: ld returned 1 exit status
#11 3369.2 make: *** [/usr/local/lib/R/share/make/shlib.mk:10: ANTsRCore.so] Error 1
#11 3369.3 ERROR: compilation failed for package 'ANTsRCore'
#11 3369.3 * removing '/usr/local/lib/R/library/ANTsRCore'
#11 3370.9 There were 17 warnings (use warnings() to see them)
#11 DONE 3371.1s

Session Info (Container)

sessioninfo::sess
#> - Session info ----------------------------------------------------------------------------------------------------------------------------
#>  setting  value
#>  version  R version 4.2.2 (2022-10-31)
#>  os       Debian GNU/Linux 10 (buster)
#>  system   aarch64, linux-gnu
#>  ui       X11
#>  language (EN)
#>  collate  C
#>  ctype    C
#>  tz       Etc/UTC
#>  date     2023-03-02
#>  pandoc   NA
#> 
#> - Packages --------------------------------------------------------------------------------------------------------------------------------
#>  package     * version date (UTC) lib source
#>  cli           3.6.0   2023-01-09 [1] CRAN (R 4.2.2)
#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.2.2)
#> 
#>  [1] /usr/local/lib/R/library
#> 
#> -------------------------------------------------------------------------------------------------------------------------------------------
system.file(package="ITKR")
#> [1] "/usr/local/lib/R/library/ITKR"

Session Info (Local)

session::session_info()
#> ─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting value
#>  version R version 4.2.1 (2022-06-23)
#>  os    macOS Big Sur ... 10.16
#>  system  x86_64, darwin17.0
#>  ui    X11
#>  language (EN)
#>  collate en_US.UTF-8
#>  ctype  en_US.UTF-8
#>  tz    America/New_York
#>  date   2023-03-02
#>  pandoc  2.19.2 @ /usr/local/bin/pandoc
#> ─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package   * version date (UTC) lib source
#>  cli      3.4.1  2022-09-23 [1] CRAN (R 4.2.0)
#>  sessioninfo  1.2.2  2021-12-06 [1] CRAN (R 4.2.0)
#>  [1] /Library/Frameworks/R.framework/Versions/4.2/Resources/library

Desktop Container (please complete the following information):

OS: Debian
gcc 8.3.0-6
cmake 3.24.1
@vgonzenbach
Copy link
Author

Hello, I was wondering if anyone has any comments about this issue. Thank you in advance for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant