python-build-standalone
python-build-standalone copied to clipboard
Problems building on linux
Hi,
building with linux on a Ubuntu 18.04 does not seem to work. Running ./build-linux.py leads to the following error:
Makefile:44: *** multiple target patterns. Stop.
Any ideas what is going wrong?
Best Johannes
I have the same problem
Make sure your user is allowed to run docker as non-root: https://docs.docker.com/engine/install/linux-postinstall/
I changed the codes in cpython-unix/Makefile and solved this problem.
# Always write out settings files.
placeholder_archive_makefiles:
$(RUN_BUILD) placeholder_archive makefiles
include $(OUTDIR)/Makefile.$(HOST_PLATFORM).$(TARGET_TRIPLE).$(PYBUILD_PYTHON_MAJOR_VERSION)
include $(OUTDIR)/versions/VERSION.*
# Always write out expanded Dockerfiles.
placeholder_archive_dockerfiles:
$(RUN_BUILD) placeholder_archive dockerfiles
I went into the same problem when building inside a docker container with root permission. While my last comment solved the problem multiple target patterns. Stop., a new problem occurs as No rule to make target '.../python-build-standalone/build/versions/VERSION.*
Then I rerun a Docker container on the host and map the Docker socket into the container docker run -it -v /var/run/docker.sock:/var/run/docker.sock your_image. This time ./build-linux.py works fine in the new container without modifying the codes in Makefile as my last comment.
I think the reason is that by mapping the Docker socket, Docker commands within the container can communicate with the Docker engine on the host, thereby achieving the purpose of running Docker containers inside the container.