You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of tuist@4.11.0 the opencv-spm dependency (source) fails to compile with an Expected identifier error in the headers.
This is is warned against in their headers…
#if defined(NO)
# warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers.
#endif
The Apple NO macro definition is being pulled in because tuist is setting the GCC_PREFIX_HEADER setting as of this change causing a build conflict.
Please, include this header before any Apple headers.
Open CV headers need to be included before any Apple header and the tuist set prefix header is causing Apple headers to come in automatically first.
If I stop the prefix header from being set (for instance no resources or Objective-C) then things work fine.
How do we reproduce it?
Use the attached project and run tuist install && tuist generate
Yeah, the SPM integration doesn't use GCC_PREFIX_HEADER and we know using it is not ideal as commented here when we initially added this setting (the PR you linked doesn't actually add that flag, it has been there longer).
The fix should be to use -include flags which is what SPM is doing. As mentioned in the linked comment, I wasn't able to get it working in that PR, but we might need to try another time.
We'll put it into our backlog but if you would like to dive deeper into this one, I'm more than happy to provide guidance and pointers to fix this 👀
What happened?
As of
tuist@4.11.0
theopencv-spm
dependency (source) fails to compile with anExpected identifier
error in the headers.This is is warned against in their headers…
The Apple
NO
macro definition is being pulled in becausetuist
is setting theGCC_PREFIX_HEADER
setting as of this change causing a build conflict.Open CV headers need to be included before any Apple header and the tuist set prefix header is causing Apple headers to come in automatically first.
If I stop the prefix header from being set (for instance no resources or Objective-C) then things work fine.
How do we reproduce it?
tuist install && tuist generate
OpenCVTuistExample
appOpenCVTuistExample.zip
Error log
Build OpenCVTuistExample_2024-05-13T12-43-14.txt
macOS version
13.5.2
Tuist version
4.11.0
Xcode version
15.2
The text was updated successfully, but these errors were encountered: