Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-31591 Force vcpkg build to use exact version of tools #18525

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions cmake_modules/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the behavior before this checking the vcpkgTools.xml file and just using that as the minimum version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct it was defaulting to the system version if it was the same or newer. FYI this is also now set for 9.4.x (9.6.x was always using it).

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 ---
Expand Down
13 changes: 2 additions & 11 deletions dockerfiles/vcpkg/amazonlinux.dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
19 changes: 2 additions & 17 deletions dockerfiles/vcpkg/centos-7.dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
14 changes: 2 additions & 12 deletions dockerfiles/vcpkg/centos-8.dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
16 changes: 2 additions & 14 deletions dockerfiles/vcpkg/ubuntu-20.04.dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
18 changes: 2 additions & 16 deletions dockerfiles/vcpkg/ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
18 changes: 2 additions & 16 deletions dockerfiles/vcpkg/ubuntu-22.10.dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming we moved these additions to the dockerfile image over into the vcpkg repository dockerfile/ files?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - its only a convenience for testing, both 9.4.x and 9.6.x are setup this way already.

CMD ["/bin/bash"]
16 changes: 16 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
Loading