[MacPorts] #74358: emacs-app: add -DFD_SETSIZE=$big_value to fix LSP issues

MacPorts noreply at macports.org
Tue Aug 25 10:13:55 UTC 2026


#74358: emacs-app: add -DFD_SETSIZE=$big_value to fix LSP issues
--------------------------+-----------------------
 Reporter:  ILoveGoulash  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.12.5
 Keywords:                |       Port:  emacs-app
--------------------------+-----------------------
 Hello, since updating emacs-app from 30 to 31.1 (thus the builtin eglot),
 I've been fighting this eglot
 [https://github.com/joaotavora/eglot/discussions/1226 issue] occurring
 with LSPs requiring a massive amount of file watches (in my case,
 [https://pyrefly.org/ Pyrefly]).

 First, I fixed the low system limits shown via `ulimit -n` and `launchctl
 limit maxfiles` via this launchd [https://hiltmon.com/blog/2023/01/01
 /increasing-file-descriptor-ulimit-on-macos/ addition]. But I still got
 pyrefly killing itself.

 Then I finally applied the other recommendation found in that eglot
 discussion (also done by this [https://github.com/d12frosted/homebrew-
 emacs-plus/pull/507 emacs-plus] Homebrew fork) via `sudo port uninstall
 emacs-app && sudo port -s install emacs-app
 configure.cflags="-DFD_SETSIZE=16384"` (is there a cleaner way to force
 reinstall, by the way?) which finally fixed the problem; didn't need the
 dubious sounding `-DDARWIN_UNLIMITED_SELECT`.

 Might be a good idea to either add that or a post-install message to warn
 people?

-- 
Ticket URL: <https://trac.macports.org/ticket/74358>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list