-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
box2d: Do not force warnings as errors by default #25815
Conversation
Conan v1 pipeline ❌Warning Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement. Sorry, the build is only launched for Access Request users. You can request access writing in this issue. Conan v2 pipeline ❌
The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping Sorry, the build is only launched for Access Request users. You can request access writing in this issue. |
Please help @memsharded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
recipes/box2d/all/conanfile.py
Outdated
@@ -78,6 +78,7 @@ def source(self): | |||
def generate(self): | |||
tc = CMakeToolchain(self) | |||
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" | |||
tc.variables["CMAKE_CXX_FLAGS"] = "-O3 -ftree-vectorize -fopt-info-vec -Wno-pass-failed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @skhaz - thanks for your contribution.
Doing it this way does not take into account the compiler - they are passed unconditionally to all compilers regardless of whether they understand those particular flags. Additionally, -O3
would trample and override the user's build_type setting - since it is being applied unconditionally.
This looks like a bug in the upstream recipe itself - I would first ensure that it is, at the very least, reported upstream to the maintainers: https://github.com/erincatto/box2d
In this instance, however I would possibly advise simply setting
tc.cache_variables["CMAKE_COMPILE_WARNING_AS_ERROR"] = False
since this is failing on emscriptem because this setting is too strict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I have updated my pull request and raised an issue on box2d repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @skhaz happy to see that you reported an issue upstream, I'm sure they'll appreciate it :)
The current workaround looks good to me to get this to compile, and if a new version is generated with upstream's fix, we'll be happy to add it :)
Thank you @AbrilRBS. I will keep an eye and when they provide a fix I will let you know. |
Thanks @skhaz ! Running this on CI - please let us know if with that setting, it at least lets you proceed :D |
Is there a way to test this branch locally, I mean, instead of conan pulling the packages specs from the main repository/internet, fetch from my branch? |
and then add |
First of all, sorry if I commenting in the wrong place. I was also trying to use box2d/3.0.0 with emsdk/3.1.50, and I also got errors a la:
I tried with the changes merged into master here, but it didn't fix the issue for me. Then, just for testing, I checked out conan-center-index and added this line instead in
After exporting using |
Summary
Changes to recipe: box2d/3.0.0
Motivation
This (hopefully) closes #25797
Details
Box2D compiles on Linux, Windows, and macOS, but not for WebAssembly using emsdk. This PR attempts to address the compilation error I’m encountering and should not impact other users.