Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with R package biomaRt and This dependency RSQLite

I have a problem to install biomaRt with bioconductor. I have already install this package without error in Rstudio with R 3.6 but with R 4.0 in conda specific environment container, I have an error with RSQLite.

Here this message :

x86_64-conda-linux-gnu-c++ -std=gnu++11 -I"/home/legrand-lab/anaconda3/envs/r4-base/lib/R/include" -DNDEBUG -I. -Ivendor -DRSQLITE_USE_BUNDLED_SQLITE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_STAT4 -DSQLITE_SOUNDEX -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR -DSQLITE_MAX_LENGTH=2147483647 -DHAVE_USLEEP=1 -I'/home/legrand-lab/anaconda3/envs/r4-base/lib/R/library/plogr/include' -I'/home/legrand-lab/anaconda3/envs/r4-base/lib/R/library/Rcpp/include' -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/legrand-lab/anaconda3/envs/r4-base/include -I/home/legrand-lab/anaconda3/envs/r4-base/include -Wl,-rpath-link,/home/legrand-lab/anaconda3/envs/r4-base/lib  -fvisibility=hidden -fpic  -fvisibility-inlines-hidden  -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/legrand-lab/anaconda3/envs/r4-base/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1616773775410/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/legrand-lab/anaconda3/envs/r4-base=/usr/local/src/conda-prefix  -c SqliteColumnDataSource.cpp -o SqliteColumnDataSource.o
In file included from vendor/boost/math/special_functions/sign.hpp:16,
                 from vendor/boost/lexical_cast/detail/inf_nan.hpp:34,
                 from vendor/boost/lexical_cast/detail/converter_lexical_streams.hpp:63,
                 from vendor/boost/lexical_cast/detail/converter_lexical.hpp:54,
                 from vendor/boost/lexical_cast/try_lexical_convert.hpp:44,
                 from vendor/boost/lexical_cast.hpp:32,
                 from vendor/boost/date_time/format_date_parser.hpp:14,
                 from vendor/boost/date_time/date_generator_parser.hpp:20,
                 from vendor/boost/date_time/date_facet.hpp:25,
                 from vendor/boost/date_time/gregorian/gregorian_io.hpp:16,
                 from vendor/boost/date_time/gregorian/gregorian.hpp:31,
                 from SqliteColumnDataSource.cpp:6:
vendor/boost/math/tools/config.hpp:408:13: fatal error: boost/detail/fenv.hpp: No such file or directory
  408 |    #include <boost/detail/fenv.hpp>
      |             ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [/home/legrand-lab/anaconda3/envs/r4-base/lib/R/etc/Makeconf:181 : SqliteColumnDataSource.o] Erreur 1
ERROR: compilation failed for package ‘RSQLite’
* removing ‘/home/legrand-lab/anaconda3/envs/r4-base/lib/R/library/RSQLite’
ERROR: dependency ‘RSQLite’ is not available for package ‘AnnotationDbi’
* removing ‘/home/legrand-lab/anaconda3/envs/r4-base/lib/R/library/AnnotationDbi’
ERROR: dependency ‘RSQLite’ is not available for package ‘BiocFileCache’
* removing ‘/home/legrand-lab/anaconda3/envs/r4-base/lib/R/library/BiocFileCache’
ERROR: dependencies ‘AnnotationDbi’, ‘BiocFileCache’ are not available for package ‘biomaRt’
* removing ‘/home/legrand-lab/anaconda3/envs/r4-base/lib/R/library/biomaRt’

The downloaded source packages are in
    ‘/tmp/RtmpJRLzOp/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(...) :
  installation of package ‘RSQLite’ had non-zero exit status
2: In install.packages(...) :
  installation of package ‘AnnotationDbi’ had non-zero exit status
3: In install.packages(...) :
  installation of package ‘BiocFileCache’ had non-zero exit status
4: In install.packages(...) :
  installation of package ‘biomaRt’ had non-zero exit status

If anyone has an idea or one solution...

like image 364
William Jarassier Avatar asked Apr 27 '21 08:04

William Jarassier


Video Answer


3 Answers

the log indicates the error is from: fatal error: boost/detail/fenv.hpp: No such file or directory 408 | #include <boost/detail/fenv.hpp>

conda install -c conda-forge boost-cpp

I tried this and then install RSQLite in R, it works.

install.packages("RSQLite")
like image 129
Rongting Huang Avatar answered Oct 27 '22 04:10

Rongting Huang


This issue also affects conda packages. The temporary fix seems to be a rollback, i.e. remotes::install_version("RSQLite", version = "2.2.5").

See the example here: https://github.com/kstawiski/OmicSelector/blob/master/.github/workflows/r.yml#L26

like image 29
Konrad Stawiski Avatar answered Oct 27 '22 04:10

Konrad Stawiski


conda install -c conda-forge boost-cpp

Solved the problem for me.

like image 4
Koncopd Avatar answered Oct 27 '22 05:10

Koncopd