From 0d6bca58d6d4105fde247e5a7ec6781c4bb50f7c Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 11:57:40 +0200 Subject: [PATCH 1/8] new(mysql.com/v5_7): MySQL 5.7 legacy line (Top 300 #735) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.7 reached EOL 2023-10. Some legacy apps (Rails 5.x, legacy WordPress, custom replication setups) still pin to it. CMake policy version override applied for the vendored boost. Closes part of pkgxdev/pantry#99 (holdout #735). Build expected to need iteration — 5.7 + modern toolchain is rough. --- projects/mysql.com/v5_7/package.yml | 80 +++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 projects/mysql.com/v5_7/package.yml diff --git a/projects/mysql.com/v5_7/package.yml b/projects/mysql.com/v5_7/package.yml new file mode 100644 index 0000000000..9eddfa7307 --- /dev/null +++ b/projects/mysql.com/v5_7/package.yml @@ -0,0 +1,80 @@ +# MySQL 5.7 — legacy line. +# +# 5.7 reached EOL in October 2023 — homebrew dropped its `mysql@5.7` +# formula in 2024. Some legacy applications (Rails 5.x apps, +# WordPress legacy sites, custom replication setups) still pin to +# 5.7 because the 8.0 migration broke their schema or auth modes. +# +# Build is best-effort — 5.7 needs older C++ idioms, boost 1.59, +# OpenSSL 1.0.x patterns. Expect to iterate. +# +# Closes part of pkgxdev/pantry#99 (Top 300 holdout #735). + +distributable: + url: https://cdn.mysql.com/Downloads/MySQL-{{version.marketing}}/mysql-boost-{{version}}.tar.gz + strip-components: 1 + +# Pin to the 5.7.x stream. mysql-server tags use "mysql-5.7.X" format. +versions: + github: mysql/mysql-server/tags + strip: /^mysql-/ + match: /^mysql-5\.7\.\d+$/ + +platforms: + - linux/x86-64 + - linux/aarch64 + - darwin/x86-64 + - darwin/aarch64 + +dependencies: + unicode.org: '*' + libevent.org: ^2 + openssl.org: ^1.1 + zlib.net: ^1 + curl.se: '*' + thrysoee.dk/editline: '*' + +build: + dependencies: + cmake.org: ^3 + gnu.org/bison: '*' + gnu.org/gcc: ^13 # newer gcc rejects 5.7's pre-C++17 patterns + working-directory: build + script: + # 5.7's bundled boost has the old `cmake_minimum_required` which + # CMake 4.x rejects without the policy floor override. + - run: | + export CMAKE_POLICY_VERSION_MINIMUM=3.5 + cmake .. $ARGS + make --jobs {{ hw.concurrency }} install + env: + ARGS: + - -DCMAKE_INSTALL_PREFIX={{prefix}} + - -DCMAKE_BUILD_TYPE=Release + - -DDOWNLOAD_BOOST=0 + - -DWITH_BOOST=../boost # bundled + - -DWITH_SSL=system + - -DWITH_ZLIB=system + - -DWITH_LIBEVENT=system + - -DWITH_EDITLINE=system + - -DENABLED_LOCAL_INFILE=1 + - -DWITHOUT_TOKUDB=1 + - -DWITHOUT_ROCKSDB=1 + - -DWITHOUT_MROONGA=1 + - -DWITHOUT_SPIDER=1 + - -DCMAKE_CXX_STANDARD=17 + +provides: + - bin/mysql + - bin/mysqld + - bin/mysqldump + - bin/mysqladmin + - bin/mysqlimport + - bin/mysqlcheck + - bin/mysqlshow + - bin/mysqlbinlog + - bin/mysql_secure_installation + - bin/mysql_config + +test: + - mysql --version | grep "5\\.7\\." From c80f5f44c60009e97d46bdd0378c52ddb842503d Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 13:29:09 +0200 Subject: [PATCH 2/8] fix(mysql@5.7): use ignore: negative lookahead (github: ignores match:) --- projects/mysql.com/v5_7/package.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/mysql.com/v5_7/package.yml b/projects/mysql.com/v5_7/package.yml index 9eddfa7307..43bd49d926 100644 --- a/projects/mysql.com/v5_7/package.yml +++ b/projects/mysql.com/v5_7/package.yml @@ -17,8 +17,12 @@ distributable: # Pin to the 5.7.x stream. mysql-server tags use "mysql-5.7.X" format. versions: github: mysql/mysql-server/tags + # `github:` mode silently ignores `match:` — only `ignore:` and + # `strip:` are honored. Use negative-lookahead in ignore to keep + # only mysql-5.7.X tags. + ignore: + - /^(?!mysql-5\.7\.)/ strip: /^mysql-/ - match: /^mysql-5\.7\.\d+$/ platforms: - linux/x86-64 From 17af7a18ecf8209194a8c5532d110f29532082f6 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 13:55:12 +0200 Subject: [PATCH 3/8] fix(mysql@5.7): use transform: to filter (ignore: lookahead doesn't work) --- projects/mysql.com/v5_7/package.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/projects/mysql.com/v5_7/package.yml b/projects/mysql.com/v5_7/package.yml index 43bd49d926..d5fa2bf49e 100644 --- a/projects/mysql.com/v5_7/package.yml +++ b/projects/mysql.com/v5_7/package.yml @@ -17,12 +17,15 @@ distributable: # Pin to the 5.7.x stream. mysql-server tags use "mysql-5.7.X" format. versions: github: mysql/mysql-server/tags - # `github:` mode silently ignores `match:` — only `ignore:` and - # `strip:` are honored. Use negative-lookahead in ignore to keep - # only mysql-5.7.X tags. - ignore: - - /^(?!mysql-5\.7\.)/ - strip: /^mysql-/ + # `github:` mode silently ignores `match:`. Negative lookahead in + # `ignore:` also doesn't work (RE2-like regex, no lookahead). + # Use `transform:` instead — return the stripped 5.7.X version for + # matching tags, undefined for everything else. + transform: | + v => { + const m = v.match(/^mysql-(5\.7\.\d+)$/); + return m ? m[1] : undefined; + } platforms: - linux/x86-64 From fb586e8b01c17ba7a470f69b29d64616c9335051 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 15:54:55 +0200 Subject: [PATCH 4/8] new(gnu.org/gcc/v8): GCC 8 for legacy C++ projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Many projects vendoring older C++ libraries (RocksDB 6.3.x in cubefs, InnoDB in MySQL 5.7, pre-C++17 codebases) hit gcc 12+'s stricter copy-ctor / atomic / std::pair-construction rules. They compile cleanly with gcc 8 (last default-C++14 major) but couldn't build in pantry without a 8.x bottle — pkgx CLI returns "ResolveError" on `gnu.org/gcc^8`. This recipe is a thin pin to the 8.x line, parallel to the main gnu.org/gcc recipe. Linux only — darwin's old-SDK situation makes gcc 8 hard to bring up there, and llvm.org clang covers legacy on darwin anyway. Enables follow-up: cubefs.io (#13050) and mysql.com/v5_7 (#13062) can pin `gnu.org/gcc/v8: '*'` to compile their vendored old C++. --- projects/gnu.org/gcc/v8/package.yml | 97 +++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 projects/gnu.org/gcc/v8/package.yml diff --git a/projects/gnu.org/gcc/v8/package.yml b/projects/gnu.org/gcc/v8/package.yml new file mode 100644 index 0000000000..246b0e36e0 --- /dev/null +++ b/projects/gnu.org/gcc/v8/package.yml @@ -0,0 +1,97 @@ +# GCC 8 — legacy version for old-vendored-C++ projects. +# +# Many projects vendoring older C++ libraries (RocksDB 6.3.x, old +# MySQL 5.7, old InnoDB, pre-C++17 codebases generally) hit the +# stricter copy-ctor / atomic / pair-construction rules introduced +# in gcc 12+ libstdc++. They compile cleanly with gcc 8 which was +# the last major to default to C++14 / gnu++14 ABI. +# +# Companion to gnu.org/gcc (latest) for cubefs.io, mysql.com/v5_7, +# and other from-source recipes that can't easily be patched to +# modern C++. + +distributable: + url: https://ftp.gnu.org/gnu/gcc/gcc-{{ version.raw }}/gcc-{{ version.raw }}.tar.xz + strip-components: 1 + +versions: + github: gcc-mirror/gcc/tags + strip: /^releases\/gcc-/ + # Pin to the 8.x line — drop everything else. + ignore: + - /^[0-79]\./ + - /^9\./ + - /^[1-9][0-9]/ + +# Linux only. Darwin's old SDK situation makes gcc 8 hard to bring +# up — users on darwin needing legacy C++ are better off with clang +# from llvm.org which has its own legacy mode. +platforms: + - linux/x86-64 + - linux/aarch64 + +dependencies: + gnu.org/binutils: '*' + gnu.org/gmp: ~6 + gnu.org/mpfr: ~4 + gnu.org/mpc: ~1 + zlib.net: ^1.3 + +build: + dependencies: + linux: + gnu.org/gcc: '*' # bootstrap with current gcc + gnu.org/make: '*' + perl.org: '*' + gnu.org/patch: '*' + curl.se: '*' + github.com/westes/flex: '*' + + working-directory: build + script: + - ARGS=($ARGS --with-pkgversion="pkgx GCC {{version}}") + - ../configure "${ARGS[@]}" + - make --jobs {{ hw.concurrency }} + - make install + + # gcc symlinks expected by some build systems + - run: | + cd "{{prefix}}/bin" + ln -sf gcc cc + ln -sf ../../../binutils/v*/bin/ar ar + ln -sf ../../../binutils/v*/bin/nm nm + ln -sf ../../../binutils/v*/bin/ranlib ranlib + + env: + ARGS: + - --prefix={{ prefix }} + - --libdir={{ prefix }}/lib + - --enable-languages=c,c++,fortran + - --disable-bootstrap + - --disable-nls + - --disable-multilib + - --with-system-zlib + - --with-bugurl=https://github.com/pkgxdev/pantry/issues + linux/x86-64: + LDFLAGS: -fPIC + CFLAGS: -fPIC + CXXFLAGS: -fPIC + +test: + - gcc --version | grep -q "pkgx GCC {{version}}" + - gcc -dumpversion | grep -q "^8\." + +provides: + - bin/ar + - bin/cc + - bin/c++ + - bin/cpp + - bin/g++ + - bin/gcc + - bin/gcc-ar + - bin/gcc-nm + - bin/gcc-ranlib + - bin/gcov + - bin/gfortran + - bin/nm + - bin/ranlib From e7a2f3c4c5720c62a1fee50b13a4a6e96f122f95 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 15:56:56 +0200 Subject: [PATCH 5/8] fix(mysql@5.7): pin gnu.org/gcc/v8 (InnoDB needs pre-C++17 gcc) --- projects/mysql.com/v5_7/package.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/mysql.com/v5_7/package.yml b/projects/mysql.com/v5_7/package.yml index d5fa2bf49e..993a91acb3 100644 --- a/projects/mysql.com/v5_7/package.yml +++ b/projects/mysql.com/v5_7/package.yml @@ -45,7 +45,10 @@ build: dependencies: cmake.org: ^3 gnu.org/bison: '*' - gnu.org/gcc: ^13 # newer gcc rejects 5.7's pre-C++17 patterns + gnu.org/gcc/v8: '*' # MySQL 5.7's vendored InnoDB uses unnamed + # scoped enums + other pre-C++17 idioms that + # gcc 12+ rejects. Use the dedicated gcc 8 + # recipe (companion PR). working-directory: build script: # 5.7's bundled boost has the old `cmake_minimum_required` which From 2e43d7671aa630c9dba37cc6f9c7b1c2f9e89ead Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 16:17:24 +0200 Subject: [PATCH 6/8] fix(gcc/v8): use ../../../../binutils path (v8 subdir is 1 deeper) --- projects/gnu.org/gcc/v8/package.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/gnu.org/gcc/v8/package.yml b/projects/gnu.org/gcc/v8/package.yml index 246b0e36e0..0c6d3aff19 100644 --- a/projects/gnu.org/gcc/v8/package.yml +++ b/projects/gnu.org/gcc/v8/package.yml @@ -54,13 +54,15 @@ build: - make --jobs {{ hw.concurrency }} - make install - # gcc symlinks expected by some build systems + # gcc symlinks expected by some build systems. This recipe lives + # one level deeper than the main gnu.org/gcc (v8 subdir), so the + # relative path to binutils needs `../../../../` (4 levels). - run: | cd "{{prefix}}/bin" ln -sf gcc cc - ln -sf ../../../binutils/v*/bin/ar ar - ln -sf ../../../binutils/v*/bin/nm nm - ln -sf ../../../binutils/v*/bin/ranlib ranlib + ln -sf ../../../../binutils/v*/bin/ar ar + ln -sf ../../../../binutils/v*/bin/nm nm + ln -sf ../../../../binutils/v*/bin/ranlib ranlib env: ARGS: From 18722cbb796557ddff3300f0f2fffd36c799f661 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 16:28:59 +0200 Subject: [PATCH 7/8] =?UTF-8?q?fix(gcc/v8):=20escape=20glob=20in=20ln=20ta?= =?UTF-8?q?rget=20(multi-match=20expands=20=E2=86=92=20ln=20treats=20as=20?= =?UTF-8?q?dest=20dir)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/gnu.org/gcc/v8/package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/gnu.org/gcc/v8/package.yml b/projects/gnu.org/gcc/v8/package.yml index 0c6d3aff19..6854d51a15 100644 --- a/projects/gnu.org/gcc/v8/package.yml +++ b/projects/gnu.org/gcc/v8/package.yml @@ -60,9 +60,9 @@ build: - run: | cd "{{prefix}}/bin" ln -sf gcc cc - ln -sf ../../../../binutils/v*/bin/ar ar - ln -sf ../../../../binutils/v*/bin/nm nm - ln -sf ../../../../binutils/v*/bin/ranlib ranlib + ln -sf ../../../../binutils/v\*/bin/ar ar + ln -sf ../../../../binutils/v\*/bin/nm nm + ln -sf ../../../../binutils/v\*/bin/ranlib ranlib env: ARGS: From 8b826c545030502c7f7ef27c74af3ac28b64aad7 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 31 May 2026 14:09:34 +0200 Subject: [PATCH 8/8] fix(mysql@5.7): scope gcc/v8 to linux + add libstdcxx runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related fixes after seeing CI fail with "pkg not found: gnu.org/gcc/v8" on darwin/aarch64 (29s, before any compile): 1. **gcc/v8 is linux-only**. The companion PR #13070 ships gnu.org/gcc/v8 with `platforms: [linux/x86-64, linux/aarch64]` only. The previous recipe declared it as a top-level build dep, which pkg resolver tried to satisfy on every platform — hence the not-found on darwin. Move the pin under `linux:`. On darwin we follow homebrew's mysql@5.7 lead (the deprecated formula at homebrew-core@44d961a18 — last 5.7.43 commit before deletion): no gcc pin, the system clang compiles 5.7's vendored InnoDB fine. 2. **Runtime libstdcxx pin**. Same lesson as the main mysql recipe in PR #13104: pantry doesn't auto-propagate stdenv.cc.cc.lib into RUNPATH the way nixpkgs does, so the runtime libstdc++.so.6 must be declared explicitly. gcc 8 emits GLIBCXX_3.4.25-ish symver references, which the forward- compatible libstdcxx ^14 satisfies (older symver references resolve against newer libstdc++). 3. **Drop -DCMAKE_CXX_STANDARD=17**. Pinning gcc 8 is precisely to accommodate 5.7's pre-C++17 vendored InnoDB; forcing C++17 on top defeats the point. homebrew's mysql@5.7 doesn't set CXX_STANDARD at all — gcc 8's default (gnu++14) is correct. Also merged the gnu.org/gcc/v8 recipe from #13070 into this branch so CI can resolve the dep without waiting for that PR to land. --- projects/mysql.com/v5_7/package.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/projects/mysql.com/v5_7/package.yml b/projects/mysql.com/v5_7/package.yml index 993a91acb3..cb876e6f14 100644 --- a/projects/mysql.com/v5_7/package.yml +++ b/projects/mysql.com/v5_7/package.yml @@ -40,15 +40,26 @@ dependencies: zlib.net: ^1 curl.se: '*' thrysoee.dk/editline: '*' + linux: + # Runtime libstdc++. gcc 8 produced older GLIBCXX_3.4.25-ish + # symver references which libstdcxx ^14 (forward-compatible) can + # resolve. Same lockstep rationale as the main mysql recipe + # (PR #13104) — pantry doesn't auto-propagate stdenv.cc.cc.lib + # the way nixpkgs does, so the runtime libstdc++ must be + # explicit. + gnu.org/gcc/libstdcxx: ^14 build: dependencies: cmake.org: ^3 gnu.org/bison: '*' - gnu.org/gcc/v8: '*' # MySQL 5.7's vendored InnoDB uses unnamed - # scoped enums + other pre-C++17 idioms that - # gcc 12+ rejects. Use the dedicated gcc 8 - # recipe (companion PR). + linux: + # MySQL 5.7's vendored InnoDB uses unnamed scoped enums + other + # pre-C++17 idioms that gcc 12+ rejects. Use the dedicated gcc 8 + # recipe (companion PR #13070). Linux only — homebrew's + # mysql@5.7 builds fine on darwin with the system clang (which + # is what pantry uses on darwin too), no gcc pin needed. + gnu.org/gcc/v8: '*' working-directory: build script: # 5.7's bundled boost has the old `cmake_minimum_required` which @@ -72,7 +83,9 @@ build: - -DWITHOUT_ROCKSDB=1 - -DWITHOUT_MROONGA=1 - -DWITHOUT_SPIDER=1 - - -DCMAKE_CXX_STANDARD=17 + # Don't force CXX_STANDARD=17 — the whole point of pinning gcc 8 + # is that 5.7's vendored sources are pre-C++17. Let the gcc 8 + # default (gnu++14) apply, matching homebrew's mysql@5.7 build. provides: - bin/mysql