python-build-standalone icon indicating copy to clipboard operation
python-build-standalone copied to clipboard

Problems building on linux

Open drever opened this issue 4 years ago • 4 comments

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

drever avatar Oct 29 '21 15:10 drever

I have the same problem

janus1345 avatar Dec 16 '21 02:12 janus1345

Make sure your user is allowed to run docker as non-root: https://docs.docker.com/engine/install/linux-postinstall/

kersson avatar Jan 26 '22 23:01 kersson

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

Shaoting-Feng avatar Jan 16 '24 02:01 Shaoting-Feng

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.

Shaoting-Feng avatar Jan 16 '24 04:01 Shaoting-Feng