zeal icon indicating copy to clipboard operation
zeal copied to clipboard

Build fails on Apple Silicon M1 pro

Open anmolarora opened this issue 2 years ago • 3 comments

I followed the following instructions for building zeal on macos, but it fails with the following error-

Screenshot 2022-02-24 at 20 58 39

Looked into it and found out that qt@5 in brew doesn't ship with QtWebEngine for Apple Silicon

Screenshot 2022-02-24 at 21 01 08

Has anybody had luck building zeal on Apple Silicon?

anmolarora avatar Feb 24 '22 15:02 anmolarora

Qt5's WebEngine is not available on arm64. I have a fork I'm working on at the moment that migrates to Qt6 to solve this: https://github.com/shabbyrobe/zeal

I'd be very happy to turn it into a PR at some point if it would be accepted but I'm quite sure there's more work to do and there are some angry compiler warnings and deprecations I'd like to clean up beforehand. I will test on Linux at some point but can't help much with Windows. There are still a few issues but it works for my needs on M1.

Install instructions change to this:

brew install qt@6
brew install libarchive
export CMAKE_PREFIX_PATH="$(brew --prefix qt@6):$(brew --prefix libarchive)"
git clone https://github.com/zealdocs/zeal.git
cd zeal
mkdir build
cd build
cmake ..
make -j 8

shabbyrobe avatar Mar 10 '22 02:03 shabbyrobe

Qt5's WebEngine is not available on arm64. I have a fork I'm working on at the moment that migrates to Qt6 to solve this: https://github.com/shabbyrobe/zeal

I'd be very happy to turn it into a PR at some point if it would be accepted but I'm quite sure there's more work to do and there are some angry compiler warnings and deprecations I'd like to clean up beforehand. I will test on Linux at some point but can't help much with Windows. There are still a few issues but it works for my needs on M1.

Install instructions change to this:

brew install qt@6
brew install libarchive
export CMAKE_PREFIX_PATH="$(brew --prefix qt@6):$(brew --prefix libarchive)"
git clone https://github.com/zealdocs/zeal.git
cd zeal
mkdir build
cd build
cmake ..
make -j 8

Hello, can you provide a compiled windows binary?

vmtest888 avatar May 31 '22 06:05 vmtest888

Unfortunately not, I don't have the required setup to do so. If you do find a way to build my fork on Windows, please let me know how you did!

shabbyrobe avatar Jun 06 '22 02:06 shabbyrobe

I don't have M1 hardware to test on, and MacOS is not officially supported. Qt6 support is already in the main branch, so in theory it should build just fine.

trollixx avatar Apr 10 '23 01:04 trollixx

just to pipe in on this. Was looking if Mac was supported and decided to try and compile it myself. I'm facing the following error message when compiling with qt 6.5.1

/Users/dev/Developer/zeal/src/app/main.cpp:180:5: error: 'critical' is deprecated: Use the overload taking StandardButtons instead. [-Werror,-Wdeprecated-declarations]
    QT_REQUIRE_VERSION(argc, argv, QT_VERSION_STR)
    ^
/opt/homebrew/opt/qt/lib/QtWidgets.framework/Headers/qmessagebox.h:315:58: note: expanded from macro 'QT_REQUIRE_VERSION'
str)).arg(QString::fromLatin1(qVersion())); QMessageBox::critical(0, QApplication::tr(\
                                                         ^
/opt/homebrew/opt/qt/lib/QtWidgets.framework/Headers/qmessagebox.h:242:5: note: 'critical' has been explicitly marked deprecated here
    QT_DEPRECATED_VERSION_X_6_2("Use the overload taking StandardButtons instead.")
    ^
/opt/homebrew/opt/qt/include/QtCore/qtdeprecationmarkers.h:141:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_2'
# define QT_DEPRECATED_VERSION_X_6_2(text) QT_DEPRECATED_X(text)
                                           ^
/opt/homebrew/opt/qt/include/QtCore/qtdeprecationmarkers.h:27:33: note: expanded from macro 'QT_DEPRECATED_X'
#  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
                                ^
/opt/homebrew/opt/qt/include/QtCore/qcompilerdetection.h:967:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
#  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                   ^
1 error generated.
make[2]: *** [src/app/CMakeFiles/App.dir/main.cpp.o] Error 1
make[1]: *** [src/app/CMakeFiles/App.dir/all] Error 2
make: *** [all] Error 2

enviousjag avatar Jun 16 '23 14:06 enviousjag

@enviousjag you can comment out that line in main.cpp. It's an issue in Qt.

trollixx avatar Jul 10 '23 23:07 trollixx