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 like alias.h
, descriptor.h
, pointgroup.h
, atom.h
etc.
OPEN_BABEL_LIBDIR
is /usr/local/Cellar/open-babel/2.3.2/lib/openbabel/2.3.2
, where files like APIInterface.so
, fastsearchformat.so
, outformat.so
, CSRformat.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 In addition: Warning message: package ‘ChemmineOB’ was built under R version 3.1.1 Error: package or namespace load failed for ‘ChemmineOB’
Environment
R version: 3.1.0 (2014-04-10) -- "Spring Dance"
Platform: x86_64-apple-darwin13.1.0 (64-bit) Mac OS X 10.9.5
Xcode 6.0.1