Examples from py310-watchdog, but other versions also fail with same errors.
building '_watchdog_fsevents' extension
cc1: error: unrecognized command line option "-Wno-nullability-completeness"
cc1: error: unrecognized command line option "-Wno-nullability-extension"
error: command '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-watchdog/py310-watchdog/work/compwrap/cc/usr/bin/gcc-4.2' failed with exit code 1
Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-watchdog/py310-watchdog/work/watchdog-1.0.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 setup.py --no-user-cfg build -j4
Exit code: 1
Error: Failed to build py310-watchdog: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-watchdog/py310-watchdog/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port py310-watchdog failed
When using macports-gcc-7
errors differ but build still fails:
:info:build building '_watchdog_fsevents' extension
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeString':
:info:build src/watchdog_fsevents.c:120:23: error: 'kFSEventStreamEventFlagItemCreated' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build if (self->flags & kFSEventStreamEventFlagItemCreated)
:info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build kFSEventStreamEventFlagItemCloned
:info:build src/watchdog_fsevents.c:120:23: note: each undeclared identifier is reported only once for each function it appears in
:info:build src/watchdog_fsevents.c:122:23: error: 'kFSEventStreamEventFlagItemRemoved' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build if (self->flags & kFSEventStreamEventFlagItemRemoved)
:info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build kFSEventStreamEventFlagItemCloned
:info:build src/watchdog_fsevents.c:124:23: error: 'kFSEventStreamEventFlagItemRenamed' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemRemoved'?
:info:build if (self->flags & kFSEventStreamEventFlagItemRenamed)
:info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build kFSEventStreamEventFlagItemRemoved
:info:build src/watchdog_fsevents.c:126:23: error: 'kFSEventStreamEventFlagItemModified' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemRenamed'?
:info:build if (self->flags & kFSEventStreamEventFlagItemModified)
:info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build kFSEventStreamEventFlagItemRenamed
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsCreated':
:info:build src/watchdog_fsevents.c:172:26: error: 'kFSEventStreamEventFlagItemCreated' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsCreated, kFSEventStreamEventFlagItemCreated)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsRemoved':
:info:build src/watchdog_fsevents.c:173:26: error: 'kFSEventStreamEventFlagItemRemoved' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsRemoved, kFSEventStreamEventFlagItemRemoved)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsInodeMetaMod':
:info:build src/watchdog_fsevents.c:174:31: error: 'kFSEventStreamEventFlagItemInodeMetaMod' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsInodeMetaMod, kFSEventStreamEventFlagItemInodeMetaMod)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsRenamed':
:info:build src/watchdog_fsevents.c:175:26: error: 'kFSEventStreamEventFlagItemRenamed' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsRenamed, kFSEventStreamEventFlagItemRenamed)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsModified':
:info:build src/watchdog_fsevents.c:176:27: error: 'kFSEventStreamEventFlagItemModified' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsModified, kFSEventStreamEventFlagItemModified)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsItemFinderInfoMod':
:info:build src/watchdog_fsevents.c:177:36: error: 'kFSEventStreamEventFlagItemFinderInfoMod' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsItemFinderInfoMod, kFSEventStreamEventFlagItemFinderInfoMod)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsChangeOwner':
:info:build src/watchdog_fsevents.c:178:30: error: 'kFSEventStreamEventFlagItemChangeOwner' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsChangeOwner, kFSEventStreamEventFlagItemChangeOwner)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsXattrMod':
:info:build src/watchdog_fsevents.c:179:27: error: 'kFSEventStreamEventFlagItemXattrMod' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsXattrMod, kFSEventStreamEventFlagItemXattrMod)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsFile':
:info:build src/watchdog_fsevents.c:180:23: error: 'kFSEventStreamEventFlagItemIsFile' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsFile, kFSEventStreamEventFlagItemIsFile)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsDirectory':
:info:build src/watchdog_fsevents.c:181:28: error: 'kFSEventStreamEventFlagItemIsDir' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemCloned'?
:info:build FLAG_PROPERTY(IsDirectory, kFSEventStreamEventFlagItemIsDir)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'NativeEventTypeIsSymlink':
:info:build src/watchdog_fsevents.c:182:26: error: 'kFSEventStreamEventFlagItemIsSymlink' undeclared (first use in this function); did you mean 'kFSEventStreamEventFlagItemIsHardlink'?
:info:build FLAG_PROPERTY(IsSymlink, kFSEventStreamEventFlagItemIsSymlink)
:info:build ^
:info:build src/watchdog_fsevents.c:158:27: note: in definition of macro 'FLAG_PROPERTY'
:info:build if (self->flags & flag) { \
:info:build ^~~~
:info:build src/watchdog_fsevents.c: In function 'watchdog_FSEventStreamCreate':
:info:build src/watchdog_fsevents.c:496:72: error: 'kFSEventStreamCreateFlagFileEvents' undeclared (first use in this function); did you mean 'kFSEventStreamCreateFlagNoDefer'?
:info:build kFSEventStreamCreateFlagNoDefer | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagWatchRoot);
:info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build kFSEventStreamCreateFlagNoDefer
:info:build src/watchdog_fsevents.c: In function 'watchdog_read_events':
:info:build src/watchdog_fsevents.c:614:5: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
:info:build PyEval_InitThreads();
:info:build ^~~~~~~~~~~~~~~~~~
:info:build In file included from /opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/Python.h:130:0,
:info:build from src/watchdog_fsevents.c:22:
:info:build /opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/ceval.h:122:37: note: declared here
:info:build Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
:info:build ^~~~~~~~~~~~~~~~~~
:info:build src/watchdog_fsevents.c: At top level:
:info:build cc1: warning: unrecognized command line option '-Wno-newline-eof'
:info:build cc1: warning: unrecognized command line option '-Wno-nullability-extension'
:info:build cc1: warning: unrecognized command line option '-Wno-nullability-completeness'
:info:build error: command '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-watchdog/py310-watchdog/work/compwrap/cc/opt/local/bin/gcc-mp-7' failed with exit code 1
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-watchdog/py310-watchdog/work/watchdog-1.0.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 setup.py --no-user-cfg build -j4
:info:build Exit code: 1
:error:build Failed to build py310-watchdog: command execution failed
:debug:build Error code: CHILDSTATUS 97178 1
it seems many of these options are only present in 10.7+ (see for example kFSEventStreamEventFlagItemRemoved), which makes it very unlikely to build on any older system.