build: ignore deprecated-declarations warnings in objc++ macOS code #29577

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:alternative_29362 changing 2 files +5 −1
  1. fanquake commented at 1:22 pm on March 6, 2024: member

    These come from GUI code, and haven’t/aren’t being fixed, see discussion in https://github.com/bitcoin-core/gui/issues/112. For now, just ignore them entirely. Note that this only applies to ObjCXX code, so will not hide any relevant warnings coming from C or CXX code (and they would be unlikely in any case).

    Alternative to #29362 (which disables all compiler warnings, for macOS builds in the CI). This PR includes one commit from that PR.

    Relevant output:

     0qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
     1        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
     2        ^
     3/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
     4[@interface](/bitcoin-bitcoin/contributor/interface/) NSUserNotification : NSObject <NSCopying> {
     5           ^
     6qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
     7        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
     8                                                 ^
     9/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
    10[@interface](/bitcoin-bitcoin/contributor/interface/) NSUserNotification : NSObject <NSCopying> {
    11           ^
    12qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
    13        [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
    14          ^
    15/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
    16[@interface](/bitcoin-bitcoin/contributor/interface/) NSUserNotificationCenter : NSObject {
    17           ^
    183 warnings generated.
    
  2. DrahtBot commented at 1:22 pm on March 6, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto
    Stale ACK TheCharlatan

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Build system on Mar 6, 2024
  4. TheCharlatan commented at 1:52 pm on March 6, 2024: contributor
    Concept ACK
  5. fanquake commented at 3:02 pm on March 6, 2024: member

    Guix build aarch64:

     0257fe95b5cb46a779b06c744d501615da99b1890cde173dfcfc6785440524bc3  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/SHA256SUMS.part
     10f04920797338ca44d74c9293b693d4c93b78dbab172fe2fd4453d119db8e8fb  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu-debug.tar.gz
     234f2ab134fc8bf6a2f64de1ee05626c1aaaa50c2e8385a9481aff21db9aaab1b  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu.tar.gz
     313307a3957197d3956da68f102f50a5932c428fccae6fc1c9cffa0577d9f44ba  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/SHA256SUMS.part
     42997109aa88dc7051e249b88b69a33ce0861f40c162c4f4575b2a17e2ce2a3f6  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf-debug.tar.gz
     512ccd94b3a727854fa2bef5f7e9e19cb645591c78213f96d229970c5f6232b0f  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf.tar.gz
     686b2893c47c6bafa57e7e335f89dcf78c5fb2e753908a536f3c6aa83ea81f503  guix-build-d3c76a2e8713/output/arm64-apple-darwin/SHA256SUMS.part
     78f353e97fa0f90a142d6f2b37514dab828d053b12274dc4a2116e8b664690c0d  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.tar.gz
     878042ea2719f15f5b82c2ec30f871b20e7d7c486ef76a883d4e457ea255e792f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.zip
     977baec15fd24946f9e74709752209c4de5a1b77bf6beeaa499a6d05997c3817f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin.tar.gz
    107e3ac1c7153564ac225b4fa23db319b818ca3ad98d235bff723dbfadfb284ab8  guix-build-d3c76a2e8713/output/dist-archive/bitcoin-d3c76a2e8713.tar.gz
    115711a411091ad2ebecb0959ad4937ed2246dee3d7addfd44cfc6b736b1aa3982  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/SHA256SUMS.part
    125326d9da97b2c95e0baf8102b240fe1b9d7d3722c033788bffb76b228d6a49d2  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu-debug.tar.gz
    1368a78acdb3866ed9aff5c3a2f0c6a56e175d1e04cda618224ff70cb4c052e596  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu.tar.gz
    14d04d9e7f6e85d08a9894ba5c33fc604945d9296a5227df6f287ed6bb9dbfc97b  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/SHA256SUMS.part
    15c099db0552de5be8771c8b362b2dfea457f1c5a0ec032fcd78316642e5afaf17  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu-debug.tar.gz
    160f780a7e57a7e028e7bc3bb935ed2c90d6fee17af4067289f85974f635dc897a  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu.tar.gz
    174160ff7ab6d99b7fd448b800ba7df49773b8b2b5fce4d50d7a05f120e09cadb9  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/SHA256SUMS.part
    188c3117ad3953cbb52188b5673cef1818d54a6e8e2b6ad092068a96f380f74e67  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu-debug.tar.gz
    19ac77a99bc8959a9025af97af4d1fca16e02e2fead8db722dcd3c157ae0e87440  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu.tar.gz
    206b71e4d24953103b96e35c8124990ee072b202c79e39ece8de70d33b062e1fa3  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/SHA256SUMS.part
    214428461488220b9d5093b645eaf2207bbb931c98b9bbe3dbcc6397ec8b0ea0fd  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.tar.gz
    224cdb51891cae1302df6ef63dca3b6c44841930956a16e2cfad87d0d5e91615d7  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.zip
    2327fd4d745861d9577e372f3db0cce71fe8388a14e8bf374218631a9ede31d213  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin.tar.gz
    24f539b87e6ef5ce269ee40e98ccaf999d41612c2a75e674ee5b1e85031d9d83cb  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/SHA256SUMS.part
    25d5b7dea17ad1204a1b5bcc6b29641a41745c9927b203a40dc2ed24b29c9e0074  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu-debug.tar.gz
    2645958584e62757fe69f323b0c56d916d5c1abd87863a1237565cece9d3efdd75  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu.tar.gz
    279f48fa6f3286d8a1eb17d2639730acd17e70d6eef50b3d12c07085824784b02a  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/SHA256SUMS.part
    283bcf76adfccb87735d295c8dbfa98a2948cadd903b52d3029762c8dea7000b75  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-debug.zip
    295252f4ad12d3438dab38b6f65e903d273e3eb049119eed7b0d26edeee7aa0c23  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-setup-unsigned.exe
    30519743ecb942d7b85417846b72f41b46ab01ce81732cd80fd3e256d252877599  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-unsigned.tar.gz
    31efae62390e14cd79b4dfddb53efa98a3dbc2afb9826b47bf2eddd146191975a5  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64.zip
    
  6. TheCharlatan approved
  7. TheCharlatan commented at 3:42 pm on March 6, 2024: contributor

    ACK d3c76a2e8713a8a3b134cbf9a4b9011171a24116

    Guix build (x86):

     0257fe95b5cb46a779b06c744d501615da99b1890cde173dfcfc6785440524bc3  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/SHA256SUMS.part
     10f04920797338ca44d74c9293b693d4c93b78dbab172fe2fd4453d119db8e8fb  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu-debug.tar.gz
     234f2ab134fc8bf6a2f64de1ee05626c1aaaa50c2e8385a9481aff21db9aaab1b  guix-build-d3c76a2e8713/output/aarch64-linux-gnu/bitcoin-d3c76a2e8713-aarch64-linux-gnu.tar.gz
     313307a3957197d3956da68f102f50a5932c428fccae6fc1c9cffa0577d9f44ba  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/SHA256SUMS.part
     42997109aa88dc7051e249b88b69a33ce0861f40c162c4f4575b2a17e2ce2a3f6  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf-debug.tar.gz
     512ccd94b3a727854fa2bef5f7e9e19cb645591c78213f96d229970c5f6232b0f  guix-build-d3c76a2e8713/output/arm-linux-gnueabihf/bitcoin-d3c76a2e8713-arm-linux-gnueabihf.tar.gz
     686b2893c47c6bafa57e7e335f89dcf78c5fb2e753908a536f3c6aa83ea81f503  guix-build-d3c76a2e8713/output/arm64-apple-darwin/SHA256SUMS.part
     78f353e97fa0f90a142d6f2b37514dab828d053b12274dc4a2116e8b664690c0d  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.tar.gz
     878042ea2719f15f5b82c2ec30f871b20e7d7c486ef76a883d4e457ea255e792f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin-unsigned.zip
     977baec15fd24946f9e74709752209c4de5a1b77bf6beeaa499a6d05997c3817f  guix-build-d3c76a2e8713/output/arm64-apple-darwin/bitcoin-d3c76a2e8713-arm64-apple-darwin.tar.gz
    107e3ac1c7153564ac225b4fa23db319b818ca3ad98d235bff723dbfadfb284ab8  guix-build-d3c76a2e8713/output/dist-archive/bitcoin-d3c76a2e8713.tar.gz
    115711a411091ad2ebecb0959ad4937ed2246dee3d7addfd44cfc6b736b1aa3982  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/SHA256SUMS.part
    125326d9da97b2c95e0baf8102b240fe1b9d7d3722c033788bffb76b228d6a49d2  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu-debug.tar.gz
    1368a78acdb3866ed9aff5c3a2f0c6a56e175d1e04cda618224ff70cb4c052e596  guix-build-d3c76a2e8713/output/powerpc64-linux-gnu/bitcoin-d3c76a2e8713-powerpc64-linux-gnu.tar.gz
    14d04d9e7f6e85d08a9894ba5c33fc604945d9296a5227df6f287ed6bb9dbfc97b  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/SHA256SUMS.part
    15c099db0552de5be8771c8b362b2dfea457f1c5a0ec032fcd78316642e5afaf17  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu-debug.tar.gz
    160f780a7e57a7e028e7bc3bb935ed2c90d6fee17af4067289f85974f635dc897a  guix-build-d3c76a2e8713/output/powerpc64le-linux-gnu/bitcoin-d3c76a2e8713-powerpc64le-linux-gnu.tar.gz
    174160ff7ab6d99b7fd448b800ba7df49773b8b2b5fce4d50d7a05f120e09cadb9  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/SHA256SUMS.part
    188c3117ad3953cbb52188b5673cef1818d54a6e8e2b6ad092068a96f380f74e67  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu-debug.tar.gz
    19ac77a99bc8959a9025af97af4d1fca16e02e2fead8db722dcd3c157ae0e87440  guix-build-d3c76a2e8713/output/riscv64-linux-gnu/bitcoin-d3c76a2e8713-riscv64-linux-gnu.tar.gz
    206b71e4d24953103b96e35c8124990ee072b202c79e39ece8de70d33b062e1fa3  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/SHA256SUMS.part
    214428461488220b9d5093b645eaf2207bbb931c98b9bbe3dbcc6397ec8b0ea0fd  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.tar.gz
    224cdb51891cae1302df6ef63dca3b6c44841930956a16e2cfad87d0d5e91615d7  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin-unsigned.zip
    2327fd4d745861d9577e372f3db0cce71fe8388a14e8bf374218631a9ede31d213  guix-build-d3c76a2e8713/output/x86_64-apple-darwin/bitcoin-d3c76a2e8713-x86_64-apple-darwin.tar.gz
    24f539b87e6ef5ce269ee40e98ccaf999d41612c2a75e674ee5b1e85031d9d83cb  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/SHA256SUMS.part
    25d5b7dea17ad1204a1b5bcc6b29641a41745c9927b203a40dc2ed24b29c9e0074  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu-debug.tar.gz
    2645958584e62757fe69f323b0c56d916d5c1abd87863a1237565cece9d3efdd75  guix-build-d3c76a2e8713/output/x86_64-linux-gnu/bitcoin-d3c76a2e8713-x86_64-linux-gnu.tar.gz
    279f48fa6f3286d8a1eb17d2639730acd17e70d6eef50b3d12c07085824784b02a  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/SHA256SUMS.part
    283bcf76adfccb87735d295c8dbfa98a2948cadd903b52d3029762c8dea7000b75  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-debug.zip
    295252f4ad12d3438dab38b6f65e903d273e3eb049119eed7b0d26edeee7aa0c23  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-setup-unsigned.exe
    30519743ecb942d7b85417846b72f41b46ab01ce81732cd80fd3e256d252877599  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64-unsigned.tar.gz
    31efae62390e14cd79b4dfddb53efa98a3dbc2afb9826b47bf2eddd146191975a5  guix-build-d3c76a2e8713/output/x86_64-w64-mingw32/bitcoin-d3c76a2e8713-win64.zip
    
  8. in configure.ac:784 in d3c76a2e87 outdated
    779@@ -780,7 +780,10 @@ case $host in
    780 
    781      AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [$LDFLAG_WERROR])
    782      CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
    783-     OBJCXXFLAGS="$CXXFLAGS"
    784+
    785+     dnl ignore deprecated-declerations warnings coming from objcxx code
    


    hebasto commented at 12:32 pm on March 7, 2024:
    nit: typo: declerations > declarations

    fanquake commented at 1:07 pm on March 7, 2024:
    Fixed.
  9. hebasto approved
  10. hebasto commented at 12:32 pm on March 7, 2024: member
    ACK d3c76a2e8713a8a3b134cbf9a4b9011171a24116.
  11. build: Add missed definition for `AM_OBJCXXFLAGS` bd8f0354ba
  12. build: ignore deprecated-declaration warnings in objc++ macOS code
    These come from GUI code, and haven't/aren't being fixed, see discussion
    in https://github.com/bitcoin-core/gui/issues/112. For now, just ignore
    them entirely. Note that this only applies to ObjCXX code, so will not
    hide any relevant warnings coming from C or CXX code (and they would be
    unlikely in any case).
    
    Alternative to #29362, which disables all compiler warnings, for macOS
    builds in the CI.
    
    Relevant output:
    ```bash
    qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
            NSUserNotification* userNotification = [[NSUserNotification alloc] init];
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
    @interface NSUserNotification : NSObject <NSCopying> {
               ^
    qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
            NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                     ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
    @interface NSUserNotification : NSObject <NSCopying> {
               ^
    qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
            [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
              ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
    @interface NSUserNotificationCenter : NSObject {
               ^
    3 warnings generated.
    ```
    8b7630cb1f
  13. fanquake force-pushed on Mar 7, 2024
  14. hebasto approved
  15. hebasto commented at 1:11 pm on March 7, 2024: member
    re-ACK 8b7630cb1f246d894bb037ea72b009c9d17290cb.
  16. DrahtBot requested review from TheCharlatan on Mar 7, 2024
  17. fanquake merged this on Mar 7, 2024
  18. fanquake closed this on Mar 7, 2024

  19. fanquake deleted the branch on Mar 7, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me