git: 863f508deeee - main - lang/erlang: Do not add WRKSRC/lib to ERL_LIBS during build

From: Jimmy Olgeni <olgeni_at_FreeBSD.org>
Date: Sun, 18 Oct 2026 09:59:05 UTC
The branch main has been updated by olgeni:

URL: https://cgit.FreeBSD.org/ports/commit/?id=863f508deeee2b3330826e78f4f2e5b23e888639

commit 863f508deeee2b3330826e78f4f2e5b23e888639
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2026-10-16 06:52:36 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2026-10-18 09:57:16 +0000

    lang/erlang: Do not add WRKSRC/lib to ERL_LIBS during build
    
    ERL_LIBS=${WRKSRC}/lib puts the half-populated in-tree lib/*/ebin
    directories on the bootstrap erlc's code path, where they shadow the
    bootstrap compiler.  That breaks whenever a patch release changes an
    API inside the compiler itself.  OTP 28.5.0.8 changes
    beam_ssa_type:opt_start from arity 2 to arity 3, so the freshly
    written beam_ssa_opt.beam gets loaded from lib/compiler/ebin while
    beam_ssa_type still comes from the bootstrap, and the build dies with
    
      beam_ssa_recv.erl: internal error in pass beam_ssa_opt:
      exception error: undefined function beam_ssa_type:opt_start/3
    
    The ordering inside lib/compiler/src is alphabetical, so this is not a
    job race and MAKE_JOBS_UNSAFE, which the error message suggests, does
    not help.
    
    The build system derives its own code paths from ERL_TOP, and
    lang/erlang-runtime2[789] build the same tarballs, doc chunks
    included, without this variable.  Removing it leaves the installed
    file list unchanged.
---
 lang/erlang/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile
index 4ed7e9178bea..2d52e86650d6 100644
--- a/lang/erlang/Makefile
+++ b/lang/erlang/Makefile
@@ -28,7 +28,6 @@ CONFIGURE_ARGS=	--enable-dirty-schedulers \
 		--enable-smp-support \
 		--enable-threads
 MAKE_ARGS=	all
-MAKE_ENV+=	ERL_LIBS=${WRKSRC}/lib
 
 _ERLANG_LIB=	${PORTNAME}