https://cta-redmine.irap.omp.eu/https://cta-redmine.irap.omp.eu/favicon.ico?14312453732020-09-03T16:01:02ZCTA IRAP Project GatewayGammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145482020-09-03T16:01:02ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul><li><strong>Assigned To</strong> set to <i>Knödlseder Jürgen</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Urgent</i></li></ul><p>I have so far not tested GammaLib on Python 3.8. I will check as soon as possible and let you know my findings. For sure, GammaLib and ctools works with Python 3.7.</p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145492020-09-03T16:09:21ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul></ul><p>Just as an additional comment: at the step where you have problems, I think the code just checks whether the header files actually exist. Have you checked that you can actually read the file<br /><pre>
/usr/include/python3.8/Python.h
</pre></p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145522020-09-04T12:18:44ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul><li><strong>Tracker</strong> changed from <i>Support</i> to <i>Bug</i></li><li><strong>Target version</strong> set to <i>1.7.1</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>10</i></li></ul><p>I was able to reproduce your problem. So for the time being you have to downgrade your Python version to 3.7, sorry for that.</p>
<p>Here is the error that occurs in <code>config.log</code> (I suppose you seem something similar):<br /><pre>
configure:16410: checking /home/jenkins/python/python385/include/python3.8/Python.h usability
configure:16410: g++ -c -g -O2 -fopenmp -I/home/jenkins/cfitsio/cfitsio3310/include -I/home/jenkins/ncurses/ncurses59/include/ncurses -I/home/jenkins/readline/readline62/include conftest.cpp >&5
In file included from /home/jenkins/python/python385/include/python3.8/pystate.h:129:0,
from /home/jenkins/python/python385/include/python3.8/genobject.h:11,
from /home/jenkins/python/python385/include/python3.8/Python.h:121,
from conftest.cpp:63:
/home/jenkins/python/python385/include/python3.8/cpython/pystate.h:9:32: fatal error: cpython/initconfig.h: No such file or directory
#include "cpython/initconfig.h"
^
compilation terminated.
configure:16410: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "gammalib"
| #define PACKAGE_TARNAME "gammalib"
| #define PACKAGE_VERSION "1.8.0.dev"
| #define PACKAGE_STRING "gammalib 1.8.0.dev"
| #define PACKAGE_BUGREPORT "jurgen.knodlseder@irap.omp.eu"
| #define PACKAGE_URL ""
| #define PACKAGE "gammalib"
| #define VERSION "1.8.0.dev"
| #define PACKAGE_PREFIX "/home/jenkins/jenkins/install/python/python385/gammalib"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define G_NAN_CHECK 1
| #define G_RANGE_CHECK 1
| #define G_SMALL_MEMORY 1
| #define G_LEGACY_XML_FORMAT 1
| #define G_WARNINGS 1
| #define HAVE_OPENMP 1
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include </home/jenkins/python/python385/include/python3.8/Python.h>
configure:16410: result: no
configure:16410: checking /home/jenkins/python/python385/include/python3.8/Python.h presence
configure:16410: g++ -E -I/home/jenkins/cfitsio/cfitsio3310/include -I/home/jenkins/ncurses/ncurses59/include/ncurses -I/home/jenkins/readline/readline62/include conftest.cpp
In file included from /home/jenkins/python/python385/include/python3.8/pystate.h:129:0,
from /home/jenkins/python/python385/include/python3.8/genobject.h:11,
from /home/jenkins/python/python385/include/python3.8/Python.h:121,
from conftest.cpp:30:
/home/jenkins/python/python385/include/python3.8/cpython/pystate.h:9:32: fatal error: cpython/initconfig.h: No such file or directory
#include "cpython/initconfig.h"
^
compilation terminated.
configure:16410: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "gammalib"
| #define PACKAGE_TARNAME "gammalib"
| #define PACKAGE_VERSION "1.8.0.dev"
| #define PACKAGE_STRING "gammalib 1.8.0.dev"
| #define PACKAGE_BUGREPORT "jurgen.knodlseder@irap.omp.eu"
| #define PACKAGE_URL ""
| #define PACKAGE "gammalib"
| #define VERSION "1.8.0.dev"
| #define PACKAGE_PREFIX "/home/jenkins/jenkins/install/python/python385/gammalib"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define G_NAN_CHECK 1
| #define G_RANGE_CHECK 1
| #define G_SMALL_MEMORY 1
| #define G_LEGACY_XML_FORMAT 1
| #define G_WARNINGS 1
| #define HAVE_OPENMP 1
| /* end confdefs.h. */
| #include </home/jenkins/python/python385/include/python3.8/Python.h>
configure:16410: result: no
configure:16410: checking for /home/jenkins/python/python385/include/python3.8/Python.h
configure:16410: result: no
</pre>Here the issue is that <code>#include "cpython/initconfig.h"</code> is not found.</p>
<p>I will investigate the issue.</p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145532020-09-04T12:25:34ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul><li><strong>% Done</strong> changed from <i>10</i> to <i>20</i></li></ul>Apparently, others also stumbled over this issue:
<ul>
<li><a class="external" href="https://bugs.python.org/issue39026">https://bugs.python.org/issue39026</a></li>
<li><a class="external" href="https://github.com/python/cpython/pull/20181">https://github.com/python/cpython/pull/20181</a></li>
</ul>
<p>This looks like a Python bug. I see if I can implement a fix for it.</p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145542020-09-04T12:43:37ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul></ul><p>Adding the Python include path to <code>configure.ac</code> as follows<br /><pre>
echo "*** CHECK FOR Python.h ***"
CPPFLAGS="$CPPFLAGS -I$python_path" <== ADDED
AC_CHECK_HEADERS($python_path/Python.h, [has_python_h="yes"], [has_python_h="no"])
echo "*** CHECK DONE ***"
</pre>solved the issue:<br /><pre>
*** CHECK FOR Python.h ***
checking /home/jenkins/python/python385/include/python3.8/Python.h usability... yes
checking /home/jenkins/python/python385/include/python3.8/Python.h presence... yes
checking for /home/jenkins/python/python385/include/python3.8/Python.h... yes
*** CHECK DONE ***
</pre></p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145552020-09-04T13:24:45ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>20</i> to <i>100</i></li></ul><p>I implemented the fix in the bugfix-1.7.1 branch. First tests are okay.</p>
<p>Rodriguez, can you try on your side if the change fixes your problems? If yes I will include the fix in the next 1.7.1 release. To make the check:<br /><pre>
$ git clone https://cta-gitlab.irap.omp.eu/gammalib/gammalib.git
$ cd gammalib
$ git checkout bugfix-1.7.1
$ ./autogen.sh
$ ./configure
</pre>and verify that the Python header files are found. By the way: I did the same fix on the <code>ctools</code> side. Change is also in the <code>bugfix-1.7.1</code> branch.</p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145562020-09-04T13:37:33ZRodriguez Fernandez Gonzalogrferna@roma2.infn.it
<ul></ul><p>Yes, now it is working!</p>
<p>Thanks!<br />Gonzalo</p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145582020-09-04T14:05:02ZRodriguez Fernandez Gonzalogrferna@roma2.infn.it
<ul></ul><p>by the way, <br />the same must be done with CTOOLS</p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145592020-09-04T20:00:45ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul></ul><p><a href="https://cta-redmine.irap.omp.eu/users/grod" class="user">Rodriguez Fernandez Gonzalo</a> wrote:</p>
<blockquote>
<p>by the way, <br />the same must be done with CTOOLS</p>
</blockquote>
<p>It’s already done for ctools. Can you please check using<br /><pre>
$ git clone https://cta-gitlab.irap.omp.eu/ctools/ctools.git
$ cd ctools
$ git checkout bugfix-1.7.1
$ ./autogen.sh
$ ./configure
</pre></p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145612020-09-07T08:16:51ZRodriguez Fernandez Gonzalogrferna@roma2.infn.it
<ul></ul><p>yes, it is also working for CTOOLS!</p>
<p>Gonzalo.</p> GammaLib - Bug #3329: Is gammalib 1.7.0 compatible with python 3.8?https://cta-redmine.irap.omp.eu/issues/3329?journal_id=145622020-09-07T09:29:09ZKnödlseder Jürgenjurgen.knodlseder@irap.omp.eu
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>Thanks, I close the issue now.</p>