compile with python 3.13t (nogil)

Ouverte
#458 6 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
cpp, python
Domaine
build-system

Piste de recherche

Commencez par les commandes signalées ./bootstrap.sh et ./b2 et inspectez les chemins d’inclusion générés dans la sortie du compilateur. Vérifiez la présence de pyconfig.h dans boost/python/detail/wrap_python.hpp et dans le répertoire d’inclusion de Python 3.13t ; c’est terminé lorsque Boost.Python se compile correctement avec l’installation Python avec free-threading.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

I have installed free-threading python 3.13 following https://py-free-threading.github.io/installing_cpython/ on ubuntu 22.04(with gcc 11.04.0), with command:

conda create -n nogil --override-channels -c conda-forge python-freethreading

But compile python 3.13t with boost-1.86.0 failed, below the steps:

1, configure boost successfully:
./bootstrap.sh --with-python=/home/mydesktop/anaconda3/envs/nogil

2, compile boost failed:
./b2 --toolset=gcc --with-python include="/home/mydesktop/anaconda3/envs/nogil/include/python3.13t/" --with-thread --with-date_time --with-chrono --with-system
3, error message:

`gcc.compile.c++ bin.v2/libs/python/build/gcc-11/release/x86_64/link-static/python-3.13/threading-multi/visibility-hidden/dict.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/dict.hpp:8,
                 from libs/python/src/dict.cpp:4:
./boost/python/detail/wrap_python.hpp:57:11: fatal error: pyconfig.h: No such file or directory
   57 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

    "g++"   -fvisibility-inlines-hidden -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG   -I"." -I"/home/subaochen/anaconda3/envs/nogil/include/python3.13" -I"/home/subaochen/anaconda3/envs/nogil/include/python3.1t"  -c -o "bin.v2/libs/python/build/gcc-11/release/x86_64/link-static/python-3.13/threading-multi/visibility-hidden/dict.o" "libs/python/src/dict.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-11/release/x86_64/link-static/python-3.13/threading-multi/visibility-hidden/dict.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-11/release/x86_64/link-static/python-3.13/threading-multi/visibility-hidden/str.o
In file included from ./boost/python/detail/prefix.hpp:13,
                 from ./boost/python/str.hpp:8,
                 from libs/python/src/str.cpp:4:
./boost/python/detail/wrap_python.hpp:57:11: fatal error: pyconfig.h: No such file or directory
   57 | # include <pyconfig.h>
      |           ^~~~~~~~~~~~
compilation terminated.

Obviously I missed "pyconfig.h", but i successfully compiled boost 1.86 with python 3.11 with the same step. Any suggestions? Thanks in advance!

Langage dominant
C++
Étoiles
537
Forks
223
Merge moyen
11 h 22 min
PR mergées (30 j)
2

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de boostorg/python

Toutes les issues de boostorg/python

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.