Greetings,
I intend to compile the NextCloud desktop from the Git master branch.
Install Qt5 from official installer into ~/Qt (default location)
Get installer from Download Qt: Get Qt Online Installer
Tick only Qt 5.15.2 (resulting in 1.9 GB)
Install git
sudo apt install git
Install packages recommended for Ubuntu 20, but exclude Qt5
sudo apt install cmake g++ openssl libssl-dev libzip-dev sqlite3 libsqlite3-dev zlib1g-dev shared-mime-info
Resolve later CMake complaints, mesa is open-source OpenGL
sudo apt install libkf5archive-dev pkg-config cmake-data mesa-common-dev libglu1-mesa-dev inkscape
Clone current NextCloud desktop
git clone --depth 1 https://github.com/nextcloud/desktop.git
cmake fails because of error “FindQt5Keychain.cmake”
cd desktop && mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/ncdc -DCMAKE_PREFIX_PATH=~/Qt/5.15.2/gcc_64/lib/cmake
How do you resolve cmake error “FindQt5Keychain.cmake”?
Workaround cmake error “FindQt5Keychain.cmake” using TOKEN_AUTH_ONLY
cmake .. -DCMAKE_INSTALL_PREFIX=~/ncdc -DCMAKE_PREFIX_PATH=~/Qt/5.15.2/gcc_64/lib/cmake -DTOKEN_AUTH_ONLY=ON
Above cmake is successful
make fails because it cannot find QColor
make install
[ 0%] Automatic MOC for target nextcloud_csync
[ 0%] Built target nextcloud_csync_autogen
[ 1%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/nextcloud_csync_autogen/mocs_compilation.cpp.o
[ 1%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/checksums.cpp.o
[ 1%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/filesystembase.cpp.o
[ 2%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/ownsql.cpp.o
[ 2%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/preparedsqlquerymanager.cpp.o
[ 3%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/syncjournaldb.cpp.o
[ 3%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/syncjournalfilerecord.cpp.o
[ 3%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/utility.cpp.o
[ 4%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/remotepermissions.cpp.o
[ 4%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/vfs.cpp.o
[ 4%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/pinstate.cpp.o
[ 5%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/plugin.cpp.o
[ 5%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/__/common/syncfilestatus.cpp.o
[ 5%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/csync.cpp.o
[ 6%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/csync_exclude.cpp.o
[ 6%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/std/c_time.cpp.o
[ 7%] Building CXX object src/csync/CMakeFiles/nextcloud_csync.dir/vio/csync_vio_local_unix.cpp.o
[ 7%] Linking CXX shared library libnextcloud_csync.so
[ 7%] Built target nextcloud_csync
[ 7%] Automatic MOC for target nextcloudsync
[ 7%] Built target nextcloudsync_autogen
[ 7%] Building CXX object src/libsync/CMakeFiles/nextcloudsync.dir/nextcloudsync_autogen/mocs_compilation.cpp.o
In file included from /home/markus/desktop/build/src/libsync/nextcloudsync_autogen/EWIEGA46WW/../../../../../src/libsync/account.h:36,
from /home/markus/desktop/build/src/libsync/nextcloudsync_autogen/EWIEGA46WW/moc_account.cpp:10,
from /home/markus/desktop/build/src/libsync/nextcloudsync_autogen/mocs_compilation.cpp:5:
/home/markus/desktop/build/src/libsync/nextcloudsync_autogen/EWIEGA46WW/../../../../../src/libsync/capabilities.h:24:10: fatal error: QColor: No such file or directory
24 | #include <QColor>
| ^~~~~~~~
compilation terminated.
make[2]: *** [src/libsync/CMakeFiles/nextcloudsync.dir/build.make:76: src/libsync/CMakeFiles/nextcloudsync.dir/nextcloudsync_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:461: src/libsync/CMakeFiles/nextcloudsync.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Analyis of QColor error
Line 24 of capabilities.h is the 4th import of a Qt headerfile:
#include <QVariantMap>
#include <QStringList>
#include <QMimeDatabase>
#include <QColor>
Make finds QMimeDatabase (line 23)
~/Qt/5.15.2/gcc_64/include/QtCore/qmimedatabase.h
Why make doesn’t find QColor (line 24)?
~/Qt/5.15.2/gcc_64/include/QtGui/qcolor.h
Best regards,
Markus