Entering edit mode
Dear all, I've been trying unsuccessfully to install RProtobufLib in R 4.1.2, using Bioconductor 3.14, in Ubuntu 20.04:
manager@godfather:~$ uname -a
Linux godfather 5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
manager@godfather:~$
Doing both:
manager@godfather:~$ R
R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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.
Natural language support but running in an English locale
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("RProtoBufLib")
Also trying a previous version:
R CMD INSTALL RProtoBufLib_2.5.1.tar.gz
Or the git repo:
git clone https://git.bioconductor.org/packages/RProtoBufLib
R CMD INSTALL RProtoBufLib
The error always arises with protoc:
CXXLD protoc
./.libs/libprotoc.so: error: undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'
./.libs/libprotoc.so: error: undefined reference to 'descriptor_table_google_2fprotobuf_2fdescriptor_2eproto'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:3884: protoc] Error 1
make[1]: Leaving directory '/tmp/Rtmp0rxjOC/R.INSTALLeed7c25357a02/RProtoBufLib/src/protobuf-3.13.0/src'
make: *** [Makefile:1867: install-recursive] Error 1
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -shared -fpic -I../inst/include/ -I/tmp/Rtmp0rxjOC/R.INSTALLeed7c25357a02/RProtoBufLib/src/pb_build/include/ -o GatingSet_pb_lib/libGatingSet.pb.so GatingSet_pb_lib/GatingSet.pb.cc
In file included from GatingSet_pb_lib/GatingSet.pb.cc:4:
../inst/include/cytolib/GatingSet.pb.h:10:10: fatal error: google/protobuf/port_def.inc: No such file or directory
10 | #include <google/protobuf/port_def.inc>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makevars:15: libGatingSet.pb] Error 1
ERROR: compilation failed for package ‘RProtoBufLib’
Any hint will be appreciated. Thank you in advance,
Alfons
For Bioc 3.14 you should be working with RProtoBufLib 2.6.0 -- please verify that BiocManager::valid() is TRUE and try again with BiocManager::install. Let us know how it goes. If it fails please give the result of sessionInfo() after the failure of the installation attempt, with all error messages.
Hi, as you point out BiocManager::valid() wasn't TRUE, I'm going to solve that issue first and I'll let you know if afterwards I'm able to get RProtoBufLib installed. thank you,
Alfons
Hello, well after getting BiocManager::valid() TRUE I still get the same error:
Any hint will be appreciated. Thanks again,
Alfons
Inside RProtoBufLib 2.6 is the source for protobuf 3.13.0. The undefined errors are due to using GCC > =10. I used this patch to fix your issue: