girke-lab / ChemmineOB

OpenBabel wrapper package for R
Other
9 stars 5 forks source link

Error Installing ChemmineOB on Ubuntu 18.04 within RStudio #14

Closed anusurendra closed 4 years ago

anusurendra commented 6 years ago

Hi,

I am getting the following error when installing ChemmineOB:

> biocLite("ChemmineOB")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.4 (2018-03-15).
Installing package(s) ‘ChemmineOB’
trying URL 'https://bioconductor.org/packages/3.6/bioc/src/contrib/ChemmineOB_1.16.2.tar.gz'
Content type 'application/x-gzip' length 1216118 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

* installing *source* package ‘ChemmineOB’ ...
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for OPENBABEL... yes
checking for OPENBABEL... yes
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++  -I/usr/share/R/include -DNDEBUG  -I"/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include" -I"/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"   -I/usr/local/include/openbabel-2.0  -I/usr/include/eigen3  -DUSE_BOOST -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c ChemmineOB.cpp -o ChemmineOB.o
In file included from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0,
                 from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17,
                 from ChemmineOB.cpp:1656:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/detail/shared_count.hpp:355:33: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )
                                 ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /usr/local/include/openbabel-2.0/openbabel/shared_ptr.h:20,
                 from /usr/local/include/openbabel-2.0/openbabel/alias.h:19,
                 from ChemmineOB.cpp:1500:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17:0,
                 from ChemmineOB.cpp:1656:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:256:65: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >
                                                                 ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /usr/local/include/openbabel-2.0/openbabel/shared_ptr.h:20,
                 from /usr/local/include/openbabel-2.0/openbabel/alias.h:19,
                 from ChemmineOB.cpp:1500:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17:0,
                 from ChemmineOB.cpp:1656:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:471:31: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()
                               ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /usr/local/include/openbabel-2.0/openbabel/shared_ptr.h:20,
                 from /usr/local/include/openbabel-2.0/openbabel/alias.h:19,
                 from ChemmineOB.cpp:1500:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17:0,
                 from ChemmineOB.cpp:1656:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:484:22: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
                      ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /usr/local/include/openbabel-2.0/openbabel/shared_ptr.h:20,
                 from /usr/local/include/openbabel-2.0/openbabel/alias.h:19,
                 from ChemmineOB.cpp:1500:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17:0,
                 from ChemmineOB.cpp:1656:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:567:34: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     shared_ptr & operator=( std::auto_ptr<Y> & r )
                                  ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /usr/local/include/openbabel-2.0/openbabel/shared_ptr.h:20,
                 from /usr/local/include/openbabel-2.0/openbabel/alias.h:19,
                 from ChemmineOB.cpp:1500:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17:0,
                 from ChemmineOB.cpp:1656:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:576:34: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     shared_ptr & operator=( std::auto_ptr<Y> && r )
                                  ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /usr/local/include/openbabel-2.0/openbabel/shared_ptr.h:20,
                 from /usr/local/include/openbabel-2.0/openbabel/alias.h:19,
                 from ChemmineOB.cpp:1500:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
In file included from /home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/shared_ptr.hpp:17:0,
                 from ChemmineOB.cpp:1656:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp: In member function ‘boost::shared_ptr<T>& boost::shared_ptr<T>::operator=(std::auto_ptr<_Up>&&)’:
/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include/boost/smart_ptr/shared_ptr.hpp:578:38: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
         this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this );
                                      ^~~~~~~~
In file included from /usr/include/c++/7/memory:80:0,
                 from /usr/local/include/openbabel-2.0/openbabel/shared_ptr.h:20,
                 from /usr/local/include/openbabel-2.0/openbabel/alias.h:19,
                 from ChemmineOB.cpp:1500:
/usr/include/c++/7/bits/unique_ptr.h:51:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
g++  -I/usr/share/R/include -DNDEBUG  -I"/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/BH/include" -I"/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"   -I/usr/local/include/openbabel-2.0  -I/usr/include/eigen3  -DUSE_BOOST -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c canonical.cpp -o canonical.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o ChemmineOB.so ChemmineOB.o canonical.o -L/usr/local/lib -lopenbabel -L/usr/lib/R/lib -lR
/usr/bin/x86_64-linux-gnu-ld: /usr/local/lib/libopenbabel.a(obconversion.o): relocation R_X86_64_PC32 against symbol `_ZZN9OpenBabel8OBFormat7DefaultEvE1d' can not be used when making a shared object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:6: recipe for target 'ChemmineOB.so' failed
make: *** [ChemmineOB.so] Error 1
ERROR: compilation failed for package ‘ChemmineOB’
* removing ‘/home/surendraa/R/x86_64-pc-linux-gnu-library/3.4/ChemmineOB’

The downloaded source packages are in
    ‘/tmp/RtmpFfIxjT/downloaded_packages’
Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘ChemmineOB’ had non-zero exit status

Any help is much appreciated.

khoran commented 6 years ago

How did you install or compile openbabel? What OS/distribution are you running on? It seems like the problem is that either OpenBabel was compiled as a 32 bit binary, or it was missing the compiler option "-fPIC".

khoran commented 6 years ago

Oh, I just saw in the subject you say your on Ubuntu 18.04. Did you install the openbabel package from them then? I've had problems with their packaging before. You could try installing openbabel from source and see if that helps. You can find build instructions here: http://open-babel.readthedocs.io/en/latest/Installation/install.html#compiling-open-babel