mirror of
https://github.com/bensuperpc/dockcross.git
synced 2026-07-26 04:48:08 +02:00
Remove copy_libstd.sh workaround from manylinux_2_34-aarch64
The libstdc++ copy trick is no longer needed, as noted in PR #931 which removed it for manylinux2014-aarch64.
This commit is contained in:
@@ -209,10 +209,6 @@ manylinux_2_28-aarch64.test: manylinux_2_28-aarch64
|
|||||||
# manylinux_2_34-aarch64
|
# manylinux_2_34-aarch64
|
||||||
#
|
#
|
||||||
manylinux_2_34-aarch64: manylinux_2_34-aarch64/Dockerfile manylinux_2_34-x64
|
manylinux_2_34-aarch64: manylinux_2_34-aarch64/Dockerfile manylinux_2_34-x64
|
||||||
@# Register qemu
|
|
||||||
docker run --rm --privileged hypriot/qemu-register
|
|
||||||
@# Get libstdc++ from quay.io/pypa/manylinux_2_34_aarch64 container
|
|
||||||
docker run -v `pwd`:/host --rm -e LIB_PATH=/host/$@/xc_script/ quay.io/pypa/manylinux_2_34_aarch64 bash -c "PASS=1 /host/$@/xc_script/docker_setup_scripts/copy_libstd.sh"
|
|
||||||
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
mkdir -p $@/imagefiles && cp -r imagefiles $@/
|
||||||
$(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:$(TAG) \
|
$(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:$(TAG) \
|
||||||
$(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:latest \
|
$(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:latest \
|
||||||
@@ -223,8 +219,6 @@ manylinux_2_34-aarch64: manylinux_2_34-aarch64/Dockerfile manylinux_2_34-x64
|
|||||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
-f manylinux_2_34-aarch64/Dockerfile .
|
-f manylinux_2_34-aarch64/Dockerfile .
|
||||||
rm -rf $@/imagefiles
|
rm -rf $@/imagefiles
|
||||||
@# libstdc++ is copied into image, now remove it
|
|
||||||
docker run -v `pwd`:/host --rm quay.io/pypa/manylinux_2_34_aarch64 bash -c "rm -rf /host/$@/xc_script/usr"
|
|
||||||
|
|
||||||
manylinux_2_34-aarch64.test: manylinux_2_34-aarch64
|
manylinux_2_34-aarch64.test: manylinux_2_34-aarch64
|
||||||
$(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_34-aarch64:latest > $(BIN)/dockcross-manylinux_2_34-aarch64 \
|
$(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_34-aarch64:latest > $(BIN)/dockcross-manylinux_2_34-aarch64 \
|
||||||
|
|||||||
@@ -27,9 +27,8 @@ ENV CROSS_TRIPLE=aarch64-unknown-linux-gnu
|
|||||||
ENV CROSS_ROOT=${XCC_PREFIX}/${CROSS_TRIPLE}
|
ENV CROSS_ROOT=${XCC_PREFIX}/${CROSS_TRIPLE}
|
||||||
ENV PATH=${PATH}:${CROSS_ROOT}/bin
|
ENV PATH=${PATH}:${CROSS_ROOT}/bin
|
||||||
|
|
||||||
# Running scripts to cross compile python and copy libstdc++ into toolchain
|
# Running scripts to cross compile python
|
||||||
ADD manylinux_2_34-aarch64/xc_script /tmp/
|
ADD manylinux_2_34-aarch64/xc_script /tmp/
|
||||||
RUN PASS=2 /tmp/docker_setup_scripts/copy_libstd.sh
|
|
||||||
RUN /tmp/docker_setup_scripts/prepare_cross_env.sh
|
RUN /tmp/docker_setup_scripts/prepare_cross_env.sh
|
||||||
RUN rm -rf /tmp/docker_setup_scripts
|
RUN rm -rf /tmp/docker_setup_scripts
|
||||||
RUN rm -rf /tmp/usr/
|
RUN rm -rf /tmp/usr/
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# AUTHOR: odidev
|
|
||||||
# DATE: 2021-07-20
|
|
||||||
# DESCRIPTION: This file is invoked two times. first time from Makefile with
|
|
||||||
# PASS == 1 and second time in Dockerfile.in with PASS == 2. In
|
|
||||||
# dockcross container, the current libstdc++ is not the same as
|
|
||||||
# in manylinux containers. So, copying the libstdc++ form manylinux
|
|
||||||
# container to dockcross container. It is being done int 2 pass.
|
|
||||||
# during PASS == 1, the script will copy libstdc++ from manylinux
|
|
||||||
# container to build machine and then during PASS == 2, libstdc++
|
|
||||||
# will be copied from build machine to dockcross container
|
|
||||||
|
|
||||||
if [ $PASS == 1 ]; then
|
|
||||||
echo "library location on host: " ${LIB_PATH}
|
|
||||||
echo "PASS 1: copying libstdc++ library on host"
|
|
||||||
files=$(rpm -ql libstdc++)
|
|
||||||
for file in ${files}; do
|
|
||||||
if [ -f ${file} -a ! -L ${file} -a ! -d ${file} ]; then
|
|
||||||
if grep -q "shared object" <<< $(file $file); then
|
|
||||||
install -m 0644 -D ${file} "${LIB_PATH}${file}"
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "Done"
|
|
||||||
elif [ $PASS == 2 ]; then
|
|
||||||
echo "PASS 2: copying libstdc++ library in docker image"
|
|
||||||
old_libstdc_path=$(find /usr/xcc/ -name libstdc++.so*[0-9] -type f)
|
|
||||||
old_libstdc_directory=$(dirname "${old_libstdc_path}")
|
|
||||||
target_libstdc_path=$(find /tmp -name libstdc++.so*[0-9] -type f)
|
|
||||||
target_libstdc_filename=$(basename "${target_libstdc_path}")
|
|
||||||
target_libstdc_new_path=${old_libstdc_directory}/${target_libstdc_filename}
|
|
||||||
install -m 0555 -D ${target_libstdc_path} ${target_libstdc_new_path}
|
|
||||||
echo "Done"
|
|
||||||
links=$(find /usr/xcc/ \( -name libstdc++.so*[{0-9}] -o -name libstdc++.so \) -type l)
|
|
||||||
echo "Creating soft links for target libstdc++ library"
|
|
||||||
for link in ${links}; do
|
|
||||||
case "$link" in
|
|
||||||
(*libstdc++.so*[{0-9}].[{0-9}].[{0-9}]*)
|
|
||||||
target_libstdc_filename=$(basename "${target_libstdc_new_path}")
|
|
||||||
libstdc_link_directory=$(dirname "${link}")
|
|
||||||
rm -rf $link
|
|
||||||
target_libstdc_link_path=${libstdc_link_directory}/${target_libstdc_filename}
|
|
||||||
ln -sf ${target_libstdc_new_path} ${target_libstdc_link_path}
|
|
||||||
;;
|
|
||||||
(*)
|
|
||||||
ln -sf ${target_libstdc_new_path} ${link}
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
echo "Done"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user