ChemmineOB cannot find installed open-babel
1
0
Entering edit mode
yun YAN ▴ 20
@yun-yan-6355
Last seen 2.2 years ago
Canada

I have installed ChemmineOB and also open-babel but when the package is called inside R console, it seems that my open-babel is not found. Actually open-babel could be called by using its command line in terminal. I got confused and any suggestions will help a lot. 

Thank you so much. 

 

install open-babel

brew install open-babel

locate OPEN_BABEL_INCDIR and OPEN_BABEL_LIBDIR

OPEN_BABEL_INCDIR is /usr/local/Cellar/open-babel/2.3.2/lib/openbabel/2.3.2, where files likealias.hdescriptor.hpointgroup.hatom.h etc.

OPEN_BABEL_LIBDIR is /usr/local/Cellar/open-babel/2.3.2/lib/openbabel/2.3.2, where files likeAPIInterface.sofastsearchformat.sooutformat.soCSRformat.so, etc.

install ChemmineOB

R CMD INSTALL --configure-args='--with-openbabel-include=/usr/local/Cellar/open-babel/2.3.2/include/openbabel-2.0/openbabel --with-openbabel-lib=/usr/local/Cellar/open-babel/2.3.2/lib/openbabel/2.3.2' ChemmineOB_1.2.9.tgz

Errors reported

Error : .onLoad failed in loadNamespace() for 'ChemmineOB', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/ChemmineOB/libs/ChemmineOB.so': dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/ChemmineOB/libs/ChemmineOB.so, 10): Symbol not found: __ZN9OpenBabel10FastSearch11FindSimilarEPNS_6OBBaseERSt8multimapIdjSt4lessIdESaISt4pairIKdjEEEdd
Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/ChemmineOB/libs/ChemmineOB.so
Expected in: /usr/local/lib/libopenbabel.4.dylib in /Library/Frameworks/R.framework/Versions/3.1/Resources/library/ChemmineOB/libs/ChemmineOB.so
Error: package or namespace load failed for ‘ChemmineOB’

Environment

R version 3.1.1 (2014-07-10) -- "Sock it to Me"

Platform: x86_64-apple-darwin13.1.0 (64-bit) Mac OS X 10.9.5

Xcode 6.0.1

ChemmineOB openbabel • 2.9k views
ADD COMMENT
1
Entering edit mode
Dan Tenenbaum ★ 8.2k
@dan-tenenbaum-4256
Last seen 7 months ago
United States

I suggest you uninstall the brew-provided version of Open Babel and install it instead from here:

 

http://sourceforge.net/projects/openbabel/files/openbabel/2.3.1/OpenBabel-2.3.1.mac.zip/download

This is the version of Open Babel used by the Mac build machines at Bioconductor.

Then install ChemmineOB as follows:

source("http://bioconductor.org/biocLite.R")

biocLite("ChemmineOB")

That will install the binary version of ChemmineOB, which is already compiled. 

I just tried these steps on my own machine and they worked fine.

Dan

ADD COMMENT
0
Entering edit mode

This worked for me; thanks, Dan.

ADD REPLY
0
Entering edit mode

I do this way on mac os but still getting error? Error: package or namespace load failed for ‘ChemmineOB’: .onLoad failed in loadNamespace() for 'ChemmineOB', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ChemmineOB/libs/ChemmineOB.so': dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ChemmineOB/libs/ChemmineOB.so, 10): Library not loaded: /usr/local/opt/open-babel/lib/libopenbabel.5.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/ChemmineOB/libs/ChemmineOB.so Reason: image not found

ADD REPLY
0
Entering edit mode

First ensure that the file "/usr/local/opt/open-babel/lib/libopenbabel.5.dylib" exists. If it does not, then open babel is not installed properly. If it does exist, make sure that the environment variable OPEN_BABEL_LIBDIR is defined and points to "/usr/local/opt/open-babel/lib", or wherever the "libopenbabel.5.dynlib" library is located. Also make sure that the environment variable OPEN_BABEL_INCDIR is set to the location of the open babel header files. These two variables need to be set not just when you install ChemmineOB, but also whenever you use it in R.

ADD REPLY

Login before adding your answer.

Traffic: 343 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