Replies: 1 comment
-
|
Watcher is an external library that must be installed separately. Alternatively, use the https://frankenphp.dev/docs/compile/#install-optional-dependencies |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to build a custom FrankenPHP binary on CachyOS (Arch Linux derivative) that includes the
cloudflareDNS module, usingxcaddy.I'm consistently encountering a build error related to the internal
watcher.cfile trying to include a missing header.Environment:
go1.24.48.4.8(php-configis working correctly)https://github.com/dunglas/frankenphp.gitxcaddycommand used:go buildwith custommain.goandreplacedirectives, leading to the same C compilation error.)Problem Description:
During the build process, the C compiler fails with a
fatal error: wtr/watcher-c.h: No such file or directoryininternal/watcher/watcher.c.Error Output:
What I've investigated/verified:
internal/watcher/wtr/watcher-c.hdoes not exist in the cloned repository (neither inv1.7.0tag normainbranch aftergit pull).ls -l internal/watcher/shows onlywatcher.h,watcher.c, etc., but nowtr/subdirectory.ls -l internal/watcher/wtr/returns "No such file or directory".watcher.cContent: Thewatcher.cfile explicitly includes"wtr/watcher-c.h"on line 5.php-config:CGO_CFLAGSandCGO_LDFLAGSare correctly set viaphp-config.systemd-logind/AppArmor: These are running correctly and not showing any related errors.replacedirective in the customgo.mod),go list -f '{{.Dir}}' github.com/dunglas/frankenphpcorrectly points to the local cloned repository (/home/markc/Dev/frankenphp), so the build should be using the local source.Conclusion:
It appears there's a mismatch in the FrankenPHP source code itself (at least in
v1.7.0andmainbranch as of today, July 1st, 2025). Thewatcher.cfile is attempting to include a header (wtr/watcher-c.h) that does not exist at the expected path within the repository's internal structure. It seemswatcher.his present atinternal/watcher/watcher.h, but is not being included correctly or doesn't contain the necessary definitions.Could you please advise on how to resolve this? Is there a missing file, an incorrect include path in
watcher.c, or a specific build step/dependency for thiswtrcomponent that I'm overlooking?Beta Was this translation helpful? Give feedback.
All reactions