[Bug 297225] lang/sbcl: fails to build on FreeBSD 15.x — stale x86-64 bootstrap bi nary segfaults
[email protected] Sun, 02 Aug 2026 00:11:04 +0000
| Newsgroups | gmane.os.freebsd.devel.ports.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297225
Bug ID: 297225
Summary: lang/sbcl: fails to build on FreeBSD 15.x — stale
x86-64 bootstrap binary segfaults
Product: Ports & Packages
Version: Latest
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: [email protected]
Reporter: [email protected]
Assignee: [email protected]
Flags: maintainer-feedback?([email protected])
Category: ports bug
Port: lang/sbcl (sbcl-2.6.7,1)
Problem description:
Building lang/sbcl from source fails on FreeBSD 15.1-STABLE (amd64). The port's
build process uses a prebuilt SBCL binary (sbcl-1.2.7-x86-64-freebsd, dated
~2015) as the cross-compilation host (--xc-host). This bootstrap binary
segfaults immediately when invoked, before it can compile anything:
Segmentation fault (core dumped)
No working host Common Lisp implementation.
See ./INSTALL, the "SOURCE DISTRIBUTION" section
*** Error code 1
Steps to reproduce:
sh
poudriere testport -j <freebsd15-jail> -p <portstree> -o lang/sbcl -i
or simply cd /usr/ports/lang/sbcl && make build on a FreeBSD 15.x amd64 system.
Investigation so far:
Ruled out ASLR: disabling via proccontrol -m aslr -s disable on the bootstrap
binary made no difference.
Ruled out security.bsd.map_at_zero: setting sysctl security.bsd.map_at_zero=1
made no difference.
elfctl -e +noaslr cannot be applied to the binary at all — it predates
FreeBSD's ELF feature-control-note mechanism, so there's no note to toggle.
Tried the port's alternate CCL bootstrap option (OPTIONS_SINGLE_BOOTSTRAP=ABCL
CCL CMUCL SBCL) instead — lang/ccl (1.13, also from ~2015) builds, but its
resulting fx86cl64 binary fails with:
minimal initial mmap: Cannot allocate memory
when trying to reserve its heap at a fixed low address — same underlying class
of problem (old Lisp runtimes assuming fixed-address memory layouts that modern
FreeBSD's memory-mapping policies don't permit), just a different failure mode
(ENOMEM vs SIGSEGV).
Confirmed via sbcl.org/platform-table.html that upstream SBCL has never
published a FreeBSD x86-64 binary newer than 1.2.7 — so there's no simple
drop-in replacement distfile available from the SBCL project itself.
As a local workaround, I used an existing pkg-installed SBCL 2.6.6 to build
2.6.7 by manually substituting it as --xc-host, which built successfully —
confirming the bootstrap binary itself (not the source or build flags) is the
actual blocker.
Suggested directions for a real fix (not something I'm able to submit as a
ready patch, since it'd need a legitimately redistributable binary source
rather than a self-built one):
Point the port's bootstrap fetch at FreeBSD's own official pkg repository build
of sbcl instead of the stale SourceForge tarball, since that binary is already
correctly built for the current release/ABI by the FreeBSD package-build
infrastructure.
Or default BOOTSTRAP to ABCL (JVM-based, sidesteps the fixed-address-mmap issue
entirely) on FreeBSD/amd64 rather than SBCL/CCL, if ABCL is confirmed to
build/work reliably there.
Environment:
FreeBSD 15.1-STABLE amd64
Building via poudriere with lang/sbcl port, default options except as noted
--
You are receiving this mail because:
You are the assignee for the bug.