Bioconductor / SparseArray

High-performance sparse data representation and manipulation in R
8 stars 2 forks source link

Failed to Install R4.4 and ubuntu 18.04 #11

Closed drneavin closed 5 months ago

drneavin commented 5 months ago

Hello,

I've been trying to install SparseArray since it is a dependency for other packages I require but I'm having issues installing it. I've tried installing with BiocManager: R --slave -e 'BiocManager::install("SparseArray")' and from github: R --slave -e 'remotes::install_github("Bioconductor/SparseArray")'. I'm using R4.4 on an Ubuntu 18.04 system and this is a singularity build. This is the error message I receive:

Installing package into '/usr/local/lib/R/site-library'
(as 'lib' is unspecified)
* installing *source* package 'SparseArray' ...
** using staged installation
** libs
using C compiler: 'gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0'
gcc -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/S4Vectors/include' -I'/usr/local/lib/R/site-library/IRanges/include' -I'/usr/local/lib/R/site-library/XVector/include'    -fopenmp -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-U1b9am/r-base-4.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c ExtendableJaggedArray.c -o ExtendableJaggedArray.o
In file included from SparseVec.h:6:0,
                 from leaf_utils.h:6,
                 from ExtendableJaggedArray.c:8:
Rvector_utils.h:9:37: error: initializer element is not constant
 static const Rcomplex Rcomplex0 = {{double0, double0}};
                                     ^~~~~~~
Rvector_utils.h:9:37: note: (near initialization for 'Rcomplex0.<anonymous>.r')
Rvector_utils.h:9:46: error: initializer element is not constant
 static const Rcomplex Rcomplex0 = {{double0, double0}};
                                              ^~~~~~~
Rvector_utils.h:9:46: note: (near initialization for 'Rcomplex0.<anonymous>.i')
Rvector_utils.h:14:37: error: initializer element is not constant
 static const Rcomplex Rcomplex1 = {{double1, double0}};
                                     ^~~~~~~
Rvector_utils.h:14:37: note: (near initialization for 'Rcomplex1.<anonymous>.r')
Rvector_utils.h:14:46: error: initializer element is not constant
 static const Rcomplex Rcomplex1 = {{double1, double0}};
                                              ^~~~~~~
Rvector_utils.h:14:46: note: (near initialization for 'Rcomplex1.<anonymous>.i')
/usr/lib/R/etc/Makeconf:195: recipe for target 'ExtendableJaggedArray.o' failed
make: *** [ExtendableJaggedArray.o] Error 1
ERROR: compilation failed for package 'SparseArray'
* removing '/usr/local/lib/R/site-library/SparseArray'
Warning message:
In i.p(...) :
  installation of package '/tmp/Rtmpxn36sY/file7a9ab2fc5fd9b/SparseArray_1.5.7.tar.gz' had non-zero exit status

It seems to be an issues with ExtendableJaggedArray but I am not familiar enough to parse out the exact issue. Do you have any recommendations on how to resolve this issue?

vjcitn commented 5 months ago

Hi -- my first reaction is that gcc 7.5 is kind of old -- five years, in fact. In our release linux build we use gcc 11.4. Can you upgrade the gcc in your container?

https://askubuntu.com/questions/1192955/how-to-install-g-10-on-ubuntu-18-04 indicates that you might, I hope so.

hpages commented 5 months ago

I just made a small change in the RELEASE_3_19 branch. Can you try to install again with

remotes::install_github("Bioconductor/SparseArray@RELEASE_3_19", force=TRUE)

Let me know how that goes. Thanks

alex-wenzel commented 5 months ago

I had this same error today with the following initial software configuration:

I was able to solve it by upgrading gcc to 11.4.0. I haven't tried to install this RELEASE_3_19 target, but the standard BiocManager install worked once I upgraded gcc.

hpages commented 5 months ago

@drneavin It would be useful if you could confirm that the change I made in the RELEASE_19 branch (commit e960ae904d07f400c923f2e774144f7aaadf528f) solves the problem with your old version of gcc. Thanks!

drneavin commented 5 months ago

RELEASE_3_19 works! Thanks for the fast updates! I'm still going to try to update to a newer gcc but good to know that I can get it working with this release and gcc 7.5. Thanks!

hpages commented 5 months ago

Great! Thanks for letting me know. I'll bump the version in RELEASE_3_19 and apply the fix to the devel branch. Thanks again.