pauca / RRDKit

A pragmatic interface to RDKit in R
25 stars 7 forks source link

Error while compiling on Debian 10 (Buster) #4

Open egonw opened 5 years ago

egonw commented 5 years ago

After installing librdkit-dev and libboost1.67-dev to provide needed header files, I got this error:

g++  -I"/usr/share/R/include" -DNDEBUG -I/Code  -I/usr/lib64 -I"/home/egonw/R/x86_64-pc-linux-gnu-library/3.5/Rcpp/include"   -I/usr/include/rdkit -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-3.5.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c inchi.cpp -o inchi.o
inchi.cpp: In function ‘bool RDKit::{anonymous}::assignBondDirs(RDKit::RWMol&, RDKit::{anonymous}::INT_PAIR_VECT&, RDKit::{anonymous}::INT_PAIR_VECT&)’:
inchi.cpp:103:20: error: ‘queue’ in namespace ‘std’ does not name a template type
       typedef std::queue<std::pair<int, Bond::BondDir> > ASSIGNMENTQTYPE;
                    ^~~~~
inchi.cpp:103:15: note: ‘std::queue’ is defined in header ‘<queue>’; did you forget to ‘#include <queue>’?
inchi.cpp:69:1:
+#include <queue>
 #include <boost/foreach.hpp>
inchi.cpp:103:15:
       typedef std::queue<std::pair<int, Bond::BondDir> > ASSIGNMENTQTYPE;
               ^~~
inchi.cpp:104:7: error: ‘ASSIGNMENTQTYPE’ was not declared in this scope
       ASSIGNMENTQTYPE queue;
       ^~~~~~~~~~~~~~~
inchi.cpp:106:37: error: ‘queue’ was not declared in this scope
       while (! pending.empty() || ! queue.empty()) {
                                     ^~~~~
make: *** [/usr/lib/R/etc/Makeconf:171: inchi.o] Error 1
ERROR: compilation failed for package ‘rrdkit’
* removing ‘/home/egonw/R/x86_64-pc-linux-gnu-library/3.5/rrdkit’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/tmp/Rtmpwhsopk/file48b7d6e2626/rrdkit_0.13.tar.gz’ had non-zero exit status
pauca commented 5 years ago

error reproduced

nattzy94 commented 4 years ago

Hi, I get the same error when running: install_github("pauca/rrdkit/rrdkit")

This is the error message I get:

1 error generated. make: *** [inchi.o] Error 1 ERROR: compilation failed for package ‘rrdkit’

Did you manage to solve this error?

lawremi commented 1 year ago

Presumably an older version of RDKit did #include <queue>, but that is not the case in the current version. Thus, the assumption that the queue header has been included is no longer valid, and the code needs to be updated to explicitly include it.