-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys-fs/cryfs: Fixed inapplicable warning message #4772
Conversation
Pull Request assignment Areas affected: ebuilds sys-fs/cryfs: @automorphism88, @gentoo/proxy-maint |
😞 The QA check for this pull request has found the following issues: Issues inherited from Gentoo (may be modified by PR): |
@@ -40,6 +40,9 @@ src_prepare() { | |||
# remove tests that require internet access to comply with Gentoo policy | |||
sed -i -e '/CurlHttpClientTest.cpp/d' -e '/FakeHttpClientTest.cpp/d' test/cpp-utils/CMakeLists.txt || die | |||
|
|||
# remove non-applicable warning caused by cmake-utils setting NDEBUG | |||
sed -i -e '/WARNING! This is a debug build. Performance might be slow./d' src/cryfs-cli/Cli.cpp || die |
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.
Sounds like upstream is doing something really silly. Did you submit a bug and/or a patch removing this?
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.
I assume upstream is counting on the user following their build instructions (or using their precompiled Ubuntu binaries), in which case this warning doesn't appear because CMAKE_BUILD_TYPE=Release
results in -O3 -NDEBUG
being used. I haven't submitted a bug or patch but I'm assuming it'd be blamed on the Gentoo build replacing their flags. Given this is the only place in the code where NDEBUG
is checked for I'm not sure it really matters.
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.
Yes, I suppose that's the case. However, if they want to account for specific CMAKE_BUILD_TYPE, they should really verify CMAKE_BUILD_TYPE rather than the side effects of it.
@@ -40,6 +40,9 @@ src_prepare() { | |||
# remove tests that require internet access to comply with Gentoo policy | |||
sed -i -e '/CurlHttpClientTest.cpp/d' -e '/FakeHttpClientTest.cpp/d' test/cpp-utils/CMakeLists.txt || die | |||
|
|||
# remove non-applicable warning caused by cmake-utils setting NDEBUG |
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.
Err, but the warning is conditional to NDEBUG not being set? I'll remove that explanation because the removal itself makes sense.
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.
Yeah, sorry, it's an #ifndef
in the .cpp file in question. I grepped the complete source tree and this line is the only place NDEBUG
is used.
The Gentoo cmake-utils eclass defines NDEBUG, which makes a warning message appear on the help screen saying "WARNING! This is a debug build. Performance might be slow." which is inaccurate since a build log confirms that the proper CXXFLAGS are applied. Added a line to src_prepare() that removes this message with sed.
Also added ~x86 to KEYWORDS since I tested it in a chroot.