This is a reported issue on MacOS 13.3 Here is the issue on github for more context
opened 04:04AM - 13 Oct 23 UTC
Compile the project from source will complain like below
```
/usr/local/includ… e/hwy/targets.h:303:44: error: use of undeclared identifier 'HWY_AVX3_ZEN4'
/usr/local/include/hwy/targets.h:171:28: note: expanded from macro 'HWY_CHOSEN_TARGET_MASK_TARGETS'
(HWY_CHOSEN_TARGET_SHIFT(HWY_TARGETS) | HWY_CHOSEN_TARGET_MASK_SCALAR | 1LL)
^
/usr/local/include/hwy/detect_targets.h:468:58: note: expanded from macro 'HWY_TARGETS'
(HWY_ATTAINABLE_TARGETS & ((HWY_STATIC_TARGET - 1LL) | HWY_STATIC_TARGET))
^
/usr/local/include/hwy/detect_targets.h:374:28: note: expanded from macro 'HWY_STATIC_TARGET'
#define HWY_STATIC_TARGET (HWY_ENABLED_BASELINE & -HWY_ENABLED_BASELINE)
^
/usr/local/include/hwy/detect_targets.h:367:30: note: expanded from macro 'HWY_ENABLED_BASELINE'
#define HWY_ENABLED_BASELINE HWY_ENABLED(HWY_BASELINE_TARGETS)
^
/usr/local/include/hwy/detect_targets.h:170:19: note: expanded from macro 'HWY_ENABLED'
((targets) & ~((HWY_DISABLED_TARGETS) | (HWY_BROKEN_TARGETS)))
```
The system is macos and it has highway 1.0.3. So I have to uninstall the highway
Then errors about lcms2 pop out.
```
/usr/local/include/lcms2.h:1291:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
typedef cmsInt32Number (* cmsSAMPLER16) (CMSREGISTER const cmsUInt16Number In[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1292:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER cmsUInt16Number Out[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1293:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER void * Cargo);
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1295:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
typedef cmsInt32Number (* cmsSAMPLERFLOAT)(CMSREGISTER const cmsFloat32Number In[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1296:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER cmsFloat32Number Out[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1297:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER void * Cargo);
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
```
My project grok uses another library, highway , using these commands:
set(HWY_ENABLE_EXAMPLES OFF CACHE BOOL "Enable HWY examples")
set(HWY_ENABLE_CONTRIB OFF CACHE BOOL "Enable HWY contrib")
set(HWY_ENABLE_INSTALL OFF CACHE BOOL "Enable HWY install")
set(HWY_FORCE_STATIC_LIBS ON CACHE BOOL "Enable HWY force static libs")
set(INSTALL_GTEST OFF CACHE BOOL "Install GTest")
set(HWY_ENABLE_TESTS OFF CACHE BOOL "Disable tests")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/highway EXCLUDE_FROM_ALL)
and then
target_include_directories(${GROK_CORE_NAME} PRIVATE $<TARGET_PROPERTY:hwy,INTERFACE_INCLUDE_DIRECTORIES>)
However, if an older version of highway is installed via brew install highway,
then compile fails due to usage of installed include directory rather than source include directory for highway. Uninstalling brew highway allows the compile to succeed.
This is not a problem on Linux.
I’ve tried a number of changes, but currently at a loss as to how to fix .
`
target_include_directories(${GROK_CORE_NAME} PRIVATE $<TARGET_PROPERTY:hwy,INTERFACE_INCLUDE_DIRECTORIES>)
Why are you adding the include directory like this?
Just linking the library should be enough.
target_link_libraries(${GROK_CORE_NAME} PRIVATE hwy)
hwy properly makes it’s include directories with the PUBLIC . So linking against the provided target should be sufficient.
buildSystemPerson:
Why are you adding the include directory like this?
Just linking the library should be enough.
target_link_libraries(${GROK_CORE_NAME} PRIVATE hwy)
Yes, I just added that line to make “extra sure” I was compiling against the source include directory, but it made no difference in fact. Still mystified.
Looks like this was a red herring - issue went away after user deleted and re-configured their build folder.