diff --git a/.gitattributes b/.gitattributes index 58d73653580..818d7339647 100644 --- a/.gitattributes +++ b/.gitattributes @@ -48,7 +48,6 @@ Dockerfile text *.yaml text *.yml text .dockerignore text -uid_entrypoint text # Qt *.pro text diff --git a/.github/workflows/code-cleanliness.yml b/.github/workflows/code-cleanliness.yml index dc8ad24c353..154df9dc2fb 100644 --- a/.github/workflows/code-cleanliness.yml +++ b/.github/workflows/code-cleanliness.yml @@ -13,7 +13,7 @@ jobs: - name: Run Check Code Cleanliness with Docker uses: addnab/docker-run-action@v3 with: - image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519 + image: quay.io/eclipse-cdt/cdt-infra-github@sha256:6949adee26f78e9968e16d52bc3accfd7b51d0f16c473ad4b6f1caee849ab519 options: -v ${{ github.workspace }}:/work run: | set -x diff --git a/BUILDING.md b/BUILDING.md index 60a4a341270..592f0c44eea 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -25,7 +25,7 @@ To build CDT plug-ins you need a standard Maven & Java development environment. The CI build automatically run code cleanliness checks. To run them on your computer it is recommended to use the Docker image, for example like this from the root of the checked out CDT repo: ```sh -docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install:latest releng/scripts/check_code_cleanliness.sh +docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra:latest releng/scripts/check_code_cleanliness.sh ``` ### Profiles @@ -160,7 +160,7 @@ An additional tip is to set the following in `.gitconfig` to allow you to diff ` When the host is Windows, getting docker to behave as encoded in the pom.xml may be challenging, instead a command like this will probably work (replace your path to git root). Note that running this in git bash causes problems because of the /work in the command line arguments. (TODO integrate this command line way of running into the pom.xml so the original instructions work.) -`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest' 'make' '-C' 'native_src' 'rebuild'` +`docker 'run' '--rm' '-t' '-v' 'D:\cdt\git\org.eclipse.cdt:/work' '-w' '/work/core/org.eclipse.cdt.core.native' 'quay.io/eclipse-cdt/cdt-infra:latest' 'make' '-C' 'native_src' 'rebuild'` See also `jniheaders` profile above. diff --git a/NewAndNoteworthy/CDT-12.0.md b/NewAndNoteworthy/CDT-12.0.md index 1d7aa822a0f..c4eb943905a 100644 --- a/NewAndNoteworthy/CDT-12.0.md +++ b/NewAndNoteworthy/CDT-12.0.md @@ -6,6 +6,12 @@ This is the New & Noteworthy page for CDT 12.0 which is part of Eclipse 2025-03 # Release Notes +## Minimum version of GLIBC required + +The minimum version of GLIBC required is now 2.31. +This version can be found in Ubuntu 20.04 and later, RHEL 9.0 and later and other distros as well. +CDT's native components will likely work with older versions of glibc too, assuming they provide the required APIs for Eclipse CDT. + # Managed Build ## Other objects for GNU archive files diff --git a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so index 3c2ec1047da..b89f230227d 100755 Binary files a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so and b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libpty.so differ diff --git a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so index 5abbeda17fd..b8670e1c473 100755 Binary files a/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so and b/core/org.eclipse.cdt.core.linux.aarch64/os/linux/aarch64/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so index d59d51b7452..b18bb6bf45f 100755 Binary files a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so and b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libpty.so differ diff --git a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so index a064b0b1560..2beea79a2b3 100755 Binary files a/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so and b/core/org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64le/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so index cfd41f315e8..42bfa97d3a8 100755 Binary files a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so and b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libpty.so differ diff --git a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so index e739435d35a..da4ea4b14ea 100755 Binary files a/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so and b/core/org.eclipse.cdt.core.linux.x86_64/os/linux/x86_64/libspawner.so differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib index b801728a7ba..3b44008af39 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libpty.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib index d667decc2c7..e5877dff490 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/aarch64/libspawner.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib index f3827e81292..0a711db1f04 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libpty.jnilib differ diff --git a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib index 682d532cf06..513370e9f9b 100755 Binary files a/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib and b/core/org.eclipse.cdt.core.macosx/os/macosx/x86_64/libspawner.jnilib differ diff --git a/core/org.eclipse.cdt.core.native/native_src/Makefile b/core/org.eclipse.cdt.core.native/native_src/Makefile index cecdb25b56b..78c55db4989 100644 --- a/core/org.eclipse.cdt.core.native/native_src/Makefile +++ b/core/org.eclipse.cdt.core.native/native_src/Makefile @@ -28,7 +28,8 @@ OS_DIR_LINUX_PPC64LE := ../../org.eclipse.cdt.core.linux.ppc64le/os/linux/ppc64l OS_DIR_MACOS_X86_64 := ../../org.eclipse.cdt.core.macosx/os/macosx/x86_64 OS_DIR_MACOS_AARCH64 := ../../org.eclipse.cdt.core.macosx/os/macosx/aarch64 -COMMON_CFLAGS := -Wall -pedantic -Werror +COMMON_CFLAGS := -Wall -pedantic -Werror -std=gnu11 +COMMON_CCFLAGS := -Wall -pedantic -Werror -std=gnu++14 UNAME = $(shell uname) ifeq ($(UNAME),Linux) @@ -55,7 +56,8 @@ LIBS = \ $(OS_DIR_MACOS_AARCH64)/libpty.jnilib else ifeq ($(findstring ARM64,$(UNAME)),ARM64) -COMMON_CFLAGS := -Wall -pedantic +COMMON_CFLAGS := -Wall -pedantic -std=gnu11 +COMMON_CCFLAGS := -Wall -pedantic -std=gnu++14 LIBS = \ $(OS_DIR_WIN32_AARCH64)/starter.exe \ $(OS_DIR_WIN32_AARCH64)/spawner.dll @@ -127,7 +129,7 @@ $(OS_DIR_WIN32_X86_64)/spawner.dll: win/iostream.c win/raise.c win/spawner.c win $(OS_DIR_WIN32_X86_64)/pty.dll: win/pty.cpp win/pty_dllmain.cpp win/util.c mkdir -p $(dir $@) && \ $(REPRODUCIBLE_BUILD_WRAPPER) \ - x86_64-w64-mingw32-g++ $(COMMON_CFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \ + x86_64-w64-mingw32-g++ $(COMMON_CCFLAGS) -o $@ -Iinclude -Iwin/include -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" \ -DUNICODE \ $^ \ -Wl,--kill-at --shared -L$(OS_DIR_WIN32_X86_64) -lwinpty -static-libstdc++ -static-libgcc diff --git a/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c b/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c index db7c829ff57..29babd9766c 100644 --- a/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c +++ b/core/org.eclipse.cdt.core.native/native_src/unix/exec_pty.c @@ -85,7 +85,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) { } } -static void close_all_fds() { +static void close_all_fds(void) { unsigned int from_fd = STDERR_FILENO + 1; if (sys_close_range_wrapper(from_fd) == 0) return; diff --git a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c index 129de40c99b..8712ee23ddf 100644 --- a/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c +++ b/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c @@ -84,7 +84,7 @@ static void close_all_fds_fallback(unsigned int from_fd_inclusive) { } } -static void close_all_fds() { +static void close_all_fds(void) { unsigned int from_fd = STDERR_FILENO + 1; if (sys_close_range_wrapper(from_fd) == 0) { return; diff --git a/core/org.eclipse.cdt.core.native/pom.xml b/core/org.eclipse.cdt.core.native/pom.xml index bbaa307c380..9782382c7be 100644 --- a/core/org.eclipse.cdt.core.native/pom.xml +++ b/core/org.eclipse.cdt.core.native/pom.xml @@ -79,7 +79,7 @@ - + @@ -87,7 +87,7 @@ - + diff --git a/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll new file mode 100755 index 00000000000..719cbb3e538 Binary files /dev/null and b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/spawner.dll differ diff --git a/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe new file mode 100755 index 00000000000..18f3b2304e4 Binary files /dev/null and b/core/org.eclipse.cdt.core.win32.aarch64/os/win32/aarch64/starter.exe differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll index a3a9e575f26..cbb08b47f0d 100755 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll index 4e903369fab..34fb1660fb3 100755 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/spawner.dll differ diff --git a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe index 1ab1cc62b92..2df552045f0 100755 Binary files a/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe and b/core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/starter.exe differ diff --git a/docker/Readme.md b/docker/Readme.md index 6cab512d3e4..c259c704acb 100644 --- a/docker/Readme.md +++ b/docker/Readme.md @@ -1,15 +1,13 @@ Dockerfiles ============ -The docker images for Eclipse CDT's [Jenkins instance](https://ci.eclipse.org/cdt/) are stored at [quay.io](https://quay.io/organization/eclipse-cdt) -and built using the following scripts. The individual directories below this one contain Dockerfiles which contain a little more information. Note that -the split between the Dockerfiles is somewhat arbitrary and historical. Only the cdt-infra-eclipse-full image is known to be referenced outside -of the cdt repo. +The docker images for Eclipse CDT's [Jenkins instance](https://ci.eclipse.org/cdt/) and [GitHub Action check code cleanliness](https://github.com/eclipse-cdt/cdt/blob/main/.github/workflows/code-cleanliness.yml) are stored at [quay.io](https://quay.io/organization/eclipse-cdt) and built using the following scripts. +The individual directories below this one contain Dockerfiles which contain a little more information. build-images.sh =============== -Builds the images locally. A download of [Xcode_9.4.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip) (visit [here](https://developer.apple.com/download/more/) first to logon to Apple if needed) is needed to do a complete build. To save on rebuild times, the xip can be removed from the directory to use the cached cdt-infra-build-macos-sdk image. +Builds the images locally. A download of [Xcode_13.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_13.1.xip/Xcode_13.1.xip.xip) (visit [here](https://developer.apple.com/download/more/) first to logon to Apple if needed) is needed to do a complete build. To save on rebuild times, the xip can be removed from the directory to use the cached cdt-infra-build-macos-sdk image. deploy-images.sh ================ @@ -20,14 +18,14 @@ updates all the Jenkinsfile and yaml files to refer to these new images. Using the docker images ======================= -The docker images exist mostly for use in Jenkins, see the [pod templates](https://github.com/eclipse-cdt/cdt/blob/main/jenkins/pod-templates). +The docker images exist mostly for use in Jenkins and GitHub Actions, see the [pod templates](https://github.com/eclipse-cdt/cdt/blob/main/jenkins/pod-templates) and [workflows](https://github.com/eclipse-cdt/cdt/blob/main/.github/workflows/) They can be used to recreate a consistent environment in other cases too. For example, you can run a full build on a machine that does not already have the tools by using docker: ``` -docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-eclipse-full:latest COMMAND HERE +docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra:latest COMMAND HERE ``` -For examples of the above in practice, see [cdt-gdb-adapter's integration tests readme](https://github.com/eclipse-cdt/cdt-gdb-adapter/blob/master/src/integration-tests/README.md) and the native section of [CDT's readme](https://github.com/eclipse-cdt/cdt/blob/main/BUILDING.md#native) +For examples of the above in practice, see the native section of [CDT's building readme](https://github.com/eclipse-cdt/cdt/blob/main/BUILDING.md#native) diff --git a/docker/build-images.sh b/docker/build-images.sh index 8cff8b57092..843f40e3192 100755 --- a/docker/build-images.sh +++ b/docker/build-images.sh @@ -5,14 +5,11 @@ set -eux # Xcode_13.1.xip is needed to build the OSx cross compiler image from https://developer.apple.com/download/all/?q=xcode # As an optimization for the rebuild times, the image is only built if the xip is present. if [ -f Xcode_13.1.xip ]; then - docker build --rm --build-arg Xcodexip=Xcode_13.1.xip -f cdt-infra-build-macos-sdk/ubuntu-18.04/Dockerfile -t cdt-infra-build-macos-sdk:ubuntu-18.04 . + docker build --rm --build-arg Xcodexip=Xcode_13.1.xip -f cdt-infra-build-macos-sdk/Dockerfile -t cdt-infra-build-macos-sdk:latest . else echo "MacOSX SDK & Toolchain build is being skipped" fi -docker build --rm -f cdt-infra-base/ubuntu-18.04/Dockerfile -t cdt-infra-base:ubuntu-18.04 . -docker build --rm -f cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile -t cdt-infra-all-gdbs:ubuntu-18.04 . -docker build --rm -f cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile -t cdt-infra-eclipse-full:ubuntu-18.04 . -docker build --rm -f cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install:ubuntu-18.04 . -docker build --rm -f cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile -t cdt-infra-plus-eclipse-install-github:ubuntu-18.04 . -docker build --rm -f cdt-infra-plus-node/ubuntu-18.04/Dockerfile -t cdt-infra-plus-node:ubuntu-18.04 . \ No newline at end of file +docker build --rm -f cdt-infra/Dockerfile -t cdt-infra:latest . +docker build --rm -f cdt-infra-github/Dockerfile -t cdt-infra-github:latest . +docker build --rm -f cdt-infra-jipp/Dockerfile -t cdt-infra-jipp:latest . diff --git a/docker/cdt-infra-all-gdbs/Readme.md b/docker/cdt-infra-all-gdbs/Readme.md deleted file mode 100644 index 1098463df5f..00000000000 --- a/docker/cdt-infra-all-gdbs/Readme.md +++ /dev/null @@ -1,26 +0,0 @@ -Building GDBs in a separate image -================================= - -The GDBs take a long time to build and it is very inconvenient to have to build them -because something else in a Docker file has changed. Therefore, this image *only* -builds the GDBs using the download-build-gdb.sh script. - -Other images can then use these prebuilt GDBs by copying them to their image. - -For example, to copy all the GDBs use this line: - -``` -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all /shared/common/gdb/gdb-all -``` - -Or, to copy a specific version only, do this: - -``` -# Copy install directory -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/install/gdb-8.2.1 /shared/common/gdb/gdb-all/install/gdb-8.2.1 -# Copy versioned links -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdb.8.2 /shared/common/gdb/gdb-all/bin/gdb.8.2 -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdb.8.2.1 /shared/common/gdb/gdb-all/bin/gdb.8.2.1 -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdbserver.8.2 /shared/common/gdb/gdb-all/bin/gdbserver.8.2 -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin/gdbserver.8.2.1 /shared/common/gdb/gdb-all/bin/gdbserver.8.2.1 -``` diff --git a/docker/cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile b/docker/cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile deleted file mode 100644 index 2f462989398..00000000000 --- a/docker/cdt-infra-all-gdbs/ubuntu-18.04/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM ubuntu:18.04 - -USER root - - -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - git \ - gnupg \ - openssh-client \ - pkg-config \ - wget \ - zip \ - locales \ - build-essential \ - bison \ - flex \ - libgmp-dev \ - libexpat1-dev \ - libmpfr-dev \ - libncurses-dev \ - pkg-config \ - zlib1g-dev \ - texinfo \ - && rm -rf /var/lib/apt/lists/* \ - && locale-gen en_US.UTF-8 - -# Need locale to be UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -# Build GDB -COPY scripts/download-build-gdb.sh /opt/scripts/download-build-gdb.sh -ENV GDB_BASE /shared/common/gdb/gdb-all -ENV GDB_VERSIONS all -# build without debug info to reduce size -ENV CFLAGS -g0 -ENV CXXFLAGS -g0 -RUN chmod u+x /opt/scripts/download-build-gdb.sh && mkdir -p /shared/common/gdb/gdb-all && /opt/scripts/download-build-gdb.sh -b $GDB_BASE $GDB_VERSIONS \ - && rm -rf $GDB_BASE/download && rm -rf $GDB_BASE/build diff --git a/docker/cdt-infra-base/Readme.md b/docker/cdt-infra-base/Readme.md deleted file mode 100644 index 83041fecbdf..00000000000 --- a/docker/cdt-infra-base/Readme.md +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains dockerfiles for CDT Infra to provide a basic Java environment. - diff --git a/docker/cdt-infra-build-macos-sdk/ubuntu-18.04/Dockerfile b/docker/cdt-infra-build-macos-sdk/Dockerfile similarity index 79% rename from docker/cdt-infra-build-macos-sdk/ubuntu-18.04/Dockerfile rename to docker/cdt-infra-build-macos-sdk/Dockerfile index b1c73419e29..7ffcdf3292c 100644 --- a/docker/cdt-infra-build-macos-sdk/ubuntu-18.04/Dockerfile +++ b/docker/cdt-infra-build-macos-sdk/Dockerfile @@ -1,17 +1,13 @@ # This dockerfile is used to build the MacOSX SDK -FROM ubuntu:18.04 +FROM ubuntu:20.04 -RUN apt-get update -RUN apt-get install -y clang make build-essential -RUN apt-get install -y libssl-dev lzma-dev liblzma-dev libxml2-dev git patch python cpio bzip2 xz-utils libbz2-dev +ENV DEBIAN_FRONTEND=noninteractive +RUN apt update +RUN apt install -y clang make build-essential libssl-dev lzma-dev liblzma-dev libxml2-dev git patch python3 cpio bzip2 xz-utils libbz2-dev curl -# cmake in Ubuntu is too old to build osxcross, therefore -# use this version -RUN apt-get install -y curl RUN curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-x86_64.tar.gz | tar xzf - -C /usr/share ENV PATH="/usr/share/cmake-3.29.2-linux-x86_64/bin:${PATH}" - # Xcode_13.1.xip needs to be downloaded from # https://developer.apple.com/download/all/?q=xcode - specically: ARG Xcodexip=Xcode_13.1.xip @@ -29,7 +25,7 @@ ENV UNATTENDED=1 RUN cd /opt/osxcross && ./build.sh # Start next stage build -FROM ubuntu:18.04 +FROM ubuntu:20.04 COPY --from=0 /opt/osxcross/target /opt/osxcross/target ENV PATH="/opt/osxcross/target/bin:${PATH}" # At this point the osxcross toolchain is not usable, diff --git a/docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile b/docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile deleted file mode 100644 index fa086a89dd5..00000000000 --- a/docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -FROM cdt-infra-base:ubuntu-18.04 - -USER root - -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - git \ - gdb \ - libgmp-dev \ - libexpat1-dev \ - libipt1 \ - libmpfr-dev \ - libncurses-dev \ - ninja-build \ - pkg-config \ - python3-all-dev python3-pip python3-setuptools \ - zlib1g-dev \ - gdbserver \ - gcc-mingw-w64-x86-64 \ - g++-mingw-w64-x86-64 \ - gcc-aarch64-linux-gnu \ - g++-aarch64-linux-gnu \ - gcc-powerpc64le-linux-gnu \ - g++-powerpc64le-linux-gnu \ - clang \ - libxml2-utils \ - gettext-base \ - xserver-xephyr \ - clang-format \ - xvfb \ - ssh-askpass \ - && apt-get install -y llvm \ - && apt-get install -y --no-install-recommends texinfo bison flex \ - && rm -rf /var/lib/apt/lists/* \ - && pip3 install --upgrade pip - -#Specifc CDT deps - -#Meson -RUN pip3 install meson - -# GDB pre-built in a different image -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin /shared/common/gdb/gdb-all/bin -COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/install /shared/common/gdb/gdb-all/install -ENV PATH="/shared/common/gdb/gdb-all/bin:${PATH}" - -# Get pre-built MacOSX toolchain from other image (this also -# requires clang to be listed in the installs above) -COPY --from=cdt-infra-build-macos-sdk:ubuntu-18.04 /opt/osxcross/target /opt/osxcross/target -ENV PATH="/opt/osxcross/target/bin:${PATH}" - -#Fix permissions for OpenShift & standard k8s -RUN chown -R 1000:0 ${HOME} \ - && chmod -R g+rwX ${HOME} - - -ENV USER_NAME vnc -USER 1000 -WORKDIR ${HOME} - -CMD ["/home/vnc/.vnc/xstartup.sh"] diff --git a/docker/cdt-infra-github/Dockerfile b/docker/cdt-infra-github/Dockerfile new file mode 100644 index 00000000000..5e7bc85587a --- /dev/null +++ b/docker/cdt-infra-github/Dockerfile @@ -0,0 +1,9 @@ +FROM cdt-infra:latest +USER root + +RUN chown -R 1001:0 ${HOME} \ + && chmod -R g+rwX ${HOME} + +USER 1001 + +CMD ["/home/vnc/.vnc/xstartup.sh"] diff --git a/docker/cdt-infra-plus-eclipse-install-github/Readme.md b/docker/cdt-infra-github/Readme.md similarity index 100% rename from docker/cdt-infra-plus-eclipse-install-github/Readme.md rename to docker/cdt-infra-github/Readme.md diff --git a/docker/cdt-infra-jipp/Dockerfile b/docker/cdt-infra-jipp/Dockerfile new file mode 100644 index 00000000000..2af93a6e4d3 --- /dev/null +++ b/docker/cdt-infra-jipp/Dockerfile @@ -0,0 +1,9 @@ +FROM cdt-infra:latest +USER root + +RUN chown -R 1000:0 ${HOME} \ + && chmod -R g+rwX ${HOME} + +USER 1000 + +CMD ["/home/vnc/.vnc/xstartup.sh"] diff --git a/docker/cdt-infra-plus-eclipse-install/Readme.md b/docker/cdt-infra-jipp/Readme.md similarity index 100% rename from docker/cdt-infra-plus-eclipse-install/Readme.md rename to docker/cdt-infra-jipp/Readme.md diff --git a/docker/cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile b/docker/cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile deleted file mode 100644 index ae6c9688047..00000000000 --- a/docker/cdt-infra-plus-eclipse-install-github/ubuntu-18.04/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM ubuntu:18.04 - -# The contents of this file are similar to cdt-infra-plus-eclipse-install/*/Dockerfile -# because we don't want to share layers otherwise the change in permissions (1000 -> 1001) -# causes an additional layer to be created in Docker, adding 300MB+ to download -# size on each run - -ENV HOME=/home/vnc -RUN apt-get update -RUN apt-get install -y curl tar gzip -#Eclipse SDK & Fix permissions for GitHub Actions -RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \ - && curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xvz \ - && mv eclipse eclipse-SDK-4.31 \ - && chown -R 1001:0 ${HOME} \ - && chmod -R g+rwX ${HOME} - -FROM cdt-infra-eclipse-full:ubuntu-18.04 -USER root - -COPY --from=0 ${HOME}/buildtools ${HOME}/buildtools - -USER 1001 - -CMD ["/bin/bash"] diff --git a/docker/cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile b/docker/cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile deleted file mode 100644 index 4588eaeabe0..00000000000 --- a/docker/cdt-infra-plus-eclipse-install/ubuntu-18.04/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM ubuntu:18.04 - -ENV HOME=/home/vnc -RUN apt-get update -RUN apt-get install -y curl tar gzip -#Eclipse SDK & Fix permissions for OpenShift & standard k8s -RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \ - && curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xvz \ - && mv eclipse eclipse-SDK-4.31 \ - && chown -R 1000:0 ${HOME} \ - && chmod -R g+rwX ${HOME} - -FROM cdt-infra-eclipse-full:ubuntu-18.04 -USER root - -COPY --from=0 ${HOME}/buildtools ${HOME}/buildtools - -USER 1000 - -CMD ["/home/vnc/.vnc/xstartup.sh"] diff --git a/docker/cdt-infra-plus-node/Readme.md b/docker/cdt-infra-plus-node/Readme.md deleted file mode 100644 index afa255ef1e9..00000000000 --- a/docker/cdt-infra-plus-node/Readme.md +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains a convenience for the Eclipse CDT Cloud's cdt-gdb-adapter project that exists -for historical reasons. See this reference https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter/blob/main/src/integration-tests/README.md#running-the-tests-using-docker diff --git a/docker/cdt-infra-plus-node/ubuntu-18.04/Dockerfile b/docker/cdt-infra-plus-node/ubuntu-18.04/Dockerfile deleted file mode 100644 index 922c5a22b53..00000000000 --- a/docker/cdt-infra-plus-node/ubuntu-18.04/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM cdt-infra-eclipse-full:ubuntu-18.04 -USER root - -#Node -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash \ - && apt-get install -y nodejs \ - && rm -rf /var/lib/apt/lists/* \ - && npm install -g yarn - -# socat needed for some cdt-gdb-adapter tests -RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/* - -#Fix permissions for OpenShift & standard k8s -RUN chown -R 1000:0 ${HOME} \ - && chmod -R g+rwX ${HOME} - -ENV USER_NAME vnc -USER 1000 -WORKDIR ${HOME} - -CMD ["bash"] diff --git a/docker/cdt-infra-base/ubuntu-18.04/Dockerfile b/docker/cdt-infra/Dockerfile similarity index 59% rename from docker/cdt-infra-base/ubuntu-18.04/Dockerfile rename to docker/cdt-infra/Dockerfile index 1640b73db25..d82d783cf5f 100644 --- a/docker/cdt-infra-base/ubuntu-18.04/Dockerfile +++ b/docker/cdt-infra/Dockerfile @@ -1,28 +1,15 @@ -# This file is derived from: -# - https://github.com/eclipse-cbi/dockerfiles/blob/bf1f1a18f4910d007de67765f8df083102150a7c/distros/Dockerfile -# - https://github.com/eclipse-cbi/dockerfiles/blob/bf1f1a18f4910d007de67765f8df083102150a7c/gtk3-wm/ubuntu-metacity/18.04/Dockerfile +#----------------------------------------------- +# This first part of the file is derived from: +# - https://github.com/eclipse-cbi/dockerfiles/blob/74dda784b6cf294012a3bf0d66221a1af480a83c/gtk3-wm/ubuntu-metacity/Dockerfile # Consult https://github.com/eclipse-cbi/dockerfiles for possible updates -# differences from source are commented -FROM ubuntu:18.04 +FROM ubuntu:20.04 -### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments -COPY scripts/uid_entrypoint /usr/local/bin/uid_entrypoint -RUN chmod u+x /usr/local/bin/uid_entrypoint && \ - chgrp 0 /usr/local/bin/uid_entrypoint && \ - chmod g=u /usr/local/bin/uid_entrypoint /etc/passwd - -# Add dumb-init entry point: https://github.com/eclipse-cdt/cdt-infra/pull/26 -RUN apt-get update && apt-get install -y --no-install-recommends \ - dumb-init \ - && rm -rf /var/lib/apt/lists/* - -ENTRYPOINT [ "uid_entrypoint", "dumb-init" ] - -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ libgtk-3-0 \ tigervnc-standalone-server \ tigervnc-common \ + tightvncserver \ metacity \ x11-xserver-utils \ libgl1-mesa-dri \ @@ -45,42 +32,74 @@ RUN mkdir -p ${HOME}/.vnc && chmod -R 775 ${HOME} \ && echo "123456" | vncpasswd -f > ${HOME}/.vnc/passwd \ && chmod 600 ${HOME}/.vnc/passwd -# In addition to metacity in upstream version, provide icewm and mutter manager scripts -# and use icewm as default (experiments showed that on 16.04 metacity was more reliable, -# but on 18.04 icewm is more reliable when running tests) -COPY scripts/xstartup_*.sh ${HOME}/.vnc/ +# Create a custom vnc xstartup file COPY scripts/xstartup_metacity.sh ${HOME}/.vnc/xstartup.sh -RUN chmod 755 ${HOME}/.vnc/xstartup*.sh +RUN chmod 755 ${HOME}/.vnc/xstartup.sh + -#### -# From this point forward is the extra standard tools for CDT -# git and other tools RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - openssh-client \ - wget \ - zip \ - unzip \ - gnupg \ - locales \ - libxtst6 \ - && rm -rf /var/lib/apt/lists/* + ca-certificates \ + curl \ + openssh-client \ + wget \ + zip \ + unzip \ + gnupg \ + locales \ + libxtst6 \ + build-essential \ + git \ + gdb \ + libgmp-dev \ + libexpat1-dev \ + libmpfr-dev \ + libncurses-dev \ + ninja-build \ + pkg-config \ + python3-all-dev python3-pip python3-setuptools \ + zlib1g-dev \ + gdbserver \ + gcc-mingw-w64-x86-64 \ + g++-mingw-w64-x86-64 \ + gcc-aarch64-linux-gnu \ + g++-aarch64-linux-gnu \ + gcc-powerpc64le-linux-gnu \ + g++-powerpc64le-linux-gnu \ + gcc-riscv64-linux-gnu \ + g++-riscv64-linux-gnu \ + clang \ + libxml2-utils \ + gettext-base \ + xserver-xephyr \ + clang-format \ + xvfb \ + ssh-askpass \ + llvm \ + texinfo bison flex \ + meson \ + && rm -rf /var/lib/apt/lists/* + +#----------------------------------------------- +# This is the end of the upstream one from eclipse-cbi +# the rest of this docker file is everything needed to +# build and test CDT on Jenkins and GitHUb +#----------------------------------------------- RUN locale-gen en_US.UTF-8 # Need locale to be UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 # Get release versions from Adoptium API: https://api.adoptium.net/q/swagger-ui/#/Release%20Info/getReleaseNames -ENV JDK17_VERSION jdk-17.0.11+9 -ENV JDK21_VERSION jdk-21.0.3+9 -ENV JAVA17_HOME /usr/lib/jvm/${JDK17_VERSION} -ENV JAVA21_HOME /usr/lib/jvm/${JDK21_VERSION} +# Update toolchains.xml too when updating this +ENV JDK17_VERSION=jdk-17.0.13+11 +ENV JDK21_VERSION=jdk-21.0.5+11 +ENV JAVA17_HOME=/usr/lib/jvm/${JDK17_VERSION} +ENV JAVA21_HOME=/usr/lib/jvm/${JDK21_VERSION} # Get Java from adoptium + header files for win32 & mac for cross compiling JNI libraries on Java 8, 11, 17 # TODO: Move these runs into a script, the only difference between each invocation is the env variables @@ -119,22 +138,43 @@ RUN export JVERSION=${JDK17_VERSION} \ # Default to JAVA21 being in use ENV PATH="${JAVA21_HOME}/bin:${PATH}" -ENV JAVA_HOME ${JAVA21_HOME} +ENV JAVA_HOME=${JAVA21_HOME} # Maven - Note that this is the default, but the Jenkinsfile may override it with JIPP version -ENV MAVEN_VERSION 3.9.6 +ENV MAVEN_VERSION=3.9.9 RUN curl -fsSL https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \ && mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \ && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn -ENV MAVEN_HOME /usr/share/maven - +ENV MAVEN_HOME=/usr/share/maven RUN mkdir -p ${HOME}/.m2 COPY toolchains.xml ${HOME}/.m2 +# Get pre-built MacOSX toolchain from other image (this also +# requires clang to be listed in the installs above) +COPY --from=cdt-infra-build-macos-sdk:latest /opt/osxcross/target /opt/osxcross/target +ENV PATH="/opt/osxcross/target/bin:${PATH}" + +# Get an Eclipse install for running code formatting checks +RUN mkdir -p ${HOME}/buildtools && cd ${HOME}/buildtools \ + && curl -sL https://download.eclipse.org/eclipse/downloads/drops4/R-4.34-202411201800/eclipse-SDK-4.34-linux-gtk-x86_64.tar.gz | tar xvz \ + && mv eclipse eclipse-SDK-4.34 + +# Get WoA toolchain https://github.com/eclipse-cdt/cdt/pull/971 +# Note that we remove the "fake" gcc and g++ provided here as they +# conflict with those provided by package gcc-mingw-w64-x86-64 +# TODO change to install this from some future package called probably gcc-mingw-w64-aarch64 +RUN curl -fsSL https://github.com/mstorsjo/llvm-mingw/releases/download/20241203/llvm-mingw-20241203-ucrt-ubuntu-20.04-x86_64.tar.xz | tar xJf - -C /opt/ \ + && mv /opt/llvm-mingw-20241203-ucrt-ubuntu-20.04-x86_64 /opt/woacross \ + && rm /opt/woacross/bin/*-gcc /opt/woacross/bin/*-g++ +ENV PATH="/opt/woacross/bin:${PATH}" + #Fix permissions for OpenShift & standard k8s RUN chown -R 1000:0 ${HOME} \ && chmod -R g+rwX ${HOME} -ENV USER_NAME vnc + +ENV USER_NAME=vnc USER 1000 WORKDIR ${HOME} + +CMD ["/home/vnc/.vnc/xstartup.sh"] diff --git a/docker/cdt-infra-eclipse-full/Readme.md b/docker/cdt-infra/Readme.md similarity index 100% rename from docker/cdt-infra-eclipse-full/Readme.md rename to docker/cdt-infra/Readme.md diff --git a/docker/deploy-images.sh b/docker/deploy-images.sh index 396846b9c9a..0563707e22c 100755 --- a/docker/deploy-images.sh +++ b/docker/deploy-images.sh @@ -11,7 +11,7 @@ namespace=${1:-quay.io/eclipse-cdt} shorthash=$(git rev-parse --short HEAD) toplevel=$(git rev-parse --show-toplevel) -images="cdt-infra-eclipse-full:ubuntu-18.04 cdt-infra-plus-eclipse-install:ubuntu-18.04 cdt-infra-plus-eclipse-install-github:ubuntu-18.04 cdt-infra-plus-node:ubuntu-18.04" +images="cdt-infra:latest cdt-infra-jipp:latest cdt-infra-github:latest" $toplevel/docker/build-images.sh diff --git a/docker/scripts/uid_entrypoint b/docker/scripts/uid_entrypoint deleted file mode 100644 index e96c4e5c7d9..00000000000 --- a/docker/scripts/uid_entrypoint +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env sh -if ! whoami > /dev/null 2>&1; then - if [ -w /etc/passwd ]; then - echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd - fi -fi -exec "$@" diff --git a/docker/scripts/xstartup_icewm.sh b/docker/scripts/xstartup_icewm.sh deleted file mode 100755 index e4fb303f1ac..00000000000 --- a/docker/scripts/xstartup_icewm.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env /bin/sh - -[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup -[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources - -Xvnc ${DISPLAY} -geometry 1440x900 -depth 16 -dpi 100 -PasswordFile ${HOME}/.vnc/passwd & -sleep 2 -xsetroot -solid grey -vncconfig -iconic & -xhost + -icewm --replace --sm-disable --display=${DISPLAY} & \ No newline at end of file diff --git a/docker/scripts/xstartup_mutter.sh b/docker/scripts/xstartup_mutter.sh deleted file mode 100755 index 5bcfc1998bc..00000000000 --- a/docker/scripts/xstartup_mutter.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env /bin/sh - -[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup -[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources - -Xvnc ${DISPLAY} -geometry 1440x900 -depth 16 -dpi 100 -PasswordFile ${HOME}/.vnc/passwd & -sleep 2 -xsetroot -solid grey -vncconfig -iconic & -xhost + -mutter --replace --sm-disable --display=${DISPLAY} & diff --git a/docker/toolchains.xml b/docker/toolchains.xml index 9b29cf6a50a..18301c59935 100644 --- a/docker/toolchains.xml +++ b/docker/toolchains.xml @@ -8,7 +8,7 @@ default - /usr/lib/jvm/jdk-21.0.3+9 + /usr/lib/jvm/jdk-21.0.5+11 @@ -19,7 +19,7 @@ default - /usr/lib/jvm/jdk-17.0.11+9 + /usr/lib/jvm/jdk-17.0.13+11 diff --git a/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml b/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml index f037ee156f1..8d2e7b698e4 100644 --- a/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml +++ b/jenkins/pod-templates/cdt-full-pod-plus-eclipse-install.yaml @@ -3,7 +3,7 @@ kind: Pod spec: containers: - name: cdt - image: quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install@sha256:34d46fc15cdade4f103d3f1043c48441d41b532545e6b9083c17f5db0175bbab + image: quay.io/eclipse-cdt/cdt-infra-jipp@sha256:34d46fc15cdade4f103d3f1043c48441d41b532545e6b9083c17f5db0175bbab tty: true args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"] resources: diff --git a/jenkins/pod-templates/cdt-full-pod-small.yaml b/jenkins/pod-templates/cdt-full-pod-small.yaml index 9eb8fec305a..ec02996c5cf 100644 --- a/jenkins/pod-templates/cdt-full-pod-small.yaml +++ b/jenkins/pod-templates/cdt-full-pod-small.yaml @@ -3,7 +3,7 @@ kind: Pod spec: containers: - name: cdt - image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0 + image: quay.io/eclipse-cdt/cdt-infra-jipp@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0 tty: true args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"] resources: diff --git a/jenkins/pod-templates/cdt-full-pod-standard.yaml b/jenkins/pod-templates/cdt-full-pod-standard.yaml index b93b3d58c4f..e601f7a270d 100644 --- a/jenkins/pod-templates/cdt-full-pod-standard.yaml +++ b/jenkins/pod-templates/cdt-full-pod-standard.yaml @@ -3,7 +3,7 @@ kind: Pod spec: containers: - name: cdt - image: quay.io/eclipse-cdt/cdt-infra-eclipse-full@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0 + image: quay.io/eclipse-cdt/cdt-infra-jipp@sha256:ecde22ac03cfb4dc7c47b8f5e8f72f9e53ac325d3d568f1bd21fc7af76dc9ed0 tty: true args: ["/bin/sh", "-c", "/home/vnc/.vnc/xstartup.sh && cat"] resources: diff --git a/native/org.eclipse.cdt.native.serial/native_src/Makefile b/native/org.eclipse.cdt.native.serial/native_src/Makefile index 2441b5c053d..b3e9e1245cd 100644 --- a/native/org.eclipse.cdt.native.serial/native_src/Makefile +++ b/native/org.eclipse.cdt.native.serial/native_src/Makefile @@ -90,7 +90,7 @@ $(OS_DIR)/win32/x86_64/serial.dll: serial.c $(OS_DIR)/win32/aarch64/serial.dll: serial.c mkdir -p $(dir $@) && \ $(REPRODUCIBLE_BUILD_WRAPPER) \ - aarch64-w64-mingw32-gcc $(COMMON_CFLAGS) -Iinclude -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" -shared -o $@ $^ + aarch64-w64-mingw32-clang $(COMMON_CFLAGS) -Iinclude -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/win32" -shared -o $@ $^ $(OS_DIR)/linux/x86_64/libserial.so: serial.c mkdir -p $(dir $@) && \ diff --git a/native/org.eclipse.cdt.native.serial/os/linux/aarch64/libserial.so b/native/org.eclipse.cdt.native.serial/os/linux/aarch64/libserial.so index cbad242128a..d0ca959a75f 100755 Binary files a/native/org.eclipse.cdt.native.serial/os/linux/aarch64/libserial.so and b/native/org.eclipse.cdt.native.serial/os/linux/aarch64/libserial.so differ diff --git a/native/org.eclipse.cdt.native.serial/os/linux/ppc64le/libserial.so b/native/org.eclipse.cdt.native.serial/os/linux/ppc64le/libserial.so index 96a0e104b9a..50ee582973b 100755 Binary files a/native/org.eclipse.cdt.native.serial/os/linux/ppc64le/libserial.so and b/native/org.eclipse.cdt.native.serial/os/linux/ppc64le/libserial.so differ diff --git a/native/org.eclipse.cdt.native.serial/os/linux/x86_64/libserial.so b/native/org.eclipse.cdt.native.serial/os/linux/x86_64/libserial.so index 8b05efbeced..82c070c1aca 100755 Binary files a/native/org.eclipse.cdt.native.serial/os/linux/x86_64/libserial.so and b/native/org.eclipse.cdt.native.serial/os/linux/x86_64/libserial.so differ diff --git a/native/org.eclipse.cdt.native.serial/os/macosx/aarch64/libserial.jnilib b/native/org.eclipse.cdt.native.serial/os/macosx/aarch64/libserial.jnilib index 5775f222931..997a0a8fe61 100755 Binary files a/native/org.eclipse.cdt.native.serial/os/macosx/aarch64/libserial.jnilib and b/native/org.eclipse.cdt.native.serial/os/macosx/aarch64/libserial.jnilib differ diff --git a/native/org.eclipse.cdt.native.serial/os/macosx/x86_64/libserial.jnilib b/native/org.eclipse.cdt.native.serial/os/macosx/x86_64/libserial.jnilib index 4915bcadadc..79e686b53bb 100755 Binary files a/native/org.eclipse.cdt.native.serial/os/macosx/x86_64/libserial.jnilib and b/native/org.eclipse.cdt.native.serial/os/macosx/x86_64/libserial.jnilib differ diff --git a/native/org.eclipse.cdt.native.serial/os/win32/aarch64/serial.dll b/native/org.eclipse.cdt.native.serial/os/win32/aarch64/serial.dll new file mode 100755 index 00000000000..063ef6ba0cb Binary files /dev/null and b/native/org.eclipse.cdt.native.serial/os/win32/aarch64/serial.dll differ diff --git a/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll b/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll index aa62b26d9ad..428545c8032 100755 Binary files a/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll and b/native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll differ diff --git a/native/org.eclipse.cdt.native.serial/pom.xml b/native/org.eclipse.cdt.native.serial/pom.xml index 8ff3f88c728..4a4d8e92b5b 100644 --- a/native/org.eclipse.cdt.native.serial/pom.xml +++ b/native/org.eclipse.cdt.native.serial/pom.xml @@ -79,7 +79,7 @@ - + @@ -87,7 +87,7 @@ - + diff --git a/releng/scripts/check_dll_dependencies.sh b/releng/scripts/check_dll_dependencies.sh index 3127a3cf166..ba087e24906 100755 --- a/releng/scripts/check_dll_dependencies.sh +++ b/releng/scripts/check_dll_dependencies.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################### -# Copyright (c) 2020 Kichwa Coders Canada Inc and others. +# Copyright (c) 2020, 2024 Kichwa Coders Canada Inc and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -20,22 +20,48 @@ then exit 0 fi -# This is the current set of allowed DLL dependencies for CDT code. Additional entries here are permitted, -# provided they are found on all Windows machines by default. -ALLOWED_DLLS="KERNEL32.DLL MSVCRT.DLL USER32.DLL PSAPI.DLL SHELL32.DLL ADVAPI32.DLL" -# In addition, the WINPTY.DLL is something CDT ships so is allowed to be a dependency -ALLOWED_DLLS+=" WINPTY.DLL" + +### +# Check that all .dll/.exe files in CDT for a given ${ARCH} (using ${PREFIX} toolchain) +function check { + ARCH=$1; shift + PREFIX=$1; shift + ALLOWED_DLLS="$@"; shift + ALLOWED_DLLS=${ALLOWED_DLLS^^} # change to uppercase + ret_code=0 + + while read line; do + while read import; do + dllname=${import//DLL Name: /} + dllname_upper=${dllname^^} + if [[ ! " ${ALLOWED_DLLS} " =~ " ${dllname_upper} " ]]; then + echo "ERROR: $line has illegal import of ${dllname}" + exit_code=1 + fi + done <<<$(${PREFIX}-w64-mingw32-objdump -p $line | grep "DLL Name") + done <<<$(git ls-files -- **/win32/${ARCH}/\*.exe **/win32/${ARCH}/\*.dll) + return ${ret_code} +} exit_code=0 -while read line; do - while read import; do - dllname=${import//DLL Name: /} - dllname_upper=${dllname^^} - if [[ ! " ${ALLOWED_DLLS} " =~ " ${dllname_upper} " ]]; then - echo "ERROR: $line has illegal import of ${dllname}" - exit_code=1 - fi - done <<<$(x86_64-w64-mingw32-objdump -p $line | grep "DLL Name") -done <<<$(git ls-files -- \*.exe \*.dll) - +# This is the current set of allowed so dependencies for CDT code. Additional entries here are permitted, +# provided they are found on all Windows machines by default. +dlls="kernel32.dll msvcrt.dll user32.dll psapi.dll shell32.dll advapi32.dll winpty.dll" +# The newer style api- dlls are listed separately because of as of this writing only +# the aarch64 has these references listed. +apidlls="api-ms-win-crt-runtime-l1-1-0.dll \ + api-ms-win-crt-runtime-l1-1-0.dll \ + api-ms-win-crt-stdio-l1-1-0.dll \ + api-ms-win-crt-time-l1-1-0.dll \ + api-ms-win-crt-heap-l1-1-0.dll \ + api-ms-win-crt-private-l1-1-0.dll \ + api-ms-win-crt-utility-l1-1-0.dll \ + api-ms-win-crt-string-l1-1-0.dll \ + api-ms-win-crt-convert-l1-1-0.dll \ + api-ms-win-crt-environment-l1-1-0.dll \ + api-ms-win-crt-filesystem-l1-1-0.dll \ + api-ms-win-crt-locale-l1-1-0.dll \ + api-ms-win-crt-math-l1-1-0.dll" +check aarch64 aarch64 ${dlls} ${apidlls} || exit_code=1 +check x86_64 x86_64 ${dlls} || exit_code=1 exit ${exit_code} diff --git a/releng/scripts/check_glibc_dependencies.sh b/releng/scripts/check_glibc_dependencies.sh index 8a23392c0b3..b47528fa24c 100755 --- a/releng/scripts/check_glibc_dependencies.sh +++ b/releng/scripts/check_glibc_dependencies.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################### -# Copyright (c) 2020 Kichwa Coders Canada Inc and others. +# Copyright (c) 2020, 2024 Kichwa Coders Canada Inc and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -32,6 +32,7 @@ function check { ALLOWED_LIBS="$@"; shift ret_code=0 while read line; do + echo "checking ${line}" ${PREFIX}-linux-gnu-readelf -d ${line} | grep -E '\(NEEDED\)' | while read needed; do needed=${needed//*Shared library: [/} needed=${needed//]*/} @@ -64,8 +65,8 @@ function check { exit_code=0 # This is the current set of allowed so dependencies for CDT code. Additional entries here are permitted, # provided they are found on all Linux machines by default. -check aarch64 aarch64 2.17 libc.so.6 ld-linux-aarch64.so.1 || exit_code=1 -check x86_64 x86_64 2.4 libc.so.6 || exit_code=1 -check ppc64le powerpc64le 2.17 libc.so.6 || exit_code=1 +check aarch64 aarch64 2.31 libc.so.6 ld-linux-aarch64.so.1 || exit_code=1 +check x86_64 x86_64 2.31 libc.so.6 || exit_code=1 +check ppc64le powerpc64le 2.31 libc.so.6 || exit_code=1 exit ${exit_code} diff --git a/releng/scripts/do_format_code.sh b/releng/scripts/do_format_code.sh index d020da67d45..a41eee9c4ca 100755 --- a/releng/scripts/do_format_code.sh +++ b/releng/scripts/do_format_code.sh @@ -23,12 +23,12 @@ CDTDIR=${DIR}/../.. ## # Format code ## -: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.31/eclipse} +: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.34/eclipse} if test ! -e "$ECLIPSE" ; then echo "The Eclipse binary was not found at \"$ECLIPSE\"!" echo "You can download it to and pass it via environment variable:" - echo " curl -L https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xzC /tmp" + echo " curl -L https://download.eclipse.org/eclipse/downloads/drops4/R-4.34-202402290520/eclipse-SDK-4.34-linux-gtk-x86_64.tar.gz | tar xzC /tmp" echo " ECLIPSE=/tmp/eclipse/eclipse ./releng/scripts/check_code_cleanliness.sh" exit 1 fi