Closed kenlo1 closed 3 years ago
You can add additional directories by setting some environment variables for the compiler. One way to do this is by creating the file ~/.R/Makevars and setting CXXFLAGS= -I /usr/local/include/eigen3
. If that doesn't modify the compile command, try using PKG_CXXFLAGS
.
Thanks! I was able to get past that first error. Now my error message reads as follows:
R CMD INSTALL --configure-args='--with-openbabel-include=/nfs/peptide/software/openbabel/include/openbabel3 --with-openbabel-lib=/nfs/peptide/software/openbabel/lib' ./ChemmineOB_1.28.4.tar.gz
Set these two environment variables (see INSTALL file):
OPEN_BABEL_INCDIR = path to header files
OPEN_BABEL_LIBDIR = path to shared (.so) library file
Does that mean the --configure-args switch does not achieve the same thing?
I noticed this in the error message:
libopenbabel.so.7: cannot open shared object file: No such file or directory
I'm not sure if this is relevant, but in the directory specified with the '--with-openbabel-lib' flag, I am seeing libopenbabel.so.7, so that is a little curious.
--configure-args and --with-openbabel-lib are for compile time. But R still needs to know where the library is at runtime. So anytime you want to use the ChemmineOB package, the OPEN_BABEL_*
environment variables need to be defined. This is easily accomplished by putting them in your .bashrc file or whatever config file your shell uses.
I added to environment variables as per your suggestion. This is what I see when I check the environment variables.
echo $OPEN_BABEL_INCDIR /nfs/peptide/software/openbabel/include/openbabel3
echo $OPEN_BABEL_LIBDIR /nfs/peptide/software/openbabel/lib
I tried installing again with R CMD INSTALL --configure-args='--with-openbabel-include=/nfs/peptide/software/openbabel/include/openbabel3 --with-openbabel-lib=/nfs/peptide/software/openbabel/lib' ./ChemmineOB_1.28.4.tar.gz
but I still get the same error message.
Hi Kevin,
I figured out what was wrong. It turns out that my LD_LIBRARY_PATH environment variable wasn't set correctly. I found some additional information from open-babel (https://open-babel.readthedocs.io/en/latest/Installation/install.html#environment-variables). Once I changed it to the correct location, ChemmineOB installed correctly. Thanks for all your help!
Best,
Ken
Hi all,
I am having some issues installing ChemmineOB on CentOS 7.
Basically I don't have root access and have installed openbabel in a custom directory using cmake flags -DCMAKE_INSTALL_PREFIX and -DEIGEN3_INCLUDE_DIR
Since I am using custom paths, I used this to install ChemmineOB. R CMD INSTALL --configure-args='--with-openbabel-include=/nfs/peptide/software/openbabel/include/openbabel3 --with-openbabel-lib=/nfs/peptide/software/openbabel/lib' ./ChemmineOB_1.28.4.tar.gz
Here is what the error message says:
include <Eigen/Core>
compilation terminated. make: *** [ChemmineOB.o] Error 1 ERROR: compilation failed for package ‘ChemmineOB’
removing ‘/nfs/peptide/home/lok2/bin/R-3.6.3/library/ChemmineOB’
It seems like it is not finding Eigen, then I noticed that -I/usr/inlcude/eigen3, which is not where I have eigen3. Is there an install flag that can change this? My eigen3 is in /usr/local/include/eigen3.
Any help would be awesome.
Best,
Ken