[New-bugs-announce] [issue47232] Difficulties building tip of tree Python for emscripten
Hood Chatham
report at bugs.python.org
Tue Apr 5 15:27:14 EDT 2022
New submission from Hood Chatham <roberthoodchatham at gmail.com>:
I am trying to build tot Python for Emscripten to test recent changes and having trouble. The problem is caused by recent changes since 3.11.0a6 to `sre`. I build a build Python 3.11 from tot, and provided it to `./configure --with-build-python=$(HOSTBUILDDIR)/python`. However, I still see invocations to the system Python 3.11 at `/usr/local/bin/python3.11`.
The problem seems to be that the generated `Makefile` has a bunch of stuff collapsed into one line:
```
PYTHON_FOR_BUILD=_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) /src/cpython/build/Python-3.11.0dev0/builddir/build-host/python
```
manually fixing this to:
```
PYTHON_FOR_BUILD=/src/cpython/build/Python-3.11.0dev0/builddir/build-host/python
_PYTHON_PROJECT_BASE=$(abs_builddir)
_PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM)
PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH)
```
fixes the problem.
My configure invocation is as follows:
```
( \
cd $(BUILDDIR); \
CONFIG_SITE=./config.site-wasm32-emscripten emconfigure \
../../configure \
--cache-file=$(ROOT)/python.config.cache \
CFLAGS="${PYTHON_CFLAGS}" \
CPPFLAGS="-I$(SQLITEBUILD) -I$(BZIP2BUILD) -I$(ZLIBBUILD)" \
PLATFORM_TRIPLET="$(PLATFORM_TRIPLET)" \
--with-build-python=$(HOSTBUILDDIR)/python \
--without-pymalloc \
--disable-shared \
--disable-ipv6 \
--enable-big-digits=30 \
--enable-optimizations \
--host=wasm32-unknown-emscripten\
--build=$(shell $(EXTRACTDIR)/config.guess) \
--prefix=$(INSTALL) \
)
```
----------
messages: 416807
nosy: christian.heimes, hoodchatham
priority: normal
severity: normal
status: open
title: Difficulties building tip of tree Python for emscripten
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47232>
_______________________________________
More information about the New-bugs-announce
mailing list