-
Notifications
You must be signed in to change notification settings - Fork 282
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
Fix command line build for macOS #49
Fix command line build for macOS #49
Conversation
When I get a chance I will test this on mac today. |
I can look into that error. If it is a legit issue, we should probably add a separate issue for it. |
Tested it and they are appearing as warnings to me. What compiler version are you using? Can you post the command line options it is using? |
I'm using Xcode 9 beta 5 (9M202q):
Here is the output of
Yeah, when I try to compile with Xcode 8.3.3 (8E3004b), those errors are appearing as warnings. 🤔 Also, the output of
|
Interesting. You also said the behavior was different when you cloned/build the civetweb repo directly. What command line in that case for Xcode 8.3.3 vs Xcode 9? Are they any different? |
Xcode 8.3.3:
Xcode 9:
Interesting. The flag that triggers these warnings seems to be different in Xcode 8.3.3 (-Wunknown-pragmas) and Xcode 9 (-Wunknown-warning-option). Looks like an implementation change in clang? But that didn't explain why they are appearing as errors in the main project when built with Xcode 9. |
Yeah when just comparing Xcode 9 between the api and civetweb repo, the arguments you posted are different. There must be something about those flags that is causing a difference in behavior. I don't see -Werror in these options, so I am confused why it is showing up as an error. Maybe one of the other flags is indirectly turning errors on for that warning type? From what you posted: Civetweb repo API repo |
You are correct! The -pedantic-errors causes those warnings to be treated as errors. You can try compiling
It's coming from the CMakeLists.txt of civetweb. This explains why |
Also, since these two warning options don't exist (at least for the clang versions we are using), can we remove them so there will be no warnings in the first place? |
These two problematic lines are also inside of civetweb: As you pointed out, it looks like this is an issue with how their CMake target is setup. I can reproduce the same issue in the latest of their master branch. I see their Travis CI jobs are only testing Xcode8, so they may not be aware of the issue. I think we should file an issue in their repository. Do you want to help summarize our findings here and submit that? In the interim, you can work around by compiling with 8.3.3. If the problem still persists after Xcode 9 is officially released, we can try to find a workaround. Thanks for all the help investigating this! |
Sure, I will file an issue in their repo. Thanks for your help! |
@KevinCalderone Hello, issue civetweb/civetweb#503 has been fixed, can we update the dependency to pull the fix in? Thanks! |
Thanks for following up on that! I'm not sure how stable their latest master branch is, but I can at least pull that one fix into our civetweb fork. |
Sounds great, thanks! |
Updated civetweb submodule to fix Xcode9 error. (Pull request #49)
Ok I have updated the submodule. The warning seems to be gone for me. Can you retest it please? |
Yeah, tested with Xcode 9, and it builds fine. Thanks! |
When try to build in command line on macOS (
cmake
without generating Xcode project thenmake
), the build will fail with some errors.Errors in this repo
This pull request fixes an error in the examples.
Erros in the contribs
There are also two errors in one of the dependencies:
When I try to build
KevinCalderone/civetweb
separately, these two errors appear as warnings, not sure why they are errors when build ins2client-api
. Any ideas?