r-hub / rhub

R-hub API client
https://r-hub.github.io/rhub/
Other
353 stars 52 forks source link

Error with compiling RProtoBuf #485

Closed sjentsch closed 6 months ago

sjentsch commented 3 years ago

When testing my package on r-hub, I get the following warning / error message (my package uses RProtoBuf as Suggests):

In i.p(...) : installation of package ‘RProtoBuf’ had non-zero exit status


It was either caused by this error (or another error further below):

configure: error: ERROR: ProtoBuf headers required; use '-Iincludedir' in CXXFLAGS for unusual locations. ERROR: configuration failed for package ‘RProtoBuf’

which seems odd, given the libprotobuf-dev is installed as recommended.

Affected OS: Debian Linux, R-devel, GCC ASAN/UBSAN - RProtoBuf 0.4.17


Alternatively, it is caused by another error:

Error: package or namespace load failed for ‘RProtoBuf’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/docker/R-svn/packages/lib/00LOCK-RProtoBuf/00new/RProtoBuf/libs/RProtoBuf.so': /home/docker/R-svn/packages/lib/00LOCK-RProtoBuf/00new/RProtoBuf/libs/RProtoBuf.so: undefined symbol: _ZN6google8protobuf8compiler10SourceTree19GetLastErrorMessageEv Error: loading failed Execution halted ERROR: loading failed

Affected OS: Ubuntu Linux 20.04.1 LTS, R-devel with rchk - RProtoBuf 0.4.17

gaborcsardi commented 6 months ago

This issue is about the previous R-hub system, it does not apply to the new system, so I am closing it now. Please see https://r-hub.github.io/rhub/ for the new system, R-hub v2.

sjentsch commented 6 months ago

Unfortunately, the error happens on R-hub v2 as well. According to Dirk's repository front page, you need to install protobuf-compiler, libprotobuf-dev, and libprotoc-dev whereas setup-deps@v1 only seems to install the firs two of them:

 + RProtoBuf       0.4.22     [bld][cmp][dl] (1.01 MB) + libprotobuf-dev, protobuf-compiler

Please let me know whether I need to create a new issue.

sjentsch commented 6 months ago

There is a version on https://github.com/r-hub2/stretchy-military-eyra-jmvReadWrite In either case (on my Github and on r-rhub2), it fails with linux but it runs fine on the other platforms (windows, macos, macos-arm64).

gaborcsardi commented 6 months ago

Thanks, will be fixed soon here: https://github.com/rstudio/r-system-requirements/pull/167

sjentsch commented 6 months ago

Thanks for fixing that!

gaborcsardi commented 6 months ago

Should be good now.