From 96a6857b97a4cce96945e472e0ec1c8855229b21 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Wed, 10 Apr 2024 06:57:33 +0100 Subject: [PATCH] HPCC-31591 Force vcpkg build to use exact version of tools Signed-off-by: Gordon Smith --- .github/workflows/build-assets.yml | 6 +++--- .github/workflows/build-vcpkg.yml | 6 +++--- cmake_modules/vcpkg.cmake | 5 ++--- dockerfiles/vcpkg/amazonlinux.dockerfile | 13 ++----------- dockerfiles/vcpkg/centos-7.dockerfile | 19 ++----------------- dockerfiles/vcpkg/centos-8.dockerfile | 14 ++------------ dockerfiles/vcpkg/ubuntu-20.04.dockerfile | 16 ++-------------- dockerfiles/vcpkg/ubuntu-22.04.dockerfile | 18 ++---------------- dockerfiles/vcpkg/ubuntu-22.10.dockerfile | 18 ++---------------- vcpkg | 2 +- vcpkg-configuration.json | 16 ++++++++++++++++ 11 files changed, 37 insertions(+), 96 deletions(-) create mode 100644 vcpkg-configuration.json diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index 0e4e7fb5498..9b564bb2092 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -102,9 +102,9 @@ jobs: - os: ubuntu-20.04 - os: centos-8 - os: centos-7 - cmake_options_extra: "" + cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic" - os: amazonlinux - cmake_options_extra: "" + cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic" - os: ubuntu-22.04 name: LN k8s ln: true @@ -118,7 +118,7 @@ jobs: ln: true - os: centos-7 name: LN - cmake_options_extra: "" + cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic" ln: true fail-fast: false diff --git a/.github/workflows/build-vcpkg.yml b/.github/workflows/build-vcpkg.yml index 5f9e326feef..2e10617da56 100644 --- a/.github/workflows/build-vcpkg.yml +++ b/.github/workflows/build-vcpkg.yml @@ -88,13 +88,13 @@ jobs: event_name: "schedule" - os: centos-7 event_name: "pull_request" - cmake_options_extra: "" + cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic" - os: amazonlinux event_name: "schedule" - cmake_options_extra: "" + cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic" - os: centos-7 name: LN - cmake_options_extra: "" + cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic" ln: true event_name: "schedule" fail-fast: false diff --git a/cmake_modules/vcpkg.cmake b/cmake_modules/vcpkg.cmake index aee3b8a2c37..41bac69ada7 100644 --- a/cmake_modules/vcpkg.cmake +++ b/cmake_modules/vcpkg.cmake @@ -4,13 +4,12 @@ if ("${VCPKG_DONE}" STREQUAL "") set(VCPKG_FILES_DIR "${CMAKE_BINARY_DIR}" CACHE STRING "Folder for vcpkg download, build and installed files") set(CMAKE_TOOLCHAIN_FILE ${HPCC_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake) set(VCPKG_ROOT ${HPCC_SOURCE_DIR}/vcpkg) -set(VCPKG_OVERLAY_PORTS ${HPCC_SOURCE_DIR}/vcpkg_overlays;${HPCC_SOURCE_DIR}/vcpkg/overlays) set(VCPKG_INSTALLED_DIR "${VCPKG_FILES_DIR}/vcpkg_installed") -set(VCPKG_INSTALL_OPTIONS "--downloads-root=${VCPKG_FILES_DIR}/vcpkg_downloads;--x-buildtrees-root=${VCPKG_FILES_DIR}/vcpkg_buildtrees;--x-packages-root=${VCPKG_FILES_DIR}/vcpkg_packages") +set(VCPKG_INSTALL_OPTIONS "--x-abi-tools-use-exact-versions;--downloads-root=${VCPKG_FILES_DIR}/vcpkg_downloads;--x-buildtrees-root=${VCPKG_FILES_DIR}/vcpkg_buildtrees;--x-packages-root=${VCPKG_FILES_DIR}/vcpkg_packages") set(VCPKG_VERBOSE OFF) if(APPLE OR WIN32) elseif(UNIX) - set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic" CACHE STRING "target triplet" FORCE) + set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic" CACHE STRING "target triplet") endif() # Create a catalog of the vcpkg dependencies --- diff --git a/dockerfiles/vcpkg/amazonlinux.dockerfile b/dockerfiles/vcpkg/amazonlinux.dockerfile index 5c1aaf941e5..fb839a05198 100644 --- a/dockerfiles/vcpkg/amazonlinux.dockerfile +++ b/dockerfiles/vcpkg/amazonlinux.dockerfile @@ -1,15 +1,6 @@ ARG VCPKG_REF=latest FROM hpccsystems/platform-build-base-amazonlinux:$VCPKG_REF -RUN amazon-linux-extras install java-openjdk11 && yum install -y \ - java-11-openjdk-devel \ - python3-devel \ - epel-release -RUN yum install -y \ - R-core-devel \ - R-Rcpp-devel \ - R-RInside-devel - -WORKDIR /hpcc-dev - ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/dockerfiles/vcpkg/centos-7.dockerfile b/dockerfiles/vcpkg/centos-7.dockerfile index 83791b07498..4b9cc79cd4e 100644 --- a/dockerfiles/vcpkg/centos-7.dockerfile +++ b/dockerfiles/vcpkg/centos-7.dockerfile @@ -1,21 +1,6 @@ ARG VCPKG_REF=latest FROM hpccsystems/platform-build-base-centos-7:$VCPKG_REF -RUN yum install -y \ - java-11-openjdk-devel \ - python3-devel \ - wget \ - epel-release -RUN yum update -y && yum install -y R-core-devel - -ENV Rcpp_package=Rcpp_0.12.19.tar.gz -ENV RInside_package=RInside_0.2.12.tar.gz - -RUN wget https://cran.r-project.org/src/contrib/Archive/Rcpp/${Rcpp_package} -RUN wget https://cran.r-project.org/src/contrib/Archive/RInside/${RInside_package} -RUN R CMD INSTALL ${Rcpp_package} ${RInside_package} -RUN rm -f ${Rcpp_package} ${RInside_package} - -WORKDIR /hpcc-dev - ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/dockerfiles/vcpkg/centos-8.dockerfile b/dockerfiles/vcpkg/centos-8.dockerfile index 8d419588d73..108398a2711 100644 --- a/dockerfiles/vcpkg/centos-8.dockerfile +++ b/dockerfiles/vcpkg/centos-8.dockerfile @@ -1,16 +1,6 @@ ARG VCPKG_REF=latest FROM hpccsystems/platform-build-base-centos-8:$VCPKG_REF -RUN yum remove -y python3.11 java-1.* && yum install -y \ - java-11-openjdk-devel \ - python3-devel \ - epel-release - -RUN yum install -y \ - R-core-devel \ - R-Rcpp-devel \ - R-RInside-devel - -WORKDIR /hpcc-dev - ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/dockerfiles/vcpkg/ubuntu-20.04.dockerfile b/dockerfiles/vcpkg/ubuntu-20.04.dockerfile index 7211cccebde..af0e1dc41b2 100644 --- a/dockerfiles/vcpkg/ubuntu-20.04.dockerfile +++ b/dockerfiles/vcpkg/ubuntu-20.04.dockerfile @@ -1,18 +1,6 @@ ARG VCPKG_REF=latest FROM hpccsystems/platform-build-base-ubuntu-20.04:$VCPKG_REF -ENV RInside_package=RInside_0.2.14.tar.gz - -RUN apt-get update && apt-get install --no-install-recommends -y \ - default-jdk \ - python3-dev \ - wget \ - r-base \ - r-cran-rcpp -RUN wget https://cran.r-project.org/src/contrib/Archive/RInside/${RInside_package} -RUN R CMD INSTALL ${RInside_package} -RUN rm -f ${RInside_package} - -WORKDIR /hpcc-dev - ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/dockerfiles/vcpkg/ubuntu-22.04.dockerfile b/dockerfiles/vcpkg/ubuntu-22.04.dockerfile index 768830ad711..886e15b0ff2 100644 --- a/dockerfiles/vcpkg/ubuntu-22.04.dockerfile +++ b/dockerfiles/vcpkg/ubuntu-22.04.dockerfile @@ -1,20 +1,6 @@ ARG VCPKG_REF=latest FROM hpccsystems/platform-build-base-ubuntu-22.04:$VCPKG_REF -RUN apt-get update && apt-get install --no-install-recommends -y \ - default-jdk \ - ninja-build \ - python3-dev \ - rsync \ - fop \ - libsaxonb-java \ - r-base \ - r-cran-rcpp \ - r-cran-rinside \ - r-cran-inline - -RUN git config --global --add safe.directory '*' - -WORKDIR /hpcc-dev - ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/dockerfiles/vcpkg/ubuntu-22.10.dockerfile b/dockerfiles/vcpkg/ubuntu-22.10.dockerfile index 18866fc1d3a..8a73cee2e0a 100644 --- a/dockerfiles/vcpkg/ubuntu-22.10.dockerfile +++ b/dockerfiles/vcpkg/ubuntu-22.10.dockerfile @@ -1,20 +1,6 @@ ARG VCPKG_REF=latest FROM hpccsystems/platform-build-base-ubuntu-22.10:$VCPKG_REF -RUN apt-get update && apt-get install --no-install-recommends -y \ - default-jdk \ - ninja-build \ - python3-dev \ - rsync \ - fop \ - libsaxonb-java \ - r-base \ - r-cran-rcpp \ - r-cran-rinside \ - r-cran-inline - -RUN git config --global --add safe.directory '*' - -WORKDIR /hpcc-dev - ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] \ No newline at end of file diff --git a/vcpkg b/vcpkg index 8ba8a55200f..c0fd15560da 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 8ba8a55200fb34e1597fc40115e0017374c7570f +Subproject commit c0fd15560dae60af9b66c0095f80dca2fcdf7a92 diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 00000000000..39078d8b260 --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,16 @@ +{ + "default-registry": { + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg", + "baseline": "f6a5d4e8eb7476b8d7fc12a56dff300c1c986131" + }, + "registries": [], + "overlay-ports": [ + "./vcpkg_overlays", + "./vcpkg/overlays" + ], + "overlay-triplets": [ + "./vcpkg_overlays", + "./vcpkg/overlays" + ] +} \ No newline at end of file