[MacPorts] #44705: fswatch @1.3.9 submission
MacPorts
noreply at macports.org
Tue Aug 19 13:53:15 PDT 2014
#44705: fswatch @1.3.9 submission
------------------------------------+--------------------------------
Reporter: enrico.m.crisostomo@… | Owner: macports-tickets@…
Type: submission | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.3.1
Resolution: fixed | Keywords:
Port: fswatch |
------------------------------------+--------------------------------
Comment (by enrico.m.crisostomo@…):
Replying to [comment:9 cal@…]:
> Oh well, it doesn't seem like fswatch works at all on 10.6; it seems to
require APIs that were not present until 10.7:
>
> {{{
> /opt/local/bin/clang++-mp-3.4 -DHAVE_CONFIG_H -I. -I/opt/local/include
-pipe -Os -arch x86_64 -stdlib=libstdc++ -std=c++11 -Wall -MT
poll_monitor.o -MD -MP -MF .deps/poll_monitor.Tpo -c -o poll_monitor.o
poll_monitor.cpp
> mv -f .deps/event.Tpo .deps/event.Po
> /opt/local/bin/clang++-mp-3.4 -DHAVE_CONFIG_H -I. -I/opt/local/include
-pipe -Os -arch x86_64 -stdlib=libstdc++ -std=c++11 -Wall -MT
inotify_monitor.o -MD -MP -MF .deps/inotify_monitor.Tpo -c -o
inotify_monitor.o inotify_monitor.cpp
> mv -f .deps/inotify_monitor.Tpo .deps/inotify_monitor.Po
> mv -f .deps/monitor.Tpo .deps/monitor.Po
> mv -f .deps/fswatch_log.Tpo .deps/fswatch_log.Po
> mv -f .deps/path_utils.Tpo .deps/path_utils.Po
> fsevent_monitor.cpp:49:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemCreated'; did you mean
'kFSEventStreamEventFlagUserDropped'?
> flags.push_back({ kFSEventStreamEventFlagItemCreated,
event_flag::Created});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagUserDropped
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:309:3:
note: 'kFSEventStreamEventFlagUserDropped' declared here
> kFSEventStreamEventFlagUserDropped = 0x00000002,
> ^
> fsevent_monitor.cpp:50:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemRemoved'; did you mean
'kFSEventStreamEventFlagUserDropped'?
> flags.push_back({ kFSEventStreamEventFlagItemRemoved,
event_flag::Removed});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagUserDropped
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:309:3:
note: 'kFSEventStreamEventFlagUserDropped' declared here
> kFSEventStreamEventFlagUserDropped = 0x00000002,
> ^
> fsevent_monitor.cpp:51:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemInodeMetaMod'; did you mean
'kFSEventStreamEventFlagUserDropped'?
> flags.push_back({ kFSEventStreamEventFlagItemInodeMetaMod,
event_flag::PlatformSpecific});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagUserDropped
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:309:3:
note: 'kFSEventStreamEventFlagUserDropped' declared here
> kFSEventStreamEventFlagUserDropped = 0x00000002,
> ^
> fsevent_monitor.cpp:52:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemRenamed'; did you mean
'kFSEventStreamEventFlagUserDropped'?
> flags.push_back({ kFSEventStreamEventFlagItemRenamed,
event_flag::Renamed});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagUserDropped
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:309:3:
note: 'kFSEventStreamEventFlagUserDropped' declared here
> kFSEventStreamEventFlagUserDropped = 0x00000002,
> ^
> fsevent_monitor.cpp:53:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemModified'; did you mean
'kFSEventStreamEventFlagUserDropped'?
> flags.push_back({ kFSEventStreamEventFlagItemModified,
event_flag::Updated});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagUserDropped
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:309:3:
note: 'kFSEventStreamEventFlagUserDropped' declared here
> kFSEventStreamEventFlagUserDropped = 0x00000002,
> ^
> fsevent_monitor.cpp:54:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemFinderInfoMod'; did you mean
'kFSEventStreamEventFlagKernelDropped'?
> flags.push_back({ kFSEventStreamEventFlagItemFinderInfoMod,
event_flag::PlatformSpecific});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagKernelDropped
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:310:3:
note: 'kFSEventStreamEventFlagKernelDropped' declared here
> kFSEventStreamEventFlagKernelDropped = 0x00000004,
> ^
> fsevent_monitor.cpp:55:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemChangeOwner'; did you mean
'kFSEventStreamEventFlagRootChanged'?
> flags.push_back({ kFSEventStreamEventFlagItemChangeOwner,
event_flag::OwnerModified});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagRootChanged
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:344:3:
note: 'kFSEventStreamEventFlagRootChanged' declared here
> kFSEventStreamEventFlagRootChanged = 0x00000020,
> ^
> fsevent_monitor.cpp:56:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemXattrMod'
> flags.push_back({ kFSEventStreamEventFlagItemXattrMod,
event_flag::AttributeModified});
> ^
> fsevent_monitor.cpp:57:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemIsFile'
> flags.push_back({ kFSEventStreamEventFlagItemIsFile,
event_flag::IsFile});
> ^
> fsevent_monitor.cpp:58:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemIsDir'; did you mean
'kFSEventStreamEventFlagUnmount'?
> flags.push_back({ kFSEventStreamEventFlagItemIsDir,
event_flag::IsDir});
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamEventFlagUnmount
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:372:3:
note: 'kFSEventStreamEventFlagUnmount' declared here
> kFSEventStreamEventFlagUnmount = 0x00000080
> ^
> fsevent_monitor.cpp:59:21: error: use of undeclared identifier
'kFSEventStreamEventFlagItemIsSymlink'
> flags.push_back({ kFSEventStreamEventFlagItemIsSymlink,
event_flag::IsSymLink});
> ^
> fsevent_monitor.cpp:128:32: error: use of undeclared identifier
'kFSEventStreamCreateFlagFileEvents'; did you mean
'kFSEventStreamCreateFlagNoDefer'?
> kFSEventStreamCreateFlagFileEvents);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kFSEventStreamCreateFlagNoDefer
>
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:237:3:
note: 'kFSEventStreamCreateFlagNoDefer' declared here
> kFSEventStreamCreateFlagNoDefer = 0x00000002,
> ^
> 12 errors generated.
> make[1]: *** [fsevent_monitor.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> }}}
>
> The compiler change was correct and worked, but there are other
problems. I'd just disable building `fswatch` on all platforms earlier
than 10.7:
>
> {{{#!diff
> Index: Portfile
> ===================================================================
> --- Portfile (revision 124133)
> +++ Portfile (working copy)
> @@ -25,3 +22,13 @@
> checksums rmd160 929cf38c072ed3c5843bc08fd125d0697fecf6f9 \
> sha256
f3e37317155dac122ebc4efef9236f273d03e85051bb2e63198ab5453b0a8c34
> use_zip yes
> +
> +platform darwin {
> + # Doesn't build on SL due to missing APIs, see #44705
> + if {${os.major} <= 10} {
> + pre-fetch {
> + ui_error "$name is not supported on Snow Leopard and
earlier."
> + error "unsupported platform"
> + }
> + }
> +}
> }}}
>
> That makes the compiler blacklist basically useless, but it doesn't hurt
to leave it in just in case.
> OK to commit?
Ok to commit.
10.7 introduced a huge change in that API. There's an Autoconf check but,
as we see, it's insufficient to deliver the proper package configuration.
fswatch _could_ work if it skipped that source file (because it implements
a fall back solution), but I'll have to look into it thoroughly to fix the
Autoconf checks (maybe checking the OS version) and conditionally add that
source file to the source list.
I'll take care of that in the next update.
Thanks again,
-- Enrico
--
Ticket URL: <https://trac.macports.org/ticket/44705#comment:10>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list