Repository navigation
configure.ac: fix the mmap check with autoconf 2.70 and later - #62
Merged
guillerodriguez merged 1 commit intoOct 14, 2026
Merged
Conversation
In the AC_CHECK_FUNCS list, 'statvfs \' was followed by two spaces, so the backslash quoted a space instead of the newline. Autoconf 2.72 and later then check for ' mmap' instead of 'mmap', HAVE_MMAP is not defined, and FileChannel.map() fails (OpenTypeFontPeer maps its font files this way). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: duncanmcqueen <206344294+duncanmcqueen@users.noreply.github.com>
This was referenced Oct 14, 2026
Contributor
|
Thank you for the fix! One correction: the issue seems to be present since autoconf 2.70, not 2.72. And in fact it is visible in CI: both the Ubuntu job (autoconf 2.71) and the macOS job (autoconf 2.73) show it. I just checked the logs from recent builds: The build completes and all tests pass, but only because the current test suite never exercises I’ll update the PR title to mention autoconf 2.70 instead of 2.72, and will also amend the commit message when merging. |
guillerodriguez
self-requested a review
October 14, 2026 22:08
guillerodriguez
marked this pull request as ready for review
October 14, 2026 22:08
guillerodriguez
approved these changes
Oct 14, 2026
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.
Split from #59.
Problem and fix
In the
AC_CHECK_FUNCSlist inconfigure.ac, the linestatvfs \has two spaces after the backslash. Thus the backslash quotes a space, not the newline.With autoconf 2.72 and later,
configurechecks for a function with the name " mmap" (with a space), not "mmap". The check fails, andHAVE_MMAPis not defined. ThenFileChannel.map()throwsIOException: memory-mapped files not implemented. Also,OpenTypeFontPeercannot load fonts, because it maps the font files.The CI uses Ubuntu 24.04, which has autoconf 2.71. Thus the CI does not show the problem.
This change removes the two spaces.
How to reproduce
Then run this test:
MapFile.javaResults
Linux x86_64, ingelabs/classpath
master(0406074), JamVMmaster,javacfrom JDK 8, autoconf 2.73, automake 1.19, theconfigureoptions of the CI Linux job, out-of-tree build. "Before" ismaster. "After" ismasterwith this commit.Platforms
Not specific to Haiku. The problem occurs on all systems with autoconf 2.72 or later. I reproduced it on Linux.
AI assistance
An AI model (Claude Code, by Anthropic) wrote this change, the test and this text. The repository owner directed the work and checked the results. Please review it as you review other contributions.
🤖 Generated with Claude Code