Hi Francois,

Thank you for your suggestions! Sorry, I forgot to mention that Paolo had
already helped me to fix the problem. It was simple to solve, RDKit was
using the older gcc version installed in the system although I have loaded
the newest one using the module load command. So the trick just provided
the full path to the  gcc-8.1 compiler with something like this
"CC=/opt/gcc8.1/bin/gcc CXX=/opt/gcc8.1/bin/g++ cmake" to enforce the
program to pick up the specified compiler. After that, the program compiled
nicely.

I would like just to comment on another issue I found later. When I tried
to use the latest version of tensorflow together with rdkit in the same
python environment, I had problems to import the tensorflow package:

AttributeError: type object 'NewBase' has no attribute 'is_abstract'

After some googling, I found one solution in StackOverflow (
https://stackoverflow.com/questions/41529526/tensorflow-attributerror-type-object-newbase-has-no-attribute-is-abstract/43712626#43712626)
that worked in my case. It seems that rdkit uses an old version of six.py
that is incompatible with tensorflow. So the solution was simply to copy
the newest six.py available in my python environment to replace that one
used by rdkit, but I don't know if this may affect other stuff in rdkit. Do
you know if there is another way to solve this problem or if this
replacement in the six.py file may cause some problems in rdkit?

All the best,

Max

Em sex., 17 de abr. de 2020 às 07:45, Francois Berenger <mli...@ligand.eu>
escreveu:

> Hi Max,
>
> Not sure if it will help, but on Debian and Ubuntu you need the
> following
> system packages to be installed in order to compile rdkit:
>
> curl
> wget
> libboost-all-dev
> cmake
> git
> g++
> libeigen3-dev
> python3
> libpython3-all-dev
> python3-numpy
> python3-pip
> python3-pil
> python3-six
> python3-pandas
>
> What Linux distro are you using?
>
> Doesn't your distribution provides python3 ready packages for rdkit?
>
> Ideally, this is what you would want, especially if you install rdkit on
> all nodes of a computing cluster.
>
> Regards,
> F.
>
> On 16/04/2020 01:33, Max Pinheiro Jr wrote:
> > Hi Paolo,
> >
> > Thank you for your quite fast answer! Yes, I compiled Boost 1.67 using
> > the same gcc version, 8.1. I have seen this GLIBCXX possible solution
> > that you have commented before, and I also tried that but didn't work
> > anyway, I got the same problem with the Boost library and the
> > compilation can't finish. I am wondering if may exist any other
> > solution. I can also provide some other specific information if this
> > would help to map the problem and find a solution.
> >
> > Thank you again!
> >
> > Max Pinheiro Jr
> >
> > Em qua., 15 de abr. de 2020 às 18:25, Paolo Tosco
> > <paolo.tosco.m...@gmail.com> escreveu:
> >
> >> Hi Max,
> >>
> >> you mention you are using gcc-8.1 and Boost 1.67. Did you compile
> >> Boost with the same compiler or was it compiled with an earlier
> >> version of gcc/g++?
> >>
> >> If Boost was compiled with an earlier version of gcc/g++, you will
> >> need to add to /home/mpinheiro/codes/rdkit-2020.09/CMakeLists.txt
> >> the following line:
> >>
> >> add_definitions("-D_GLIBCXX_USE_CXX11_ABI=0")
> >>
> >> or the linker will fail during the compilation; see
> >> https://github.com/rdkit/rdkit/issues/2013#issuecomment-553563418.
> >>
> >> HTH, cheers
> >> p.
> >> On 15/04/2020 17:15, Max Pinheiro Jr wrote:
> >>
> >>> Dear all,
> >>>
> >>> I have exhaustively tried to compile rdkit (latest git version) on
> >>> a Linux cluster but the compilation process was always failing at
> >>> the same point with an error message related to the boost library.
> >>> After searching in the forum, the only way I could surpass the
> >>> problem and finally get the program compiled was setting the flag
> >>> "RDK_USE_BOOST_SERIALIZATION" to OFF. However, when I do a simple
> >>> test trying to import the Chem module I get the following error:
> >>>
> >>>
> >>
> >
> --------------------------------------------------------------------------------------------------------
> >>>
> >>> from rdkit import Chem
> >>> Traceback (most recent call last):
> >>> File "<stdin>", line 1, in <module>
> >>> File
> >>> "/home/mpinheiro/codes/rdkit-2020.09/rdkit/Chem/__init__.py", line
> >>> 20, in <module>
> >>> from rdkit.Chem import rdchem
> >>> SystemError: initialization of rdchem raised unreported exception
> >>>
> >>>
> >>
> >
> --------------------------------------------------------------------------------------------------------
> >>>
> >>>
> >>> I am using gcc-8.1, cmake-3.11.2 and the version 1.67 of boost
> >>> library to build RDKit. The compilation instructions I have used
> >>> are the following:
> >>>
> >>> cmake -DPy_ENABLE_SHARED=1 \
> >>> -DRDK_INSTALL_INTREE=ON \
> >>> -DRDK_BUILD_CPP_TESTS=ON \
> >>> -DRDK_INSTALL_STATIC_LIBS=ON \
> >>> -DRDK_BUILD_AVALON_SUPPORT=ON \
> >>> -DRDK_BUILD_CAIRO_SUPPORT=ON \
> >>> -DRDK_BUILD_INCHI_SUPPORT=ON \
> >>> -DRDK_BUILD_PYTHON_WRAPPERS=ON \
> >>> -DRDK_BUILD_SWIG_CSHARP_WRAPPER=ON \
> >>>
> >>>
> >> -DPYTHON_EXECUTABLE=/home/mpinheiro/.pyenv/versions/3.8.2/bin/python
> >>> \
> >>>
> >>>
> >>
> > -DPYTHON_LIBRARY=/home/mpinheiro/.pyenv/versions/3.8.2/lib/libpython3.8.a
> >>> \
> >>>
> >>>
> >>
> >
> -DPYTHON_INCLUDE_DIR=/home/mpinheiro/.pyenv/versions/3.8.2/include/python3.8
> >>> \
> >>> -DPYTHON_NUMPY_INCLUDE_PATH="$(python -c 'import numpy ;
> >>> print(numpy.get_include())')" \
> >>> -DBOOST_ROOT=/home/mpinheiro/codes/boost-1.67/ \
> >>>
> >>> -DBOOST_INCLUDEDIR=/home/mpinheiro/codes/boost-1.67/include/boost
> >>> \
> >>> -DBOOST_LIBRARYDIR=/home/mpinheiro/codes/boost-1.67/lib ..
> >>>
> >>> make -j 4 > make.log
> >>> make install
> >>>
> >>> I have also checked the links created in the rdBase.so file as
> >>> shown below and everything seems to be fine:
> >>>
> >>> linux-vdso.so.1 =>  (0x00002aaaaaaab000)
> >>> libRDKitRDBoost.so.1 =>
> >>> /home/mpinheiro/codes/rdkit-2020.09/lib/libRDKitRDBoost.so.1
> >>> (0x00002aaaaadb1000)
> >>> libboost_python38.so.1.67.0 =>
> >>> /home/mpinheiro/codes/boost-1.67/lib/libboost_python38.so.1.67.0
> >>> (0x00002aaaaafb5000)
> >>> libRDKitRDGeneral.so.1 =>
> >>> /home/mpinheiro/codes/rdkit-2020.09/lib/libRDKitRDGeneral.so.1
> >>> (0x00002aaaab1fb000)
> >>> libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00002aaaab423000)
> >>> libstdc++.so.6 =>
> >>> /trinity/shared/apps/custom/x86_64/gcc-8.1.0/lib64/libstdc++.so.6
> >>> (0x00002aaaab640000)
> >>> libm.so.6 => /usr/lib64/libm.so.6 (0x00002aaaab9c4000)
> >>> libgcc_s.so.1 =>
> >>> /trinity/shared/apps/custom/x86_64/gcc-8.1.0/lib64/libgcc_s.so.1
> >>> (0x00002aaaabcc6000)
> >>> libc.so.6 => /usr/lib64/libc.so.6 (0x00002aaaabedf000)
> >>> librt.so.1 => /usr/lib64/librt.so.1 (0x00002aaaac2a2000)
> >>> libdl.so.2 => /usr/lib64/libdl.so.2 (0x00002aaaac4aa000)
> >>> libutil.so.1 => /usr/lib64/libutil.so.1 (0x00002aaaac6af000)
> >>> /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
> >>>
> >>> As I said, I have tried many different tricks and suggestions that
> >>> I was able to find in the forum but none of them effectively
> >>> solved my problem to get the code working. So I would like to ask
> >>> you if someone has faced a similar problem and may already have
> >>> some tips on how to fix it. I will really appreciate any help you
> >>> can provide on this issue.
> >>>
> >>> Thanks!
> >>>
> >>> Max Pinheiro Jr
> >>>
> >>> _______________________________________________
> >>> Rdkit-discuss mailing list
> >>> Rdkit-discuss@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
> > _______________________________________________
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to