Building O2 fails during Python-modules on CentOs7

Dear experts,

I want to install O2 on CentOs7 but aliBuild fails during Python-modules.

I went through the online guide for installing alice software. Alidist and O2 are up-to-date, also aliBuild is brand new. It seems that Python will be picked up from the system but then it is not found for some reason.

The aliDoctor output and the python-modules latest log are in the cern box. My ~/.rootlogon.C is empty.

Thank you for your help!
Best,
Thomas

I think you are missing the python3-dev / python3-devel package. We should add it to the list of things to be installed…

Ok, thanks for your fast reply.
I have another question: If I force aliBuild to build Python 3.6.8 by itself, I get an error that _tkinter is missing while building Python 3.6.8.

Traceback (most recent call last):
File “<string>”, line 1, in
ModuleNotFoundError: No module named ‘_tkinter’

Do you think this results also from the missing packages?

Yes, python3-tk IIRC.

Hi again,

python3-tk is installed, as well as the python3-dev/devel package. The error is still there.
AliDoctor says that Python will be picked up from the system but then aliBuild still tries to build it by itself.

The error I get is the following:

DEBUG:O2:Python:0: ++ env PATH=/scratch8/tklemenz/AliSoftware/sw/INSTALLROOT/f6b90955fbc57c829f8a6f4a6c5341787398d4e0/slc7_x86-64/Python/v3.6.8-1/bin:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/sqlite/v3.15.0-1/bin:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/libpng/v1.6.34-1/bin:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/CMake/v3.13.1-1/bin:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/GCC-Toolchain/v7.3.0-alice1-1/bin:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/FreeType/v2.6-1/bin:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/autotools/v1.5.0-1/bin:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/defaults-release/v1-1/bin:/opt/rh/devtoolset-7/root/usr/bin:/home/ADS/gu74yub/user_python/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/software/cuda/current/bin:/home/software/scripts LD_LIBRARY_PATH=/scratch8/tklemenz/AliSoftware/sw/INSTALLROOT/f6b90955fbc57c829f8a6f4a6c5341787398d4e0/slc7_x86-64/Python/v3.6.8-1/lib:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/sqlite/v3.15.0-1/lib:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/libpng/v1.6.34-1/lib:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/CMake/v3.13.1-1/lib:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/GCC-Toolchain/v7.3.0-alice1-1/lib:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/GCC-Toolchain/v7.3.0-alice1-1/lib64:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/FreeType/v2.6-1/lib:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/autotools/v1.5.0-1/lib:/scratch8/tklemenz/AliSoftware/sw/slc7_x86-64/defaults-release/v1-1/lib:/usr/lib/:/usr/lib64/:/usr/libexec/:/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:/opt/rh/devtoolset-7/root/usr/lib64/dyninst:/opt/rh/devtoolset-7/root/usr/lib/dyninst:/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib::/home/software/cuda/current/lib64:/home/software/cuda/current/extras/CUPTI/lib64 PYTHONHOME=/scratch8/tklemenz/AliSoftware/sw/INSTALLROOT/f6b90955fbc57c829f8a6f4a6c5341787398d4e0/slc7_x86-64/Python/v3.6.8-1 python3 -c ‘import _tkinter’
DEBUG:O2:Python:0: Traceback (most recent call last):
DEBUG:O2:Python:0: File “<string>”, line 1, in
DEBUG:O2:Python:0: ModuleNotFoundError: No module named ‘_tkinter’

If I use the python3 from the system in the console and import tkinter to check if it is there, it is working. But the python that is built does for some reason not have tkinter.

The AliDoctor output and Python-latest.log are in the cernbox.

Best,
Thomas

Hi @eulisse,

is there a way to force aliBuild to pick up Python from the system?

Thanks,
Thomas

Yes, I am on holiday at the moment. If I manage I will write more as I have proper internet access.

Hi Giulio, this is just a friendly reminder.
All I need to know is where/how I can set the Python from the system to be picked up by aliBuild. There is a working Python 3.6.8 with the tkinter module but aliBuild does not pick it up.

Best,
Thomas

do you have tk-devel? Could you provide me the results of aliDoctor?

In fact we did not have the tk-devel package but installed it now. Finally Python 3.6.8 is compiled successfully. However now there is an error while building python-modules. I removed the sw folder and try compiling again. This sometimes helps. Maybe I will come back to you.

The output of the aliDoctor is here. I am wondering why aliDoctor still says that Python will be picked up from the system and then compiles it by itself but that does not seem to be a problem anymore.

Best,
Thomas

Sorry to bother you again but the new error still occurs while building python-modules. Alidist and O2 are up-to-date.

DEBUG:O2:Python-modules:0: In file included from src/ft2font.cpp:9:0:
DEBUG:O2:Python-modules:0: src/ft2font.h:16:1: error: expected declaration before ‘}’ token
DEBUG:O2:Python-modules:0: }
DEBUG:O2:Python-modules:0: ^
DEBUG:O2:Python-modules:0: error: command ‘gcc’ failed with exit status 1

The full log can be found here and the aliDoctor output can be found in the post above.

Thanks a lot,
Thomas

Any idea what the problem may be?

Any idea, @eulisse ?

What also may be interesting: Even if I install O2 and everything that comes with it from scratch according to the online documentation, I get warnings for every single module during the building process that look like this:

WARNING: Python-modules (7cddafc7b5d4ba38f6acbed99f436917fc7b8c24) not fetched: have you tried updating the recipes?

When I manually update alidist this does not go away. Maybe this has to do with the problem.

The latest python-modules.log is here and the aliDoctor output can be found here.

Thomas