0

我正在尝试为 RPi 4 构建 libtorrent 的静态 python 绑定。我编写了一个在 RPi 4 上工作的 Dockerfile(虽然非常慢)。但是,如果我尝试在 ubuntuqemu-user-static或 Windows 10上构建相同的 Dockerfile Docker 桌面我收到此错误

Step 25/26 : RUN b2 -j1 libtorrent-link=static boost-link=static stage_module
 ---> Running in be922d0723d7
/root/boost_1_74_0/tools/build/src/build/type.jam:158: in type.validate from module type
error: Unknown target type EXE
(builtin):-1: in sequence.transform from module sequence
/root/boost_1_74_0/tools/build/src/build/generators.jam:239: in generator.__init__ from module object(installed-exe-generator)@4
/root/boost_1_74_0/tools/build/src/tools/stage.jam:568: in class@installed-exe-generator.__init__ from module object(installed-exe-generator)@4
/root/boost_1_74_0/tools/build/src/kernel/class.jam:90: in new from module class
/root/boost_1_74_0/tools/build/src/tools/stage.jam:596: in load from module stage
/root/boost_1_74_0/tools/build/src/kernel/modules.jam:295: in import from module modules
/root/boost_1_74_0/tools/build/src/tools/builtin.jam:27: in load from module builtin
/root/boost_1_74_0/tools/build/src/kernel/modules.jam:295: in import from module modules
/root/boost_1_74_0/tools/build/src/build-system.jam:12: in load from module build-system
/root/boost_1_74_0/tools/build/src/kernel/modules.jam:295: in import from module modules
/root/boost_1_74_0/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
/root/boost_1_74_0/tools/build/boost-build.jam:8: in module scope from module

The command '/bin/sh -c b2 -j1 libtorrent-link=static boost-link=static stage_module' returned a non-zero code: 1

这是我正在使用的 Dockerfile

FROM arm32v7/ubuntu:latest

# this part so that tzdata does not ask for user input during the building process
ENV TZ=Europe/Kiev
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR /root
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y build-essential git wget python3.6 python3.6-dev libpython3.6-dev
RUN wget --no-check-certificate https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.gz
RUN git clone --recurse-submodules https://github.com/arvidn/libtorrent.git
ENV CPLUS_INCLUDE_PATH="${CPLUS_INCLUDE_PATH}:/usr/include/python3.6m"
RUN tar -xzf boost_1_74_0.tar.gz
WORKDIR /root/boost_1_74_0/tools/build
RUN ./bootstrap.sh
RUN cp src/engine/b2 /usr/local/bin/b2
ENV BOOST_ROOT=/root/boost_1_74_0/
ENV BOOST_BUILD_PATH=/root/boost_1_74_0/tools/build/
WORKDIR /root
RUN echo "using gcc : : : <cxxflags>-std=c++14 ;" > user-config.jam
RUN echo "using python : 3.6 : /usr/bin/python3.6 ;" >> user-config.jam
WORKDIR /root/libtorrent
RUN git checkout RC_1_2
WORKDIR /root/libtorrent/bindings/python
RUN b2 -j1 libtorrent-link=static boost-link=static stage_module
4

0 回答 0