mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-15 07:21:33 +01:00
Update to CMake 3.20.2, add OpenCV and Boost libs (WIP), force to build 64bit on 64bit platforms...
This commit is contained in:
parent
5906aae649
commit
d7bfc657f5
3
Makefile
3
Makefile
@ -22,7 +22,7 @@ GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES))
|
||||
# These images are expected to have explicit rules for *both* build and testing
|
||||
NON_STANDARD_IMAGES = web-wasm manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64
|
||||
|
||||
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross common.label-and-env
|
||||
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross common.lib common.label-and-env
|
||||
|
||||
# This list all available images
|
||||
IMAGES = $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES)
|
||||
@ -69,6 +69,7 @@ $(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOS
|
||||
-e '/common-manylinux.crosstool/ r common-manylinux.crosstool' \
|
||||
-e '/common.windows/ r common.windows' \
|
||||
-e '/common.dockcross/ r common.dockcross' \
|
||||
-e '/common.lib/ r common.lib' \
|
||||
-e '/common.label-and-env/ r common.label-and-env' \
|
||||
$< > $@
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
WORKDIR /usr/src
|
||||
|
||||
ARG GIT_VERSION=2.31.1
|
||||
ARG CMAKE_VERSION=3.17.1
|
||||
ARG CMAKE_VERSION=3.20.2
|
||||
# Version from official repos
|
||||
ARG CMAKE_VERSION_OFF=3.20.2
|
||||
|
||||
|
36
common.lib
Normal file
36
common.lib
Normal file
@ -0,0 +1,36 @@
|
||||
# Libraries scripts
|
||||
|
||||
# Boost lib
|
||||
RUN cd /tmp/ && git clone https://github.com/boostorg/boost.git && cd boost && git checkout boost-1.76.0 && git submodule update --init && \
|
||||
cd /tmp/boost/ && ./bootstrap.sh --without-libraries=mpi,python,regex,iostreams && \
|
||||
cd /tmp/boost/ && echo "using gcc : 8.4 : ${CXX} ; " >> tools/build/src/user-config.jam && \
|
||||
cd /tmp/boost/ && ./b2 install --toolset=gcc-8.4 --prefix=/usr/local/boost threading=multi link=static && \
|
||||
rm -rf /tmp/boost/
|
||||
|
||||
# OpenCV lib
|
||||
RUN cd /tmp/ && git clone https://github.com/opencv/opencv.git && git clone https://github.com/opencv/opencv_contrib.git && \
|
||||
cd /tmp/ && git -C opencv checkout 4.5.2 && git -C opencv_contrib checkout 4.5.2 && \
|
||||
cd /tmp/opencv/ && mkdir -p build && cmake -Bbuild -H. \
|
||||
-GNinja \
|
||||
-D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
|
||||
-D CMAKE_BUILD_TYPE=RELEASE \
|
||||
-D OPENCV_ENABLE_NONFREE=ON \
|
||||
-D WITH_V4L=OFF \
|
||||
-D WITH_QT=OFF \
|
||||
-D WITH_OPENGL=OFF \
|
||||
-D WITH_FFMPEG=OFF \
|
||||
-D BUILD_EXAMPLES=ON \
|
||||
-D BUILD_DOCS=ON \
|
||||
-D BUILD_PERF_TESTS=OFF \
|
||||
-D BUILD_TESTS=ON \
|
||||
-D BUILD_NEW_PYTHON_SUPPORT=OFF \
|
||||
-D BUILD_opencv_python3=OFF \
|
||||
-D HAVE_opencv_python3=OFF \
|
||||
-D PYTHON_DEFAULT_EXECUTABLE="" && \
|
||||
cd /tmp/opencv && ninja -Cbuild && \
|
||||
cd /tmp/opencv/build && \
|
||||
ninja install && \
|
||||
rm -rf /tmp/opencv/ && rm -rf /tmp/opencv_contrib
|
||||
|
||||
|
||||
|
@ -36,7 +36,10 @@ fi
|
||||
cd /usr/src
|
||||
|
||||
CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH}
|
||||
url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz
|
||||
#Change the url when there is a new version (Currently 3.17.1 of April 2020)
|
||||
#url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz
|
||||
url=https://github.com/bensuperpc/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz
|
||||
|
||||
echo "Downloading $url"
|
||||
curl -# -LO $url
|
||||
|
||||
|
@ -23,7 +23,6 @@ cd /tmp
|
||||
# Todo: Need to update base image from Debian Stretch for the required Python
|
||||
# 3.6 or later
|
||||
curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py
|
||||
#curl -# -LO https://bootstrap.pypa.io/pip/2.7/get-pip.py
|
||||
${PYTHON} get-pip.py --ignore-installed
|
||||
rm get-pip.py
|
||||
|
||||
|
@ -167,7 +167,7 @@ CT_ARCH_LE=y
|
||||
CT_ARCH_ENDIAN="little"
|
||||
CT_ARCH_SUPPORTS_32=y
|
||||
CT_ARCH_SUPPORTS_64=y
|
||||
CT_ARCH_DEFAULT_32=y
|
||||
CT_ARCH_DEFAULT_64=y
|
||||
CT_ARCH_BITNESS=64
|
||||
# CT_ARCH_32 is not set
|
||||
CT_ARCH_64=y
|
||||
|
@ -167,7 +167,7 @@ CT_ARCH_LE=y
|
||||
CT_ARCH_ENDIAN="little"
|
||||
CT_ARCH_SUPPORTS_32=y
|
||||
CT_ARCH_SUPPORTS_64=y
|
||||
CT_ARCH_DEFAULT_32=y
|
||||
CT_ARCH_DEFAULT_64=y
|
||||
CT_ARCH_BITNESS=64
|
||||
# CT_ARCH_32 is not set
|
||||
CT_ARCH_64=y
|
||||
|
39
linux-mips64/Dockerfile.in.with_lib
Normal file
39
linux-mips64/Dockerfile.in.with_lib
Normal file
@ -0,0 +1,39 @@
|
||||
FROM dockcross/base:latest
|
||||
|
||||
# This is for 64-bit Little-Endian MIPS devices with hard floating point enabled
|
||||
|
||||
#include "common.crosstool"
|
||||
|
||||
# The cross-compiling emulator
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
qemu-user \
|
||||
qemu-user-static \
|
||||
&& apt-get clean --yes
|
||||
|
||||
# The CROSS_TRIPLE is a configured alias of the "mips64el-unknown-linux-gnu" target.
|
||||
ENV CROSS_TRIPLE mips64el-unknown-linux-gnu
|
||||
|
||||
ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}
|
||||
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
|
||||
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
|
||||
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
|
||||
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \
|
||||
LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld \
|
||||
FC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gfortran
|
||||
|
||||
ENV QEMU_LD_PREFIX "${CROSS_ROOT}/${CROSS_TRIPLE}/sysroot"
|
||||
ENV QEMU_SET_ENV "LD_LIBRARY_PATH=${CROSS_ROOT}/lib:${QEMU_LD_PREFIX}"
|
||||
|
||||
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
||||
|
||||
# Linux kernel cross compilation variables
|
||||
ENV PATH ${PATH}:${CROSS_ROOT}/bin
|
||||
ENV CROSS_COMPILE ${CROSS_TRIPLE}-
|
||||
ENV ARCH mips
|
||||
|
||||
#include "common.lib"
|
||||
|
||||
#include "common.label-and-env"
|
@ -143,7 +143,7 @@ CT_ARCH_MIPS_PKG_KSYM=""
|
||||
CT_ARCH_mips_o32=y
|
||||
# CT_ARCH_mips_n32 is not set
|
||||
# CT_ARCH_mips_n64 is not set
|
||||
CT_ARCH_mips_ABI="32"
|
||||
CT_ARCH_mips_ABI="64"
|
||||
CT_ALL_ARCH_CHOICES="ALPHA ARC ARM AVR M68K MICROBLAZE MIPS MOXIE MSP430 NIOS2 POWERPC RISCV S390 SH SPARC X86 XTENSA"
|
||||
CT_ARCH_SUFFIX=""
|
||||
# CT_OMIT_TARGET_VENDOR is not set
|
||||
@ -162,7 +162,7 @@ CT_ARCH_LE=y
|
||||
CT_ARCH_ENDIAN="little"
|
||||
CT_ARCH_SUPPORTS_32=y
|
||||
CT_ARCH_SUPPORTS_64=y
|
||||
CT_ARCH_DEFAULT_32=y
|
||||
CT_ARCH_DEFAULT_64=y
|
||||
CT_ARCH_BITNESS=64
|
||||
# CT_ARCH_32 is not set
|
||||
CT_ARCH_64=y
|
||||
@ -185,7 +185,7 @@ CT_ARCH_FPU=""
|
||||
# CT_ARCH_FLOAT_SW is not set
|
||||
CT_TARGET_CFLAGS=""
|
||||
CT_TARGET_LDFLAGS=""
|
||||
CT_ARCH_FLOAT="hard"
|
||||
CT_ARCH_FLOAT="auto"
|
||||
|
||||
#
|
||||
# Toolchain options
|
||||
|
@ -161,7 +161,7 @@ CT_ARCH_BE=y
|
||||
CT_ARCH_ENDIAN="big"
|
||||
CT_ARCH_SUPPORTS_32=y
|
||||
CT_ARCH_SUPPORTS_64=y
|
||||
CT_ARCH_DEFAULT_32=y
|
||||
CT_ARCH_DEFAULT_64=y
|
||||
CT_ARCH_BITNESS=64
|
||||
# CT_ARCH_32 is not set
|
||||
CT_ARCH_64=y
|
||||
|
@ -161,7 +161,7 @@ CT_ARCH_LE=y
|
||||
CT_ARCH_ENDIAN="little"
|
||||
CT_ARCH_SUPPORTS_32=y
|
||||
CT_ARCH_SUPPORTS_64=y
|
||||
CT_ARCH_DEFAULT_32=y
|
||||
CT_ARCH_DEFAULT_64=y
|
||||
CT_ARCH_BITNESS=64
|
||||
# CT_ARCH_32 is not set
|
||||
CT_ARCH_64=y
|
||||
|
Loading…
Reference in New Issue
Block a user