This PR adds the missed definition for AM_OBJCXXFLAGS
which has the same value as AM_CXXFLAGS
.
Otherwise, the compiling flags used by Objective C++ (for .mm
source files) differ from C++ ones including hardening, debug, warning etc options.
AM_OBJCXXFLAGS
#29362
This PR adds the missed definition for AM_OBJCXXFLAGS
which has the same value as AM_CXXFLAGS
.
Otherwise, the compiling flags used by Objective C++ (for .mm
source files) differ from C++ ones including hardening, debug, warning etc options.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
Type | Reviewers |
---|---|
Concept NACK | fanquake |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
0 CXX qt/libbitcoinqt_a-moc_bitcoin.o
1qt/macnotificationhandler.mm:27:9: error: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Werror,-Wdeprecated-declarations]
2 NSUserNotification* userNotification = [[NSUserNotification alloc] init];
3 ^
4/Applications/Xcode_15.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
5[@interface](/bitcoin-bitcoin/contributor/interface/) NSUserNotification : NSObject <NSCopying> {
6 ^
7qt/macnotificationhandler.mm:27:50: error: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Werror,-Wdeprecated-declarations]
8 NSUserNotification* userNotification = [[NSUserNotification alloc] init];
9 ^
10/Applications/Xcode_15.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
11[@interface](/bitcoin-bitcoin/contributor/interface/) NSUserNotification : NSObject <NSCopying> {
12 ^
13qt/macnotificationhandler.mm:30:11: error: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Werror,-Wdeprecated-declarations]
14 [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
15 ^
16/Applications/Xcode_15.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
17[@interface](/bitcoin-bitcoin/contributor/interface/) NSUserNotificationCenter : NSObject {
18 ^
193 errors generated.
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the documentation.
Possibly this is due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
Leave a comment here, if you need help tracking down a confusing failure.
This warning seems legitimate. Looks to me like we should modernize this code rather than ignoring it, no?
It is Qt 5 code base. I did not check it out, but I hope Qt 6 dropped using of a deprecated API.
This warning seems legitimate. Looks to me like we should modernize this code rather than ignoring it, no?
It is Qt 5 code base. I did not check it out, but I hope Qt 6 dropped using of a deprecated API.
I don’t understand what you mean. From what @fanquake pasted above, It’s in our macnotificationhandler.mm
. A quick google says that we should switch to the UserNotifications.frameworks API
instead. What part of this is qt specific?
Or are there warnings other than those 3?
I don’t understand what you mean.
Me either. The code that is producing warnings is definitely in our source tree. I don’t see how this is related to the Qt version.
This warning seems legitimate. Looks to me like we should modernize this code rather than ignoring it, no?
Last time I tried to replace NSUserNotificationCenter
with UNUserNotificationCenter
on macOS 10.15, I got the authorization error “Notifications are not allowed for this application”.
Now, the minimum supported macOS is 11.0. So it might be worth trying once more.
It is Qt 5 code base. I did not check it out, but I hope Qt 6 dropped using of a deprecated API.
I don’t understand what you mean. From what @fanquake pasted above, It’s in our
macnotificationhandler.mm
. A quick google says that we should switch to theUserNotifications.frameworks API
instead. What part of this is qt specific?
I was waiting when Qt does the same replacement to prove that this is a thing. Alas. See QTBUG-110998.
UPD. Also an alternative approach was NACKed due to “the visible global menu icon”.
the comments in the config of files are not correct.
The comments have been adjusted.
This warning seems legitimate. Looks to me like we should modernize this code rather than ignoring it, no?
I agree with you. More details regarding our options to “modernize this code” are posted in the dedicated https://github.com/bitcoin-core/gui/issues/112.
However, the goal of this PR is to fix the build system to prevent porting this bug into the new CMake-based build system. For the context, please refer to https://github.com/hebasto/bitcoin/pull/84#discussion_r1469371615.