@@ -71,23 +71,23 @@ RUN source scl_source enable devtoolset-7; set -eux; \
7171 ../configure && make -j $(nproc) && make install; \
7272 cd - && rm -fr build
7373
74- # Required: oniguruma (not installed by deafult )
74+ # Required: oniguruma (not installed by default )
7575RUN source scl_source enable devtoolset-7; set -eux; \
7676 /root/download-src.sh oniguruma https://github.com/kkos/oniguruma/releases/download/v6.9.5_rev1/onig-6.9.5-rev1.tar.gz; \
7777 cd "${SRC_DIR}/oniguruma" ; \
7878 mkdir -v 'build' && cd 'build' ; \
7979 ../configure && make -j $(nproc) && make install; \
8080 cd - && rm -fr build
8181
82- # Required: bison >= 3.0.0 (not installed by deafult )
82+ # Required: bison >= 3.0.0 (not installed by default )
8383RUN source scl_source enable devtoolset-7; set -eux; \
8484 /root/download-src.sh bison https://mirrors.kernel.org/gnu/bison/bison-3.7.3.tar.gz; \
8585 cd "${SRC_DIR}/bison" ; \
8686 mkdir -v 'build' && cd 'build' ; \
8787 ../configure && make -j $(nproc) && make install; \
8888 cd - && rm -fr build
8989
90- # Required: re2c >= 0.13.4 (not installed by deafult )
90+ # Required: re2c >= 0.13.4 (not installed by default )
9191RUN source scl_source enable devtoolset-7; set -eux; \
9292 /root/download-src.sh re2c https://github.com/skvadrik/re2c/releases/download/2.0.3/re2c-2.0.3.tar.xz; \
9393 cd "${SRC_DIR}/re2c" ; \
@@ -112,16 +112,26 @@ RUN set -eux; \
112112 cmake --build build/ --target install; \
113113 cd - && rm -fr build
114114
115-
116- # Required: libzip >= 0.11 (default version is 0.9)
115+ # Required: libzip >= 1.10 (build it against our OpenSSL/zlib)
117116RUN source scl_source enable devtoolset-7; set -eux; \
118- /root/download-src.sh libzip https://libzip.org/download/libzip-1.7.3 .tar.gz; \
117+ /root/download-src.sh libzip https://libzip.org/download/libzip-1.10.1 .tar.gz; \
119118 cd "${SRC_DIR}/libzip" ; \
120- mkdir build && cd build; \
121- cmake .. && make -j $(nproc) && make install; \
119+ rm -rf build && mkdir build && cd build; \
120+ cmake .. \
121+ -DCMAKE_INSTALL_PREFIX=/usr/local \
122+ -DBUILD_SHARED_LIBS=ON \
123+ -DENABLE_OPENSSL=ON \
124+ -DOPENSSL_ROOT_DIR=/usr/local/openssl \
125+ -DOPENSSL_CRYPTO_LIBRARY=/usr/local/openssl/lib/libcrypto.so \
126+ -DOPENSSL_SSL_LIBRARY=/usr/local/openssl/lib/libssl.so \
127+ -DOPENSSL_INCLUDE_DIR=/usr/local/openssl/include \
128+ -DZLIB_ROOT=/usr/local/zlib \
129+ -DCMAKE_INSTALL_RPATH=/usr/local/openssl/lib; \
130+ make -j $(nproc) && make install; \
131+ ldconfig; \
122132 cd - && rm -fr build
123133
124- # PHP 8.4 requires OpenSSL >= 1.1.1
134+ # PHP 8.4+ requires OpenSSL >= 1.1.1
125135RUN source scl_source enable devtoolset-7; set -ex; \
126136 /root/download-src.sh openssl https://openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz; \
127137 cd "${SRC_DIR}/openssl" ; \
@@ -143,12 +153,12 @@ RUN source scl_source enable devtoolset-7; set -ex; \
143153 make -j $(nproc) && make install; \
144154 cd - && rm -fr build
145155
146- # PHP 8.4 requires curl >= 7.61.0
156+ # PHP 8.4 requires curl >= 7.61.0 (link it to OpenSSL 1.1.1 we just built)
147157RUN source scl_source enable devtoolset-7; set -ex; \
148158 /root/download-src.sh curl https://curl.se/download/curl-7.61.1.tar.gz; \
149159 cd "${SRC_DIR}/curl" ; \
150160 mkdir -v 'build' && cd 'build' ; \
151- ../configure --prefix=/usr/local/curl; \
161+ ../configure --prefix=/usr/local/curl --with-ssl=/usr/local/openssl ; \
152162 make -j $(nproc) && make install; \
153163 cd - && rm -fr build
154164
@@ -165,10 +175,6 @@ ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/lib6
165175
166176# Caution, takes a very long time! Since we have to build one from source,
167177# I picked LLVM 17, which matches Rust 1.76.
168- # Ordinarily we leave sources, but LLVM is 2GiB just for the sources...
169- # Minimum: libclang. Nice-to-have: full toolchain including linker to play
170- # with cross-language link-time optimization. Needs to match rustc -Vv's llvm
171- # version.
172178RUN source scl_source enable devtoolset-9 \
173179 && yum install -y python3 \
174180 && /root/download-src.sh ninja https://github.com/ninja-build/ninja/archive/refs/tags/v1.11.0.tar.gz \
@@ -214,7 +220,6 @@ RUN source scl_source enable devtoolset-7 \
214220ARG RUST_VERSION="1.84.1"
215221ARG RUST_SHA256_ARM="be89f6ad9b70cc4b25182ae299f94ab047a713a51fddf95284823c8afe4aef85"
216222ARG RUST_SHA256_X86="106c89f23ce1c763fcbea8e2714b2ba869bf7af70804813987a4483896398933"
217- # Mount a cache into /rust/cargo if you want to pre-fetch packages or something
218223ENV CARGO_HOME=/rust/cargo
219224ENV RUSTUP_HOME=/rust/rustup
220225RUN source scl_source enable devtoolset-7 \
@@ -256,4 +261,6 @@ ENV BASH_ENV="/etc/profile.d/zzz-ddtrace.sh"
256261
257262ENV PATH="/rust/cargo/bin:${PATH}"
258263
264+ ENV LD_LIBRARY_PATH="/usr/local/openssl/lib:${LD_LIBRARY_PATH}"
265+
259266RUN echo '#define SECBIT_NO_SETUID_FIXUP (1 << 2)' > '/usr/include/linux/securebits.h'
0 commit comments