mainMIT/GNU Scheme - Support: sr #110702, Can't compile on Openbsd 7.2


sr #110702: Can't compile on Openbsd 7.2

Submitter:  r-earman <rearman>
Submitted:  Sat 27 Aug 2022 12:27:31 PM UTC
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  *BSD
* Mandatory Fields

Add a New Comment Rich Markup

Mon 29 Aug 2022 10:31:10 PM UTC, comment #2: 

Looks like this occurs in './src/microcode/ux.c'.

mmap on OpenBSD returns 'ENOTSUP' in this case.  Maybe add a 'perror' call (or even a custom warning about W^X)?

Also see for more info.

Tir Kaval <tir_kaval>
Sat 27 Aug 2022 02:17:55 PM UTC, comment #1: 

This happens because MIT Scheme currently requires a writable and executable heap, which OpenBSD forbids by default.

You may be able to work around this by building MIT Scheme on a file system mounted with the `wxallowed' option:

The solution is to move executable code out of the regular heap in MIT Scheme, but it takes a lot of engineering work to make that happen.

Taylor R. Campbell <riastradh>
Group Member
Sat 27 Aug 2022 12:27:31 PM UTC, original submission:  

Trying to compile with release binaries for 11.2 - tried with gmake and make, both as root and regular user
After applying

it will get past the FILE * error, but now I am getting this:

(cd x11 && make)
echo '(sf "x11-const")' | ../run-build --batch-mode
unable to mmap executable heap -- native code will probably FailSegmentation fault (core dumped)
* Error 139 in x11 (Makefile:1310 'x11-const.bin')
* Error 2 in ~/src/mit-scheme-11.2/src (Makefile:644 'compile-x11-c')

output from cc --version is
OpenBSD clang version 13.0.0
Target: amd64-unknown-openbsd7.2
Thread model: posix
InstalledDir: /usr/bin

I haven't been able to find much on what would cause this mmap issue - any insight is greatly appreciated.

r-earman <rearman>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by tir_kaval (Posted a comment)
  • -email is unavailable- added by riastradh (Posted a comment)
  • -email is unavailable- added by rearman (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-6ae7.
    Corresponding source code