qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.25k stars 3.97k forks source link

Build fails on macOS 10.14: error: no member named 'toggleVisibility' in 'MainWindow' #20677

Open i0ntempest opened 7 months ago

i0ntempest commented 7 months ago

qBittorrent & operating system versions

qBittorrent 4.6.4 OS: macOS 10.14 Qt 5.15.12

What is the problem?

Build failure:

compiling moc_mainwindow.cpp
compiling moc_optionsdialog.cpp
compiling moc_powermanagement.cpp
compiling moc_previewlistdelegate.cpp
moc_mainwindow.cpp:384:22: error: no member named 'toggleVisibility' in 'MainWindow'
        case 63: _t->toggleVisibility(); break;
                 ~~  ^
1 error generated.
make[1]: *** [moc_mainwindow.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_qBittorrent-qt5/qBittorrent-qt5/work/qBittorrent-4.6.4/src'
make: *** [sub-src-all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_qBittorrent-qt5/qBittorrent-qt5/work/qBittorrent-4.6.4'
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_qBittorrent-qt5/qBittorrent-qt5/work/qBittorrent-4.6.4" && /usr/bin/make -j4 -w all 
Exit code: 2

Steps to reproduce

Try building 4.6.4 on macOS 10.14

Additional context

Similar errors when building 4.3.2 on macOS 10.12:

compiling moc_optionsdialog.cpp
compiling moc_powermanagement.cpp
compiling moc_previewlistdelegate.cpp
moc_mainwindow.cpp:433:22: error: no member named 'toggleVisibility' in 'MainWindow'
        case 70: _t->toggleVisibility((*reinterpret_cast< const QSystemTrayIcon::ActivationReason(*)>(_a[1]))); break;
                 ~~  ^
moc_mainwindow.cpp:433:65: error: use of undeclared identifier 'QSystemTrayIcon'
        case 70: _t->toggleVisibility((*reinterpret_cast< const QSystemTrayIcon::ActivationReason(*)>(_a[1]))); break;
                                                                ^
moc_mainwindow.cpp:433:40: warning: ISO C++ does not allow indirection on operand of type 'void *' [-Wvoid-ptr-dereference]
        case 70: _t->toggleVisibility((*reinterpret_cast< const QSystemTrayIcon::ActivationReason(*)>(_a[1]))); break;
                                       ^                                                              ~~~~~
moc_mainwindow.cpp:434:22: error: no member named 'toggleVisibility' in 'MainWindow'
        case 71: _t->toggleVisibility(); break;
                 ~~  ^
moc_mainwindow.cpp:435:22: error: no member named 'createSystrayDelayed' in 'MainWindow'
        case 72: _t->createSystrayDelayed(); break;
                 ~~  ^
moc_mainwindow.cpp:436:22: error: no member named 'updateTrayIconMenu' in 'MainWindow'; did you mean 'trayIconMenu'?
        case 73: _t->updateTrayIconMenu(); break;
                     ^~~~~~~~~~~~~~~~~~
                     trayIconMenu
./gui/mainwindow.h:85:12: note: 'trayIconMenu' declared here
    QMenu *trayIconMenu();
           ^
1 warning and 5 errors generated.
make[1]: *** [moc_mainwindow.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_qBittorrent-qt5/qBittorrent-qt5/work/qBittorrent-4.3.2/src'
make: *** [sub-src-all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_qBittorrent-qt5/qBittorrent-qt5/work/qBittorrent-4.3.2'
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_qBittorrent-qt5/qBittorrent-qt5/work/qBittorrent-4.3.2" && /usr/bin/make -j4 -w all 
Exit code: 2

But let's sort out 10.14 first.

Log(s) & preferences file(s)

https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/201782/steps/install-port/logs/stdio

xavier2k6 commented 2 months ago

Support for macOS 10.12 & macOS10.14 have long been sunset by qBittorrent.

i0ntempest commented 2 months ago

Yes but I’m building an old version which I think is before they dropped 10.14.

xavier2k6 commented 2 months ago

Yes but I’m building an old version which I think is before they dropped 10.14.

Review below for when they were dropped. https://www.qbittorrent.org/news

luzpaz commented 2 months ago

The problem is that the changelog is abridged ('see full changelog' redirects to github) so it's not on that web page.

xavier2k6 commented 2 months ago

The problem is that the changelog is abridged ('see full changelog' redirects to github) so it's not on that web page.

What do you mean?, the information about dropped/unsupported OS is there in https://www.qbittorrent.org/news.

Minimum supported OS version is macOS 10.15 Catalina. https://www.qbittorrent.org/news#thursday-march-24th-2022---qbittorrent-v4.4.2-release

Also: https://github.com/qbittorrent/qBittorrent/discussions/16910#discussioncomment-3268566

Support for macOS 10.13 (High Sierra) was dropped because Xcode doesn't support C++17 for that version. https://www.qbittorrent.org/news#thursday-january-19th-2021---qbittorrent-v4.3.3-release

MACOS: Drop support for < macOS 10.10 (Yosemite) https://www.qbittorrent.org/news#tuesday-december-3rd-2019---qbittorrent-v4.2.0-release

macOS: Support for Mavericks (10.9) was dropped due to usage of Qt 5.9. https://www.qbittorrent.org/news#monday-december-24th-2018---qbittorrent-v4.1.5-release

i0ntempest commented 2 months ago

Okay, I tried to build 4.4.1 on Mojave which is the one right before support was dropped. Failed with the same error: https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/217331/steps/install-port/logs/stdio

i0ntempest commented 2 months ago

4.3.9 failed with the same error as well: https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/217412/steps/install-port/logs/stdio @xavier2k6 If you got time - can you please provide a list of latest supported qbittorrent version on macOS 10.8 to 14? This would help me provide the latest version of the software in my portfile. Currently I have the 4.6.6 for 10.15+, 4.4.1 or 4.3.9 for 10.14 (supposedly supported but won't build), and 4.3.2 for 10.13 and older but it wont build on 10.12. I wish to support down to at least 10.11 if possible.

xavier2k6 commented 2 months ago

can you please provide a list of latest supported qbittorrent version on macOS 10.8 to 14?

I don't have a mac & can't provide any real certainty on what version each OS is 100% fully supported.

Our maintainer @sledgehammer999 has more experience with macOS & does the release builds, so will leave it to them to chime-in on this.