Executing "watchman watch /root" will respond with:
"error": "failed to validate command: Could not resolve /root to the canonical watch path: getOpenedPath not implemented on this platform: Function not implemented"
It looks like the environment variable F_GETPATH is not set, which is used in the source file FileDescriptor.cpp (method FileDescriptor::getOpenedPath() ).
F_GETPATH is only set in a test, grepping for it:
tests/integration/path_utils.py: F_GETPATH = 50
So the method getOpenedPath is not functional...
The older version 4.5.0_1 worked fine...
Thank you for your report.
I only recently took maintainership of this port, and didn't yet review it properly.
I will fix this problem.
Please have a look at this issue. IMHO this port should be marked "broken".
Thanks and best regards,
(In reply to Urs from comment #2)
You are right, but I was semi-working on this and might be able to fix it by figuring out how to do this.
I will mark it broken in case this turns out to be impossible.
This problem is dependent on the symbol F_GETPATH for fcntl(2).
Here is the patch against HEAD that implements it: https://people.freebsd.org/~mjg/F_GETPATH.diff
Based on the Mateusz Guzik's response in hackers@ he might be adding it to 12.1 as well.
This would automatically fix watchman.
uh-oh... Patching the OS to fix watchman?
Watchman 4.5.0_1 did run nicely. Would it be a possibility to revert to this version?
Best regards, Urs
(In reply to Urs from comment #5)
It looks like they added the use of this feature in a later version of watchman that is currently missing.
I'll look into either reverting this change in the code, or following another suggestion from the hackers@ thread - to use realpath(3).
I suggest to revert watchman to an older functioning version... That would be the simplest solution. Could you please do so?
Thanks and best regards, -Urs
A commit references this bug:
Date: Tue Aug 11 22:52:44 UTC 2020
New revision: 544722
New port: sysutils/watchman450: Branch for version 4.5.0 of sysutils/watchman
sysutils/watchman is currently broken because F_GETPATH isn't currently available.
Reported by: Urs <firstname.lastname@example.org>
Suggested by: Urs <email@example.com>