This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, hoodchatham, pmpp
Date 2022-04-05.21:57:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1649195851.8.0.574251790609.issue47232@roundup.psfhosted.org>
In-reply-to
Content
You are building a cross-build with "--with-build-python=/usr/local/bin/python3.11". Is the interpreter up to date?

During alpha and beta phase, the build Python interpreter should be built from the exact same git commit as the sources in "../..". If the interpreter deviates from the sources in your srcdir, then Python byte code (.pyc), frozen byte code, and re engine can have mismatching magic.

I recommend that you build inside an environment that does not have Python 3.11 installed. Instead build a build Python interpreter from the same checkout that you later use for cross-compilation. "./configure && make" is sufficient. You don't have to install the build interpreter. "--with-build-python=$(pwd)/../build/python" works fine.

We use this approach in python-wasm:

mkdir -p cpython/builddir/build
pushd cpython/builddir/build
../../configure -C
make -j$(nproc)
popd

mkdir -p cpython/builddir/emscripten-browser
pushd cpython/builddir/emscripten-browser
CONFIG_SITE=../../Tools/wasm/config.site-wasm32-emscripten \
  emconfigure ../../configure -C \
    --host=wasm32-unknown-emscripten \
    --build=$(../../config.guess) \
    --with-build-python=$(pwd)/../build/python
emmake make -j$(nproc)


It's going to get easier and less painful as soon as we reach beta phase. During beta the byte code will only change when it is required for a bug fix.
History
Date User Action Args
2022-04-05 21:57:31christian.heimessetrecipients: + christian.heimes, pmpp, hoodchatham
2022-04-05 21:57:31christian.heimessetmessageid: <1649195851.8.0.574251790609.issue47232@roundup.psfhosted.org>
2022-04-05 21:57:31christian.heimeslinkissue47232 messages
2022-04-05 21:57:31christian.heimescreate