Switch RK3576 toolchain to Buildroot SDK and migrate to Python 3.10
This commit is contained in:
+6
-11
@@ -63,7 +63,7 @@ RUN wget https://archives.boost.io/release/1.83.0/source/boost_1_83_0.tar.gz
|
||||
RUN tar -zxf boost_1_83_0.tar.gz \
|
||||
&& cd boost_1_83_0 \
|
||||
&& ./bootstrap.sh --prefix=${TARGET_SYSROOT} --without-libraries=python \
|
||||
&& sed -i "/using gcc/c using gcc : arm64 : aarch64-buildroot-linux-gnu-gcc ;" project-config.jam \
|
||||
&& sed -i "/using gcc/c using gcc : arm64 : ${CC} ;" project-config.jam \
|
||||
&& ./b2 cxxflags="-fPIC" cflags="-fPIC" link=static install
|
||||
|
||||
FROM ${CC_PLATFORM_IMAGE} AS pcl_vendor
|
||||
@@ -106,7 +106,7 @@ FROM ${CC_PLATFORM_IMAGE} AS ffi_builder
|
||||
RUN git clone --depth=1 https://github.com/libffi/libffi.git \
|
||||
&& cd libffi \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure --host=aarch64-none-linux-gnu --build=x86_64-linux-gnu --disable-docs --prefix=${TARGET_SYSROOT} \
|
||||
&& ./configure --host=${HOSTARCH} --build=x86_64-linux-gnu --disable-docs --prefix=${TARGET_SYSROOT} \
|
||||
&& make -j$(nproc) && make install
|
||||
|
||||
# Python 3.12
|
||||
@@ -125,12 +125,6 @@ RUN wget https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tar.xz \
|
||||
|
||||
# 配置和编译 Python
|
||||
WORKDIR /tmp/Python-3.10.12
|
||||
ENV CC=aarch64-none-linux-gnu-gcc \
|
||||
CXX=aarch64-none-linux-gnu-g++ \
|
||||
AR=aarch64-none-linux-gnu-ar \
|
||||
RANLIB=aarch64-none-linux-gnu-ranlib \
|
||||
HOSTARCH=aarch64-none-linux-gnu \
|
||||
BUILDARCH=x86_64-linux-gnu
|
||||
|
||||
ENV CPPFLAGS="-I${TARGET_SYSROOT}/include" \
|
||||
LDFLAGS="-L${TARGET_SYSROOT}/lib -Wl,-rpath-link=${TARGET_SYSROOT}/lib" \
|
||||
@@ -140,7 +134,7 @@ ENV CPPFLAGS="-I${TARGET_SYSROOT}/include" \
|
||||
PKG_CONFIG_SYSROOT_DIR="${TARGET_SYSROOT}"
|
||||
|
||||
RUN ./configure \
|
||||
--host=aarch64-none-linux-gnu \
|
||||
--host=${HOSTARCH} \
|
||||
--build=x86_64-linux-gnu \
|
||||
--prefix=${TARGET_SYSROOT} \
|
||||
--disable-ipv6 \
|
||||
@@ -177,12 +171,12 @@ RUN pip download --no-deps -d /wheels \
|
||||
RUN pip download \
|
||||
--no-deps \
|
||||
--only-binary=:all: \
|
||||
--python-version 311 \
|
||||
--python-version 310 \
|
||||
--implementation cp \
|
||||
--abi cp310 \
|
||||
--platform manylinux2014_aarch64 \
|
||||
-d /wheels \
|
||||
psutil
|
||||
psutil numpy==1.21.5
|
||||
|
||||
RUN chmod +x /tmp/extract_wheels.sh && \
|
||||
/tmp/extract_wheels.sh "${PYTHON_PKG_PATH}" /wheels
|
||||
@@ -193,4 +187,5 @@ COPY --from=system_packages ${TARGET_SYSROOT} ${TARGET_SYSROOT}
|
||||
COPY --from=ceres_vendor ${TARGET_SYSROOT} ${TARGET_SYSROOT}
|
||||
COPY --from=opencv_vendor ${TARGET_SYSROOT} ${TARGET_SYSROOT}
|
||||
COPY --from=pcl_vendor ${TARGET_SYSROOT} ${TARGET_SYSROOT}
|
||||
COPY --from=python_builder ${TARGET_SYSROOT} ${TARGET_SYSROOT}
|
||||
COPY --from=python_pkg_builder ${TARGET_SYSROOT} ${TARGET_SYSROOT}
|
||||
|
||||
Reference in New Issue
Block a user