RprotobufLib installation error in R 4.1.2
0
0
Entering edit mode
ALFONS • 0
@042d898f
Last seen 2.9 years ago
Spain

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

RProtoBufLib • 2.3k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Hello, well after getting BiocManager::valid() TRUE I still get the same error:

onfig.status: creating src/Makevars
** libs
g++ -std=gnu++11 -shared -fpic -I../inst/include/ -I/tmp/RtmpVdiaS4/R.INSTALL2878c115c86b/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’
* removing ‘/soft/system/software/R/4.1.2-foss-2020b/lib/R/library/RProtoBufLib’

The downloaded source packages are in
    ‘/tmp/RtmpOErdVk/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In .inet_warning(msg) :
  installation of package ‘RProtoBufLib’ had non-zero exit status
> sessionInfo() 
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS/LAPACK: /soft/system/software/OpenBLAS/0.3.12-GCC-10.2.0/lib/libopenblas_prescottp-r0.3.12.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_ES.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] BiocManager_1.30.16 compiler_4.1.2      tools_4.1.2        
>

Any hint will be appreciated. Thanks again,

Alfons

ADD REPLY
0
Entering edit mode

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:

diff -ruN protobuf-3.13.0/src/libprotobuf-lite.map ../../RProtoBufLib.orig/src/protobuf-3.13.0/src/libprotobuf-lite.map
--- protobuf-3.13.0/src/libprotobuf-lite.map    2022-03-15 14:13:47.000000000 -0700
+++ ../../RProtoBufLib.orig/src/protobuf-3.13.0/src/libprotobuf-lite.map        2020-08-14 16:24:06.000000000 -0700
@@ -3,8 +3,6 @@
     extern "C++" {
       *google*;
     };
-    scc_info_*;
-    descriptor_table_*;

   local:
     *;
diff -ruN protobuf-3.13.0/src/libprotobuf.map ../../RProtoBufLib.orig/src/protobuf-3.13.0/src/libprotobuf.map
--- protobuf-3.13.0/src/libprotobuf.map 2022-03-15 14:14:12.000000000 -0700
+++ ../../RProtoBufLib.orig/src/protobuf-3.13.0/src/libprotobuf.map     2020-08-14 16:24:06.000000000 -0700
@@ -3,8 +3,6 @@
     extern "C++" {
       *google*;
     };
-    scc_info_*;
-    descriptor_table_*;

   local:
     *;
diff -ruN protobuf-3.13.0/src/libprotoc.map ../../RProtoBufLib.orig/src/protobuf-3.13.0/src/libprotoc.map
--- protobuf-3.13.0/src/libprotoc.map   2022-03-15 14:14:33.000000000 -0700
+++ ../../RProtoBufLib.orig/src/protobuf-3.13.0/src/libprotoc.map       2020-08-14 16:24:06.000000000 -0700
@@ -3,8 +3,6 @@
     extern "C++" {
       *google*;
     };
-    scc_info_*;
-    descriptor_table_*;

   local:
     *;
ADD REPLY

Login before adding your answer.

Traffic: 587 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6