Open Pansanel opened 3 years ago
Nevertheless, new OpenBabel and MariaDB libraries and headers are successfully found with this PR!
An alternative solution to the m_ctype-problem is to install libmariadbclient-dev-compat, at least that worked for me but that was before this PR.
An alternative solution to the m_ctype-problem is to install libmariadbclient-dev-compat, at least that worked for me but that was before this PR.
libmariadbclient-dev-compat has been dropped in Debian 10 and Ubuntu 20.04. It seems that MariaDB 10.1 was the last release supporting this sort of compatibility.
I confirm that 5b6f95fe859c66d9cffb9033b05c5d7bff3b8af7 fixes all my issues and I finally am able to use the functions. Thanks a lot!
Tested on Ubuntu 18.04, with system-provided OpenBabel v2.3.2 and MySQL v5.7.36. I did not need any specific CMake flags, it just went very smoothly. I had to adjust AppArmor configuration as described. I will also test it with MariaDB when I have time.
I have as well successfully built 5b6f95f on:
@merkys I am trying to install the stack on a debian 10+ AWS EC2 but somehow I have some problem with the installation procedure. I always end up with a NULL value when testing the SELECT EXACTMASS(SMILES_TO_MOLECULE('c1ccccc1')); after all the installation. Could you (or anyone else) provide an updated procedure please ? Thank you
@studur I will try to reproduce, will get back to you.
@studur I have built and installed this PR on Debian 10 and ran into the same issue with all calls returning NULL
. I have no idea why. What is even worse, I do not recall whether I got any non-NULL
values testing on Debian 10 before.
@merkys thank you for trying. I hope that this will be fixed. Have a great day
Hi, I will try to run it on Debian 10 (I have access to an OpenStack cloud providing such image). I will let you know ASAP. Best, Jerome
Can you check again? It works now on my side with debian 10 and Openbabel v2.4.1.
@Pansanel I just tried with 532eb6abfa768e62cf8a08dd73f1d9183df035f6 and got NULL
for select smiles_to_molecule("c1ccccc1");
. Are you using system-provided Open Babel, or have you installed it yourself?
I am using the system-provided Open Babel. Did you try to enable the test mode?
Hi, I will try to run it on Debian 10 (I have access to an OpenStack cloud providing such image). I will let you know ASAP. Best, Jerome
Thank you for looking in to this. Could this be due to a difference between the Openstack image and the AWS Marketplace AMI Debian 10 image ? I tried with the later.
Hi, there should be no difference between the images. Is your installation directory: /usr/lib/x86_64-linux-gnu/mariadb19/plugin
?
What gives:
ldd /usr/lib/x86_64-linux-gnu/mariadb19/plugin/libmychem.so.2.0.0
I will check this the next time I spin up an AWS EC2 but I noticed the plugin directory change for mariadb.
Meanwhile, I would not be surprised that I don't use the right client libs for mariadb.
Could you paste in the comments the mariadb and openbabel installations please? Specifically the section that replace the lines 81-85 in the following installation doc. https://github.com/mychem/mychem-code/commit/8ac73f6eddbb9ef8294a041a7f37c0a69ddbb9fe
For openbabel and mariadb, I am just using the default debian packages:
apt install openbabel libopenbabel-dev
apt install libmariadbclient-dev mariadb-server
Thanks @Pansanel , it works now. I executed the following commands as a new user authenticated with ssh and member of the sudo group in Debian 10
# Install Openbabel and MariaDB
sudo apt install -y openbabel libopenbabel-dev libmariadb-dev-compat libmariadbclient-dev mariadb-server python3-mysqldb cmake g++ zip git
sudo systemctl start mariadb
sudo systemctl enable mariadb
# Configure MySQL
sudo mysql_secure_installation
mysql -u root -p
create user 'USER'@'localhost' identified by '**********';
grant all on *.* to 'USER'@'localhost' with grant option;
flush privileges;
exit;
# Logout MySQL and login back again
mysql -u USER -p
CREATE DATABASE mychem;
exit;
cd ~
git clone https://github.com/Pansanel/mychem-code.git
cd mychem-code
# the master branch contains the code for debian 10 / mariadb 10.3 compatibility.
mkdir build
cd build
cmake ..
make
sudo make install
# Create missing symlink
sudo mkdir -p /usr/lib/mysql/plugin/
cd /usr/lib/mysql/plugin/
sudo ln -s /usr/lib/x86_64-linux-gnu/mariadb19/plugin/libmychem.so libmychem.so
# Install Mychem extension
cd ~/mychem-code
mysql -u USER -p < src/mychemdb.sql
# Test
mysql -u USER -p
use mychem;
SELECT EXACTMASS(SMILES_TO_MOLECULE('c1ccccc1'));
Should get ...
+-------------------------------------------+
| EXACTMASS(SMILES_TO_MOLECULE('c1ccccc1')) |
+-------------------------------------------+
| 78.046950 |
+-------------------------------------------+
@merkys Do you want to confirm on your end ?
It is a good news :-) I have to find a way to have a generic build system that can work with all the most recent OpenBabel releases. In particular, the src/descriptors/*
and src/fingerprints/*
files are directly copied from OpenBabel source code. I will try to fix this by downloading during CMake configuration the right files.
I attempted building on Ubuntu 20.04 with system-provided packages (OpenBabel 3.0.0 and MariaDB 10.3.25). I used commands
First of all, I stumbled upon
I did the following change to get around it:
After that, building failed with OpenBabel:
[skip]
Maybe I am missing something?