Support Erlang/OTP up to 29 and modernize the build#12
Open
maennchen wants to merge 8 commits into
Open
Conversation
Also sync build.config with upstream: it predated erlang.mk's core/beam-cache module, and without it the generated erlang.mk referenced beam-cache-restore-app/-test without defining them, breaking test-build on fresh checkouts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
erts_fprintf is an ERTS-internal symbol that is not part of the public driver API. OTP releases up to 28 happened to export it from the emulator binary, but OTP 29 no longer does, so loading the driver failed with an undefined symbol error. Use plain fprintf(3) instead, which is a drop-in replacement for the stderr diagnostics. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Since OTP 27, erl_scan rejects adjacent string literals without
intervening whitespace ({error,{Line,erl_scan,string_concat}}), which
made file:consult/1 fail on these C-style concatenations copied from
the libsodium test vectors. Insert a space between the literals; the
concatenated values are unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The bare catch expression is deprecated since OTP 28 and emits a compile-time warning. Use the equivalent try ... catch ... end. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Update the matrix to the latest hexpm/erlang alpine images for each OTP major, add 26 through 29, and re-enable 24 (the ssl breakage in 24.3.4.4 is long fixed). Bump checkout and upload-artifact to v7; upload-artifact@v2-preview has been blocked by GitHub since 2025. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Newer Alpine images already ship /usr/bin/python with python3, so a plain ln -s fails the docker build with 'File exists'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With -std=c17, musl's string.h hides the POSIX.1-2008 strnlen declaration, and GCC 14 (Alpine 3.24) turns the resulting implicit declaration into a hard error. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
libsodium's autogen.sh fetches config.guess/config.sub from git.savannah.gnu.org with curl -sL but no -f, so a server error (e.g. 502) is silently written into build-aux/config.sub and configure later dies with 'cannot run /bin/sh ./build-aux/config.sub'. The scripts autoreconf installs are recent enough for every platform we build on, so opt out of the download via DO_NOT_UPDATE_CONFIG_SCRIPTS to keep the build hermetic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
maennchen
added a commit
to maennchen/erlang-jose
that referenced
this pull request
Jul 17, 2026
libsodium's port driver references erts_fprintf, an ERTS-internal symbol that OTP 29 no longer exports, so the driver fails to load and every CT run is flooded with crash reports while the libsodium backend silently falls back. Skip the test dependency on OTP 29 until potatosalad/erlang-libsodium#12 is released; the pure-Erlang and libdecaf backends keep covering those algorithms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
maennchen
added a commit
to maennchen/erlang-jose
that referenced
this pull request
Jul 17, 2026
libsodium's port driver references erts_fprintf, an ERTS-internal symbol that OTP 29 no longer exports, so the driver fails to load: mix test aborts because the application cannot start, and CT floods every run with crash reports while the libsodium backend silently falls back. Skip the test dependency on OTP 29 until potatosalad/erlang-libsodium#12 is released; the pure-Erlang and libdecaf backends keep covering those algorithms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting the
libsodiumapplication failed on OTP 29 withError loading "libsodium_drv": "undefined symbol: erts_fprintf". Fixing that surfaced further incompatibilities with modern OTP and toolchains; this PR addresses them and extends the CI matrix to OTP 23–29.Driver
erts_fprintf(ERTS-internal, no longer exported by OTP 29); use plainfprintf(3)for stderr diagnostics._DEFAULT_SOURCE: with-std=c17, musl hidesstrnlen, and GCC 14 turns the implicit declaration into an error.Test suite
pwhash_scrypttest vectors, rejected byerl_scansince OTP 27. Values unchanged.catchexpression (deprecated since OTP 28) withtry ... catch ... end.Build / CI
build.configwith upstream; the old one predatedcore/beam-cache, leavingbeam-cache-restore-*targets undefined and breakingtest-buildon fresh checkouts.hexpm/erlangAlpine images, re-enabling OTP 24. Bumpactions/checkoutandactions/upload-artifactto v7.ln -sffor the python symlink in the test image; newer Alpine already ships/usr/bin/python.DO_NOT_UPDATE_CONFIG_SCRIPTS=1so libsodium's autogen no longer downloadsconfig.sub/config.guessfrom GNU Savannah, a failed download saves the error page as the script and breaksconfigureintermittently.