Emacs suddenly started throwing file-missing doing vfork errors on startup. Turned out to be an emacs-sqlite compilation issue.
The Problem
Emacs GUI wouldn’t start properly, showing error:
file-missing doing vfork
Debug Process
Normally I’d run emacs --debug-init, but that doesn’t launch the GUI on macOS. Had to find the actual binary:
# Navigate to the actual Emacs executable
cd /Applications/Emacs.app/Contents/MacOS
./Emacs --debug-init
This showed the real culprit: org-roam database sync was failing when calling emacsql-sqlite.
The Cause
Issue was documented in Doom #6809 - emacs-sqlite module needed to be rebuilt.
The Fix
Quick way (manual rebuild):
M-x emacsql-sqlite-compile
Better way from Doom #7099:
# Rebuild all native modules
doom sync
Restart Emacs. Database sync works again.
Lesson
When Emacs GUI won’t start with cryptic errors:
- Don’t use
emacs --debug-initfrom terminal - Run the actual binary in
/Applications/.../MacOS/with--debug-init - Check for native module compilation issues
Native compiled modules (like emacsql-sqlite) can break after system updates or Emacs upgrades.
