Bioconductor / BiocParallel

Bioconductor facilities for parallel evaluation
https://bioconductor.org/packages/BiocParallel
65 stars 29 forks source link

g++ Error installing BiocParallel #220

Closed lmansilla26 closed 1 year ago

lmansilla26 commented 1 year ago

Hello! I m having an issue while installing the library on a docker container. I m using an alpine image:

bash-5.1# R -e 'BiocManager::install("BiocParallel")'

R version 4.1.3 (2022-03-10) -- "One Push-Up"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-musl (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> BiocManager::install("BiocParallel")
Bioconductor version 3.14 (BiocManager 1.30.18), R 4.1.3 (2022-03-10)
Installing package(s) 'BiocParallel'
trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/BiocParallel_1.28.3.tar.gz'
Content type 'application/octet-stream' length 883999 bytes (863 KB)
==================================================
downloaded 863 KB

* installing *source* package ‘BiocParallel’ ...
** using staged installation
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for shm_open in -lrt... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG  -I'/usr/local/lib/R/library/BH/include' -I/usr/local/include   -fpic  -D__MUSL__  -c ipcmutex.cpp -o ipcmutex.o
In file included from /usr/local/lib/R/library/BH/include/boost/interprocess/detail/os_file_functions.hpp:25,
                 from /usr/local/lib/R/library/BH/include/boost/interprocess/detail/managed_memory_impl.hpp:27,
                 from /usr/local/lib/R/library/BH/include/boost/interprocess/managed_shared_memory.hpp:25,
                 from ipcmutex.cpp:13:
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:73:14: error: 'mode_t' in namespace '::' does not name a type
   73 |    typedef ::mode_t    os_permissions_type;
      |              ^~~~~~
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:75:4: error: 'os_permissions_type' does not name a type
   75 |    os_permissions_type  m_perm;
      |    ^~~~~~~~~~~~~~~~~~~
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:82:35: error: expected ')' before 'type'
   82 |    permissions(os_permissions_type type) BOOST_NOEXCEPT
      |               ~                   ^~~~~
      |                                   )
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:117:25: error: 'os_permissions_type' has not been declared
  117 |    void set_permissions(os_permissions_type perm) BOOST_NOEXCEPT
      |                         ^~~~~~~~~~~~~~~~~~~
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:122:4: error: 'os_permissions_type' does not name a type
  122 |    os_permissions_type get_permissions() const BOOST_NOEXCEPT
      |    ^~~~~~~~~~~~~~~~~~~
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp: In member function 'void boost::interprocess::permissions::set_default()':
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:100:7: error: 'm_perm' was not declared in this scope
  100 |       m_perm = 0644;
      |       ^~~~~~
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp: In member function 'void boost::interprocess::permissions::set_unrestricted()':
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:111:7: error: 'm_perm' was not declared in this scope
  111 |       m_perm = 0666;
      |       ^~~~~~
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp: In member function 'void boost::interprocess::permissions::set_permissions(int)':
/usr/local/lib/R/library/BH/include/boost/interprocess/permissions.hpp:118:7: error: 'm_perm' was not declared in this scope; did you mean 'perm'?
  118 |    {  m_perm = perm; }
      |       ^~~~~~
      |       perm
In file included from /usr/local/lib/R/library/BH/include/boost/interprocess/detail/managed_memory_impl.hpp:27,
                 from /usr/local/lib/R/library/BH/include/boost/interprocess/managed_shared_memory.hpp:25,
                 from ipcmutex.cpp:13:
/usr/local/lib/R/library/BH/include/boost/interprocess/detail/os_file_functions.hpp: In function 'boost::interprocess::file_handle_t boost::interprocess::ipcdetail::create_new_file(const char*, boost::interprocess::mode_t, const boost::interprocess::permissions&, bool)':
/usr/local/lib/R/library/BH/include/boost/interprocess/detail/os_file_functions.hpp:547:64: error: 'const class boost::interprocess::permissions' has no member named 'get_permissions'; did you mean 'set_permissions'?
  547 |    int ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions());
      |                                                                ^~~~~~~~~~~~~~~
      |                                                                set_permissions
/usr/local/lib/R/library/BH/include/boost/interprocess/detail/os_file_functions.hpp:549:26: error: 'const class boost::interprocess::permissions' has no member named 'get_permissions'; did you mean 'set_permissions'?
  549 |       ::fchmod(ret, perm.get_permissions());
      |                          ^~~~~~~~~~~~~~~
      |                          set_permissions
/usr/local/lib/R/library/BH/include/boost/interprocess/detail/os_file_functions.hpp: In function 'boost::interprocess::file_handle_t boost::interprocess::ipcdetail::create_or_open_file(const char*, boost::interprocess::mode_t, const boost::interprocess::permissions&, bool)':
/usr/local/lib/R/library/BH/include/boost/interprocess/detail/os_file_functions.hpp:562:63: error: 'const class boost::interprocess::permissions' has no member named 'get_permissions'; did you mean 'set_permissions'?
  562 |       ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions());
      |                                                               ^~~~~~~~~~~~~~~
      |                                                               set_permissions
/usr/local/lib/R/library/BH/include/boost/interprocess/detail/os_file_functions.hpp:564:29: error: 'const class boost::interprocess::permissions' has no member named 'get_permissions'; did you mean 'set_permissions'?
  564 |          ::fchmod(ret, perm.get_permissions());
      |                             ^~~~~~~~~~~~~~~
      |                             set_permissions
In file included from /usr/local/lib/R/library/BH/include/boost/interprocess/managed_shared_memory.hpp:27,
                 from ipcmutex.cpp:13:
/usr/local/lib/R/library/BH/include/boost/interprocess/shared_memory_object.hpp: In member function 'bool boost::interprocess::shared_memory_object::priv_open_or_create(boost::interprocess::ipcdetail::create_enum_t, const CharT*, boost::interprocess::mode_t, const boost::interprocess::permissions&)':
/usr/local/lib/R/library/BH/include/boost/interprocess/shared_memory_object.hpp:371:30: error: 'const class boost::interprocess::permissions' has no member named 'get_permissions'; did you mean 'set_permissions'?
  371 |    ::mode_t unix_perm = perm.get_permissions();
      |                              ^~~~~~~~~~~~~~~
      |                              set_permissions
make: *** [/usr/local/lib/R/etc/Makeconf:177: ipcmutex.o] Error 1
ERROR: compilation failed for package ‘BiocParallel’
* removing ‘/usr/local/lib/R/library/BiocParallel’

The downloaded source packages are in
        ‘/tmp/RtmpOkJJkh/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages(...) :
  installation of package ‘BiocParallel’ had non-zero exit status

It seems related with a library error compilation g++ version:

bash-5.1# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/10.3.1/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-10.3.1_git20210424/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 10.3.1_git20210424' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-cloog-backend --enable-languages=c,c++,d,objc,go,fortran,ada --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210424 (Alpine 10.3.1_git20210424) 

Any help will be appreciated, thx!

lmansilla26 commented 1 year ago

Ah, nvm. Solved by upgrading g++ to latest version.

Danoontjes commented 1 year ago

I'm having the exact same error, also on alpine linux. How did you upgrade g++ ?