Mac ARM installation failed

Đang mở
#227 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
cpp, r
Lĩnh vực
build-system

Hướng nghiên cứu

Reproduce the reported remotes::install_github command on the stated Mac ARM setup, then inspect the TBB build path in src/Makevars.in, src/install.libs.R.in, Makefile.tbb, and src/tbb. Done means RcppParallel installs successfully and its shared object loads without the reported compiler errors or missing-symbol failure.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

HI
I have trouble to install qs2 from @traversc in https://github.com/qsbase/qs2/issues/3

He suggested me to ask you help.

When I install RcppParallel I got :

> remotes::install_github("RcppCore/RcppParallel",force = T)
Downloading GitHub repo RcppCore/RcppParallel@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/k7/pk9ppb456l7c_qx99rf0sqhh0000gn/T/RtmpYjP1YW/remotes1af72d54dc10/RcppCore-RcppParallel-b478b62/DESCRIPTION’ ...
─  preparing ‘RcppParallel’:
✔  checking DESCRIPTION meta-information
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts (432ms)
─  checking for empty or unneeded directories
─  building ‘RcppParallel_5.1.9.9000.tar.gz’
   
* installing *source* package ‘RcppParallel’ ...
** using staged installation
** preparing to configure package 'RcppParallel' ...
*** configured file: 'R/tbb-autodetected.R.in' => 'R/tbb-autodetected.R'
*** configured file: 'src/Makevars.in' => 'src/Makevars'
*** configured file: 'src/install.libs.R.in' => 'src/install.libs.R'
** finished configure for package 'RcppParallel'
** libs
using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.3)’
using SDK: ‘MacOSX15.0.sdk’
(tbb) Building TBB using bundled sources ...
OS: macos
arch=arm64
compiler=clang
runtime=cc16.0.0_os15.0.1
tbb_build_prefix=macos_arm64_clang_cc16.0.0_os15.0.1
work_dir=/private/var/folders/k7/pk9ppb456l7c_qx99rf0sqhh0000gn/T/RtmpAcWiLW/R.INSTALL38ac364dd4fa/RcppParallel/src/build/macos_arm64_clang_cc16.0.0_os15.0.1_release
Created ../build/lib_release directory
make -C "../build/lib_release"  -r -f ../../build/Makefile.tbb cfg=release
../../build/Makefile.tbb:28: CONFIG: cfg=release arch=arm64 compiler=clang target=macos runtime=cc16.0.0_os15.0.1
clang++ -arch arm64 -I../inst/include -I/opt/homebrew/include -I/opt/R/arm64/include -o concurrent_hash_map.o -c -MMD -O2 -DUSE_PTHREAD  -stdlib=libc++ -arch arm64 -mmacosx-version-min=10.11  -fPIC  -D__TBB_BUILD=1 -Wall  -falign-functions=64 -Wall -g -O2 -DTBB_NO_LEGACY=1   -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cpp
In file included from ../../src/tbb/concurrent_hash_map.cpp:17:
In file included from /opt/homebrew/include/tbb/concurrent_hash_map.h:17:
In file included from /opt/homebrew/include/tbb/../oneapi/tbb/concurrent_hash_map.h:21:
In file included from /opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:25:
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_config.h:440:13: warning: TBB Warning: Support for C++98/03 is deprecated. Please use the compiler that supports C++11 features at least. [-W#pragma-messages]
  440 |     #pragma message("TBB Warning: Support for C++98/03 is deprecated. Please use the compiler that supports C++11 features at least.")
      |             ^
In file included from ../../src/tbb/concurrent_hash_map.cpp:17:
In file included from /opt/homebrew/include/tbb/concurrent_hash_map.h:17:
In file included from /opt/homebrew/include/tbb/../oneapi/tbb/concurrent_hash_map.h:21:
In file included from /opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:27:
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:58:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]
   58 | inline namespace d0 {
      | ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:129:1: error: unknown type name 'constexpr'
  129 | constexpr std::uintptr_t number_of_bits() {
      | ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:129:16: error: cannot define or redeclare 'uintptr_t' here because namespace 'd0' does not enclose namespace 'std'
  129 | constexpr std::uintptr_t number_of_bits() {
      |           ~~~~~^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:129:16: warning: variable templates are a C++14 extension [-Wc++14-extensions]
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:129:25: error: expected ';' at end of declaration
  129 | constexpr std::uintptr_t number_of_bits() {
      |                         ^
      |                         ;
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:129:26: error: a type specifier is required for all declarations
  129 | constexpr std::uintptr_t number_of_bits() {
      |                          ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:130:19: error: use of undeclared identifier 'T'
  130 |     return sizeof(T) * CHAR_BIT;
      |                   ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:137:39: error: expected '(' for function-style cast or type construction
  137 |     return (number_of_bits<decltype(x)>() - 1) ^ gnu_builtins::clz(x);
      |                            ~~~~~~~~~~~^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_machine.h:137:41: error: expected expression
  137 |     return (number_of_bits<decltype(x)>() - 1) ^ gnu_builtins::clz(x);
      |                                         ^
In file included from ../../src/tbb/concurrent_hash_map.cpp:17:
In file included from /opt/homebrew/include/tbb/concurrent_hash_map.h:17:
In file included from /opt/homebrew/include/tbb/../oneapi/tbb/concurrent_hash_map.h:21:
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:31:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]
   31 | inline namespace d0 {
      | ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:34:18: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
   34 | template<typename... T> void suppress_unused_warning(T&&...) {}
      |                  ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:34:55: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
   34 | template<typename... T> void suppress_unused_warning(T&&...) {}
      |                                                       ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:40:1: error: unknown type name 'constexpr'
   40 | constexpr size_t max_nfs_size = 128;
      | ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:40:17: error: expected ';' after top level declarator
   40 | constexpr size_t max_nfs_size = 128;
      |                 ^
      |                 ;
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:41:1: error: unknown type name 'constexpr'
   41 | constexpr std::size_t max_nfs_size_exp = 7;
      | ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:41:16: error: cannot define or redeclare 'size_t' here because namespace 'd0' does not enclose namespace 'std'
   41 | constexpr std::size_t max_nfs_size_exp = 7;
      |           ~~~~~^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:41:22: error: expected ';' after top level declarator
   41 | constexpr std::size_t max_nfs_size_exp = 7;
      |                      ^
      |                      ;
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:42:20: error: use of undeclared identifier 'max_nfs_size_exp'
   42 | static_assert(1 << max_nfs_size_exp == max_nfs_size, "max_nfs_size_exp must be a log2(max_nfs_size)");
      |                    ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:42:40: error: use of undeclared identifier 'max_nfs_size'
   42 | static_assert(1 << max_nfs_size_exp == max_nfs_size, "max_nfs_size_exp must be a log2(max_nfs_size)");
      |                                        ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:49:12: error: unknown type name 'constexpr'
   49 |     static constexpr std::int32_t LOOPS_BEFORE_YIELD = 16;
      |            ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:49:27: error: non-friend class member 'int32_t' cannot have a qualified name
   49 |     static constexpr std::int32_t LOOPS_BEFORE_YIELD = 16;
      |                      ~~~~~^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:49:34: error: expected ';' at end of declaration list
   49 |     static constexpr std::int32_t LOOPS_BEFORE_YIELD = 16;
      |                                  ^
      |                                  ;
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:61:45: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
   61 |     atomic_backoff(const atomic_backoff&) = delete;
      |                                             ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:62:56: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
   62 |     atomic_backoff& operator=(const atomic_backoff&) = delete;
      |                                                        ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:66:22: error: use of undeclared identifier 'LOOPS_BEFORE_YIELD'
   66 |         if (count <= LOOPS_BEFORE_YIELD) {
      |                      ^
/opt/homebrew/include/tbb/../oneapi/tbb/detail/_utils.h:79:21: error: use of undeclared identifier 'LOOPS_BEFORE_YIELD'
   79 |         if (count < LOOPS_BEFORE_YIELD) {
      |                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
8 warnings and 20 errors generated.
make[2]: *** [concurrent_hash_map.o] Error 1
make[1]: *** [tbb_release] Error 2
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -I/opt/homebrew/include  -I/opt/R/arm64/include   -std=gnu++11 -DRCPP_PARALLEL_USE_TBB=1 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -fPIC  -falign-functions=64 -Wall -g -O2   -c init.cpp -o init.o
clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -I/opt/homebrew/include  -I/opt/R/arm64/include   -std=gnu++11 -DRCPP_PARALLEL_USE_TBB=1 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -fPIC  -falign-functions=64 -Wall -g -O2   -c options.cpp -o options.o
clang++ -arch arm64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o RcppParallel.so init.o options.o -Ltbb/build/lib_release -ltbb -Wl,-rpath,@loader_path/../lib -L/opt/homebrew/lib -lgsl -lgslcblas -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing via 'install.libs.R' to /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-RcppParallel/00new/RcppParallel
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RcppParallel’:
 .onLoad failed in loadNamespace() for 'RcppParallel', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-RcppParallel/00new/RcppParallel/libs/RcppParallel.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/00LOCK-RcppParallel/00new/RcppParallel/libs/RcppParallel.so, 0x0006): symbol not found in flat namespace '__ZN3tbb10interface78internal15task_arena_base24internal_max_concurrencyEPKNS0_10task_arenaE'
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppParallel’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppParallel’
Warning messages:
1: In readLines(old_path) :
  incomplete final line found on '/Users/benjamin/.R/Makevars'
2: In i.p(...) :
  installation of package ‘/var/folders/k7/pk9ppb456l7c_qx99rf0sqhh0000gn/T//RtmpYjP1YW/file1af71e3bb5b0/RcppParallel_5.1.9.9000.tar.gz’ had non-zero exit status

How can I do ? thanks in advance

Ngôn ngữ chính
C++
Star
173
Fork
60
Merge trung bình
1 giờ 55 phút
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RcppCore/RcppParallel

Tất cả issue của RcppCore/RcppParallel

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.