easybuilders / easybuild-easyconfigs

A collection of easyconfig files that describe which software to build using which build options with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
380 stars 703 forks source link

Tkinter/3.7.2-intel-2018a-Python-3.7.2 fails: no-framework (?) #9517

Open moravveji opened 4 years ago

moravveji commented 4 years ago

Hi

Following the issue #9487, I am building Tkinter/3.7.2-intel-2018a-Python-3.7.2. However, I get the following error message which is difficult for me to decipher. Would you please elaborate

== testing... == installing... == FAILED: Installation ended unsuccessfully (build directory: /dev/easybuild/Tkinter/3.7.2/intel-2018a-Python-3.7.2): build failed (first 300 chars): cmd " make install " exited with exit code 2 and output: Creating directory /MyApps/2018a/software/Tkinter/3.7.2-intel-2018a-Python-3.7.2/bin Creating directory /MyApps/2018a/software/Tkinter/3.7.2-intel-2018a-Python-3.7.2/lib if test "no-framework" = "no-framework" ; then

The bin and lib folders are already created and populated with few files. I have attached the debug logs and the .eb file.

Kr Ehsan logs.tar.gz

moravveji commented 4 years ago

up!

boegel commented 4 years ago

@moravveji The log shows the real issue:

ModuleNotFoundError: No module named '_ctypes'

That looks like it might be a problem with the Python installation you're building on top of?

Does import _ctypes work with the Python/3.7.2-intel-2018a module?

moravveji commented 4 years ago

Thanks Kenneth for your response. Indeed, I can import the _ctypes module, manually:

$ module load Python/3.7.2-intel-2018a
$ python
Python 3.7.2 (default, Aug 12 2019, 09:19:00)
[GCC Intel(R) C++ gcc 6.4 mode] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ctypes
>>>
boegel commented 4 years ago

@moravveji I think this explains the problem:

INFO: Can't locate Tcl/Tk libs and/or headers
INFO: Could not locate ffi libs and/or headers

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2                  _curses               _curses_panel
_sqlite3              _tkinter              readline
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc                  atexit                pwd
time

Failed to build these modules:
_ctypes

Does Python load libffi? Also, it's not clear to me why the Tcl/Tk headers are not being found.

We're not seeing this problem with the Tkinter easyconfig files we have in the central repository...

moravveji commented 4 years ago

Best wishes for 2020!

I just tried loading cffi, and it seems like working. Is this what you exactly asked?

x0090231@r19i03n2:~$ python
Python 3.7.2 (default, Aug 12 2019, 09:19:00)
[GCC Intel(R) C++ gcc 6.4 mode] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cffi
>>>

W.r.t. the Tcl library path, I see that Tcl/8.6.8-GCCcore-6.4.0/lib is added to the LD_LIBRARY_PATH (in the debug logs). Further on, Tcl/8.6.8-GCCcore-6.4.0/include is also added to CPATH. Then in the configure line:

./configure --prefix=/myApps/software/Tkinter/3.7.2-intel-2018a-Python-3.7.2 --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu  --with-threads --enable-shared  --enable-unicode=ucs2  --with-tcltk-includes='-I/myApps/software/Tcl/8.6.8-GCCcore-6.4.0/include -I/myApps/software/Tk/8.6.8-GCCcore-6.4.0/include'  --with-tcltk-libs='-L/myApps/software/Tcl/8.6.8-GCCcore-6.4.0/lib -L/myApps/software/Tk/8.6.8-GCCcore-6.4.0/lib -ltcl8.6 -ltk8.6'

Then, the configure says:

checking for --with-tcltk-includes... -I/myApps/software/Tcl/8.6.8-GCCcore-6.4.0/include -I/myApps/software/Tk/8.6.8-GCCcore-6.4.0/include
checking for --with-tcltk-libs... -L/myApps/software/Tcl/8.6.8-GCCcore-6.4.0/lib -L/myApps/software/Tk/8.6.8-GCCcore-6.4.0/lib -ltcl8.6 -ltk8.6

So, the paths to Tk lib and include folders are properly set, but I also do not understand why they are not found.

In fact, all this is needed to fulfill the dependencies for the latest DOLFIN/2019.1.0. Do you have an "ultimate" solution to built the whole lot with --robot?

boegel commented 4 years ago

@moravveji The cffi in the Python installation is fine (as expected, otherwise the Python installations wouldn't have completed).

You'll need to figure out why the configure command is failing to locale the Tcl/Tk & ffi libs and/or headers, since that's what's causing the problem you are seeing.

There's no magic solution to this, something is going wrong, and we'll need to figure out what first.

Are the paths mentioned in the checking for lines correct? Do those directories (still) include the header files and libraries? Perhaps the Tcl and/or Tk installations got corrupted?

boegel commented 4 years ago

Copying comments which were incorrectly posted in #9567 (they belong here):

by @boegel: @moravveji Based on https://bugs.python.org/issue31710, the issue could be that pkg-config is missing on your system, can you check that, and see if adding pkg-config as a build dependency in your Tkinter easyconfig fixes the problem you're seeing?

@by @moravveji Nice idea Kenneth. However, adding pkg-config/0.29.2-GCCcore-6.4.0 as a build dependency still does not resolve the issue, and gives the same error message. I have attached the new debug logs. Tkinter-logs.tar.gz

Did you check the libffi and Tcl/Tk installation directories? Do they still have header files and libraries installed, in the paths that appear in the log, i.e. in /myApps/software/Tk/8.6.8-GCCcore-6.4.0/include, etc.?

Also, it seems that libffi is not listed as a build dependency. It gets loaded as an indirect dependency (via Python), but that may not be enough (the toolchain build environment is slightly different if libffi is included as a direct (build) dependency.

Please try adding libffi as a direct build dependency...

boegel commented 4 years ago

Also, please check if your libffi installation has the patch included that was added in #6565, it looks like that may be related...