From 705de8a68c17f8022654a2a909c32563be50703e Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 3 Jun 2024 14:06:39 -0400 Subject: [PATCH 1/3] version bump to 1.5.1.dev --- lib/rake_compiler_dock/version.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rake_compiler_dock/version.rb b/lib/rake_compiler_dock/version.rb index d5e40e89..55a255a8 100644 --- a/lib/rake_compiler_dock/version.rb +++ b/lib/rake_compiler_dock/version.rb @@ -1,4 +1,4 @@ module RakeCompilerDock - VERSION = "1.5.0" - IMAGE_VERSION = "1.5.0" + VERSION = "1.5.1.dev" + IMAGE_VERSION = "1.5.1.dev" end From b2ccb653a0b4b87a3045485d3f227afe92c8d968 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 3 Jun 2024 13:58:13 -0400 Subject: [PATCH 2/3] On manylinux, DEVTOOLSET_ROOTPATH doesn't contain pkg-config Stop creating a broken link to it. --- Dockerfile.mri.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.mri.erb b/Dockerfile.mri.erb index 69a5423f..e56dfda2 100644 --- a/Dockerfile.mri.erb +++ b/Dockerfile.mri.erb @@ -226,7 +226,7 @@ RUN mv /opt/osxcross/target/bin/<%= target %>-strip /opt/osxcross/target/bin/<%= RUN echo "export PATH=\$DEVTOOLSET_ROOTPATH/usr/bin:\$PATH" >> /etc/rubybashrc # Add prefixed versions of compiler tools -RUN for f in addr2line gcc gcov-tool ranlib ar dwp gcc-ranlib nm readelf as elfedit gcc-ar gprof objcopy size c++filt g++ gcov ld objdump strings cpp gcc-nm pkg-config strip ; do ln -sf $DEVTOOLSET_ROOTPATH/usr/bin/$f $DEVTOOLSET_ROOTPATH/usr/bin/<%= target %>-$f ; done +RUN for f in addr2line gcc gcov-tool ranlib ar dwp gcc-ranlib nm readelf as elfedit gcc-ar gprof objcopy size c++filt g++ gcov ld objdump strings cpp gcc-nm strip ; do ln -sf $DEVTOOLSET_ROOTPATH/usr/bin/$f $DEVTOOLSET_ROOTPATH/usr/bin/<%= target %>-$f ; done # Use builtin functions of newer gcc to avoid linker issues on Musl based Linux # TODO: remove in v1.6.0 once musl builds have been out for full minor release cycle, see 864be5b2 From d26db4db04276170431c73413404d9d772b42067 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 3 Jun 2024 14:05:42 -0400 Subject: [PATCH 3/3] on manylinux, build and install a modern pkg-config --- Dockerfile.mri.erb | 4 ++++ build/mk_pkg_config.sh | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 build/mk_pkg_config.sh diff --git a/Dockerfile.mri.erb b/Dockerfile.mri.erb index e56dfda2..0a2899bb 100644 --- a/Dockerfile.mri.erb +++ b/Dockerfile.mri.erb @@ -233,6 +233,10 @@ RUN for f in addr2line gcc gcov-tool ranlib ar dwp gcc-ranlib nm readelf as elfe COPY build/math_h.patch /root/ RUN cd /usr/include/ && \ patch -p1 < /root/math_h.patch + +# Update pkg-config because the distro ships 0.27.1 which is old and has bugs and performance issues. +COPY build/mk_pkg_config.sh /root/ +RUN /root/mk_pkg_config.sh <% end %> <% if platform =~ /arm64-darwin/ %> diff --git a/build/mk_pkg_config.sh b/build/mk_pkg_config.sh new file mode 100755 index 00000000..2b1661ee --- /dev/null +++ b/build/mk_pkg_config.sh @@ -0,0 +1,24 @@ +#! /usr/bin/env bash + +set -o errexit +set -o pipefail +set -x + +# sha256 from https://lists.freedesktop.org/archives/pkg-config/2017-March/001084.html +TARFILE=pkg-config-0.29.2.tar.gz +DIR=pkg-config-0.29.2 +CHECKSUM=6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591 + +cd /tmp + +wget https://pkgconfig.freedesktop.org/releases/${TARFILE} +sha256sum ${TARFILE} | grep "${CHECKSUM}" + +tar -xzvf ${TARFILE} +cd $DIR + +./configure --prefix=/usr/local +make install + +pkg-config --version +echo "OK"