mychem / mychem-code

Mychem is an extension for MySQL that makes possible to use cheminformatics functions within SQL queries.
GNU General Public License v2.0
21 stars 14 forks source link

mychem on osx 10.10.5 #13

Closed hmpelta closed 8 years ago

hmpelta commented 8 years ago

Hi I have followed instructions to install mychem on my mac (OS X yosemite 10.10.5) but I was not successful .

after typing this: mysql -u root -p < src/mychemdb_macosx.sql

I get this error :ERROR 1126 (HY000) at line 10: Can't open shared library 'libmychem.dylib' (errno: 2 dlopen(/usr/local/Cellar/mysql56/5.6.29/lib/plugin/libmychem.dylib, 2): Symbol not found: __ZN9OpenBabel12OBDescriptor14GetStrin).

i have tried with different version of mysql from 5.5 until 5.7.

it is several days i am trying to solve problem …

"make" command run successfully of course with one warning:

[ 6%] Building CXX object src/CMakeFiles/mychem-lib.dir/conversion_wrapper.cpp.o

In file included from /usr/local/src/mychem-code-master/src/conversion_wrapper.cpp:41:

/usr/local/src/mychem-code-master/src/fingerprints/finger3.cpp:220:34: warning:

  unsequenced modification and access to 'div' [-Wunsequenced]

    ngrp = (num + div -1)/div--; //rounds up

                  ~~~        ^

1 warning generated.

Pansanel commented 8 years ago

Which version of Open Babel are you using?

hmpelta commented 8 years ago

thanks for your consideration; I used openbabel 2.3.2 ( installed with brew )

hmpelta commented 8 years ago

finally the problem solved. in fact it was path finding problem. I changed mysql version to 5.7 also put openbabel libs in usr/local/opt/. SELECT MYCHEM_VERSION() return true version but running other commands return null. for example:

mysql> SELECT EXACTMASS(SMILES_TO_MOLECULE('c1ccccc1'));

SELECT EXACTMASS(SMILES_TO_MOLECULE('c1ccccc1'))

+-------------------------------------------+ | EXACTMASS(SMILES_TO_MOLECULE('c1ccccc1')) | +-------------------------------------------+ | NULL | +-------------------------------------------+ 1 row in set (0.00 sec)

mysql> select version(), mychem_version(), openbabel_version();


select version(), mychem_version(), openbabel_version()

+-----------+------------------+---------------------+ | version() | mychem_version() | openbabel_version() | +-----------+------------------+---------------------+ | 5.7.11 | 0.9.3 | 2.3.2 | +-----------+------------------+---------------------+ 1 row in set (0.00 sec)

Thanks;

hmpelta commented 8 years ago

To whom it may concern, openbabel could n`t link; so reinstalling openbabel solved the link problem;