Skip to content

[build] macOS support (without trivial-main-thread) - #5

Open
egbulmer wants to merge 2 commits into
fosskers:masterfrom
egbulmer:macos-support
Open

[build] macOS support (without trivial-main-thread)#5
egbulmer wants to merge 2 commits into
fosskers:masterfrom
egbulmer:macos-support

Conversation

@egbulmer

Copy link
Copy Markdown

This is identical to #2 except with the trivial-main-thread parts reverted and an update to the README. Further to #2 (comment), I can confirm that it works on my MacBook. I found that I also had to disable the floating point traps when running with SBCL.

Thanks @fosskers for this fantastic library and @takeiteasy for the initial macOS support.

@fosskers

Copy link
Copy Markdown
Owner

Neat! Thanks for this - I'll review as soon as I'm able.

Comment thread README.org

(defun main ()
,#+darwin
(trivial-main-thread:with-body-in-main-thread ()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, so it looks like trivial-main-thread concerns can be pushed to the level of the application and be kept out of the lib.

Comment thread README.org
,#+darwin
(trivial-main-thread:with-body-in-main-thread ()
,#+sbcl
(sb-int:set-floating-point-modes :traps '())

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea why this ended up being necessary?

@egbulmer egbulmer May 30, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this explanation in the cl-glfw3 library and a few discussions around similar problems (1, 2). Given that comment, it may be that only the window initialisation code needs to have floating point traps disabled. I'll do some tests to confirm.

Update: I ran a quick test and unfortunately it seems that drawing calls such as (rl:end-drawing) also trigger the traps.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger, thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants