Bug 281198 - lang/sbcl: fails to build when W^X protection is activated
Summary: lang/sbcl: fails to build when W^X protection is activated
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kirill Ponomarev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-01 19:43 UTC by Älven
Modified: 2025-11-14 18:33 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (krion)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Älven freebsd_committer freebsd_triage 2024-09-01 19:43:06 UTC
With kern.elf64.allow_wx: 1 build is OK.
With kern.elf64.allow_wx: 0 build fails with this message:

(cd /wrkdirs/usr/ports/lang/sbcl/work/sbcl-2.4.8 && /bin/sh make.sh --prefix="/usr/local" --xc-host="/wrkdirs/usr/ports/lang/sbcl/work/sbcl-1.2.7-x86-64-freebsd/src/runtime/sbcl --core /wrkdirs/usr/ports/lang/sbcl/work/sbcl-1.2.7-x86-64-freebsd/output/sbcl.core --noinform --disable-debugger --no-sysinit --no-userinit" --with-sb-core-compression --with-gencgc --without-mark-region-gc --without-sb-linkable-runtime --without-sb-qshow --without-sb-safepoint --without-sb-thruption --without-sb-wtimer --without-sb-simd --with-sb-thread --with-sb-unicode --without-sb-xref-for-internals)
exec_new_vmspace: mapping stack size 0x20000000 prot 0x7 failed, mach error 2 errno 13
Abort trap
No working host Common Lisp implementation.
See ./INSTALL, the "SOURCE DISTRIBUTION" section
Comment 1 Älven freebsd_committer freebsd_triage 2024-09-01 20:02:36 UTC
P.S. I know, some language runtimes require allow_wx=1, so may be just works as intended?
Comment 2 Sean McBride 2025-11-14 18:33:58 UTC
I've just run into something similar myself.  In my case I was trying to use `pgloader` (which uses sbcl) which was failing with:

```
# pgloader --version
mmap: Permission denied
fatal error encountered in SBCL pid 8184 pthread 0x8006f6008:
GC invariant lost, file "hopscotch.c", line 187
```

I suggested to the sbcl project improving their error message: https://bugs.launchpad.net/sbcl/+bug/2131571

Just adding this note in case it can help others.