zeal
zeal copied to clipboard
Zeal 0.6.1 does not build
I download a last released version of Zeal and try to build according to README.md. It does not build.
┌───┐
│ $ │ ziga > ziga--workstation > zeal-0.6.1
└─┬─┘ /dev/pts/3
└─> mkdir build && cd build
┌───┐
│ $ │ ziga > ziga--workstation > build
└─┬─┘ /dev/pts/3
└─> cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at assets/freedesktop/CMakeLists.txt:2 (find_package):
Could not find a package configuration file provided by "ECM" (requested
version 1.0.0) with any of the following names:
ECMConfig.cmake
ecm-config.cmake
Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
to a directory containing one of the above files. If "ECM" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal-0.6.1/build/CMakeFiles/CMakeOutput.log".
Are you gonna properly document your project? No wonder it got removed from the Debian!
I had to install a package extra-cmake-modules
to solve the compilation error. You might want to mention this in the README.md
...
Now... another problem:
┌───┐
│ $ │ ziga > ziga--workstation > build
└─┬─┘ /dev/pts/6
└─> cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No qmake Qt5 binary found. Can't check QT_INSTALL_PREFIX
Installing in /usr. Run /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/build/assets/freedesktop/prefix.sh to set the environment for Zeal.
CMake Error at src/libs/core/CMakeLists.txt:12 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Qt5Config.cmake
qt5-config.cmake
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/build/CMakeFiles/CMakeOutput.log".`
First we have to download the last version of zeal
:
git clone https://github.com/zealdocs/zeal
It uses cmake
and some other prerequisites so we install them:
sudo apt install cmake extra-cmake-modules qtbase5-dev libqt5webkit5-dev libarchive-dev libqt5x11extras5-dev libxcb-keysyms1-dev libsqlite3-dev
Then we create the build
sub folder move to it and build the project:
┌───┐
│ $ │ ziga > ziga--workstation > zeal-0.6.1
└─┬─┘ /dev/pts/3
└─> mkdir build && cd build
┌───┐
│ $ │ ziga > ziga--workstation > build
└─┬─┘ /dev/pts/6
└─> cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Installing in the same prefix as Qt, adopting their path scheme.
-- Found LibArchive: /usr/lib/x86_64-linux-gnu/libarchive.so (found version "3.4.3")
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
-- Found XCB_XCB: /usr/lib/x86_64-linux-gnu/libxcb.so (found version "1.14")
-- Found XCB_KEYSYMS: /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so (found version "0.4.0")
-- Found XCB: /usr/lib/x86_64-linux-gnu/libxcb.so;/usr/lib/x86_64-linux-gnu/libxcb-keysyms.so (found version "1.14") found components: XCB KEYSYMS
-- Found SQLite: /usr/lib/x86_64-linux-gnu/libsqlite3.so (found version "3.34.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/build
Now inside the current folder i.e. build
we will have a Makefile
and we can run command make
which fails to build the zeal
:
┌───┐
│ $ │ ziga > ziga--workstation > build
└─┬─┘ /dev/pts/2
└─> make
[ 1%] Automatic MOC and UIC for target QxtGlobalShortcut
[ 1%] Built target QxtGlobalShortcut_autogen
[ 9%] Built target QxtGlobalShortcut
[ 11%] Automatic UIC for target Util
[ 11%] Built target Util_autogen
[ 19%] Built target Util
[ 21%] Automatic MOC and UIC for target Registry
[ 21%] Built target Registry_autogen
[ 37%] Built target Registry
[ 39%] Automatic MOC and UIC for target Ui
[ 39%] Built target Ui_autogen
[ 41%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/searchitemdelegate.cpp.o
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp: In member function ‘virtual void Zeal::WidgetUi::SearchItemDelegate::paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const’:
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:140:77: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
140 | = textRect.adjusted(fm.width(elidedText.left(matchIndex)), 2, 0, -2);
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractspinbox.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleoption.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractitemdelegate.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleditemdelegate.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QStyledItemDelegate:1,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.h:27,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
106 | int width(const QString &, int len = -1) const;
| ^~~~~
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:141:93: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
141 | highlightRect.setWidth(fm.width(elidedText.mid(matchIndex, m_highlight.length())));
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractspinbox.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleoption.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractitemdelegate.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleditemdelegate.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QStyledItemDelegate:1,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.h:27,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
106 | int width(const QString &, int len = -1) const;
| ^~~~~
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:143:26: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
143 | QPainterPath path;
| ^~~~
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp: In member function ‘virtual QSize Zeal::WidgetUi::SearchItemDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const’:
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:206:67: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
206 | size.rwidth() += opt.fontMetrics.width(index.data().toString()) + margin * 2;
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractspinbox.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleoption.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractitemdelegate.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleditemdelegate.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QStyledItemDelegate:1,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.h:27,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
106 | int width(const QString &, int len = -1) const;
| ^~~~~
make[2]: *** [src/libs/ui/CMakeFiles/Ui.dir/build.make:160: src/libs/ui/CMakeFiles/Ui.dir/searchitemdelegate.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:415: src/libs/ui/CMakeFiles/Ui.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
Hey, i've just gone through the process of building this from source and agree that the documentation doesn't hold your hand through installation which might put of new people who are unfamiliar with cmake, but it does clearly detail in the building section that you need those dependencies.
How you get those will be dependent on your OS so it isn't really feasible to have notes there on how to get them installed.
On your last part about make not building, you need to run cmake --build build
not make
. After that finishes you will have zeal in build/bin/
and can run it from there.
@afallon02 I tried executting also the cmake --build build
and error remains the same as if I ran make
. I included a more verbose make report this time. I hope we can solve this.
┌───┐
│ $ │ ziga > ziga--workstation > zeal-0.6.1
└─┬─┘ /dev/pts/2
└─> cmake --build ./build/
[ 1%] Automatic MOC and UIC for target QxtGlobalShortcut
[ 1%] Built target QxtGlobalShortcut_autogen
[ 9%] Built target QxtGlobalShortcut
[ 11%] Automatic UIC for target Util
[ 11%] Built target Util_autogen
[ 19%] Built target Util
[ 21%] Automatic MOC and UIC for target Registry
[ 21%] Built target Registry_autogen
[ 37%] Built target Registry
[ 39%] Automatic MOC and UIC for target Ui
[ 39%] Built target Ui_autogen
[ 41%] Building CXX object src/libs/ui/CMakeFiles/Ui.dir/searchitemdelegate.cpp.o
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp: In member function ‘virtual void Zeal::WidgetUi::SearchItemDelegate::paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&) const’:
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:140:77: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
140 | = textRect.adjusted(fm.width(elidedText.left(matchIndex)), 2, 0, -2);
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractspinbox.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleoption.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractitemdelegate.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleditemdelegate.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QStyledItemDelegate:1,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.h:27,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
106 | int width(const QString &, int len = -1) const;
| ^~~~~
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:141:93: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
141 | highlightRect.setWidth(fm.width(elidedText.mid(matchIndex, m_highlight.length())));
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractspinbox.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleoption.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractitemdelegate.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleditemdelegate.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QStyledItemDelegate:1,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.h:27,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
106 | int width(const QString &, int len = -1) const;
| ^~~~~
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:143:26: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
143 | QPainterPath path;
| ^~~~
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp: In member function ‘virtual QSize Zeal::WidgetUi::SearchItemDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const’:
/home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:206:67: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
206 | size.rwidth() += opt.fontMetrics.width(index.data().toString()) + margin * 2;
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:50,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractspinbox.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleoption.h:47,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractitemdelegate.h:45,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qstyleditemdelegate.h:44,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QStyledItemDelegate:1,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.h:27,
from /home/ziga/Dropbox/workspace/racunalnistvo/001--systems/os--native/debian-11/ziga--workstation/002--installation--files/zeal/zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qfontmetrics.h:106:9: note: declared here
106 | int width(const QString &, int len = -1) const;
| ^~~~~
gmake[2]: *** [src/libs/ui/CMakeFiles/Ui.dir/build.make:160: src/libs/ui/CMakeFiles/Ui.dir/searchitemdelegate.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:415: src/libs/ui/CMakeFiles/Ui.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2
I am bumping this thread. Has anyone figured out why this fails?
It looks like this pproblem is fixed in the "development version". I guess some developper noticed this and already fixed it.
This was fixed in https://github.com/zealdocs/zeal/pull/1218. I desperately need to tag a new release.
I had the same issue. Got the same error:
zeal-0.6.1/src/libs/ui/searchitemdelegate.cpp:143:26: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
143 | QPainterPath path;
| ^~~~
Thank you @71GA . It was indeed fixed in the development version.
PD:
The Build Instructions for Debian Family dependencies list works fine for Debian 11 (bullseye). But the instructions are maybe not quite right as they differ from the ones in the README.md (use cmake
instead of make
).
Fixed in #1218.