-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avitab does not build on Mac after recent Xcode update #181
Comments
Fixed by #182 |
I was wondering if this issue should remain open until a proper fix can be put in place by updating to the (next?) version of nlohmann/json? The masking of deprecation warnings should be removed from the CMakeLists file at the same time - it's only really intended as a temporary fix. |
Ah, good point. |
Following on from the temporary fix I submitted for the initial build issue, I have used cmake to generate an Xcode project, and this has highlighted some additional source code issues due to the default setting of the -Wconversion flag in the Xcode project (the flag is not set by default in the normal Makefile generator). Many of the build errors are due to the use of an unsigned and/or long int variable as an argument to an int parameter. A lot of these are in the Avitab source and could be fixed with an explicit cast (or an overloaded function with an unsigned/long parameter). However, some of the issues are in third-party sources and cannot be easily fixed. A simple solution is to add the -Wno-conversion compiler flag. This could be done globally in the top-level CMakeLists.txt file. Alternatively the flag could be added only where required (if 3rd party source/header is involved) and the rest of the Avitab sources can be tidied up to remove the warning. I am happy to create a further PR to address this issue. Which approach is preferred? |
Thanks for the investigation! I think that |
Fix build issues in Xcode on Mac OS X (issue #181)
The Avitab build fails on Mac OSX due to a deprecation warning being treated as an error:
I don't regularly build Avitab on the Mac. Since the previous build I have updated Xcode (possibly more than once).
The current compiler version is Apple clang version 15.0.0 (clang-1500.0.40.1). This is based on LLVM, who have issued this deprecation warning and explanation: https://discourse.llvm.org/t/deprecating-std-string-t-for-non-character-t/66779
I checked the nlohmann/json project on github to see if a more recent release would fix this. The latest release still has this issue, however the issue has been reported (nlohmann/json#4163) and is being worked on (nlohmann/json#4179).
I think once the issue is fixed in the nlohmann/json library then Avitab should be updated to reference a fixed version.
The text was updated successfully, but these errors were encountered: