Client: Client does not build with Qt <5.4

Created on 14 Dec 2017  路  2Comments  路  Source: owncloud/client

My build client in windown is error :
C:\Users\Win7\client-build>mingw32-make
Scanning dependencies of target cstdlib_autogen
[ 0%] Automatic MOC for target cstdlib
[ 0%] Built target cstdlib_autogen
Scanning dependencies of target cstdlib
[ 0%] Building C object src/csync/std/CMakeFiles/cstdlib.dir/c_alloc.c.obj
[ 0%] Building C object src/csync/std/CMakeFiles/cstdlib.dir/c_path.c.obj
[ 1%] Building C object src/csync/std/CMakeFiles/cstdlib.dir/c_string.c.obj
[ 1%] Building C object src/csync/std/CMakeFiles/cstdlib.dir/c_time.c.obj
[ 2%] Building CXX object src/csync/std/CMakeFiles/cstdlib.dir/c_utf8.cpp.obj
[ 2%] Building CXX object src/csync/std/CMakeFiles/cstdlib.dir/cstdlib_autogen/
mocs_compilation.cpp.obj
[ 3%] Linking CXX static library libcstdlib.a
[ 3%] Built target cstdlib
Scanning dependencies of target ocsync_autogen
[ 3%] Automatic MOC for target ocsync
[ 3%] Built target ocsync_autogen
Scanning dependencies of target ocsync
[ 3%] Building CXX object src/csync/CMakeFiles/ocsync.dir/__/common/checksums.c
pp.obj
C:\Users\Win7\client\src\common\checksums.cpp:81:60: error: macro "Q_LOGGING_CAT
EGORY" passed 3 arguments, but takes just 2
Q_LOGGING_CATEGORY(lcChecksums, "sync.checksums", QtInfoMsg)
^
C:\Users\Win7\client\src\common\checksums.cpp:81:1: error: 'Q_LOGGING_CATEGORY'
does not name a type
Q_LOGGING_CATEGORY(lcChecksums, "sync.checksums", QtInfoMsg)
^
C:\Users\Win7\client\src\common\checksums.cpp: In member function 'void OCC::Com
puteChecksum::start(const QString&)':
C:\Users\Win7\client\src\common\checksums.cpp:174:12: error: 'lcChecksums' was n
ot declared in this scope
qCInfo(lcChecksums) << "Computing" << checksumType() << "checksum of" << fi
lePath << "in a thread";
^
C:\Users\Win7\client\src\common\checksums.cpp:174:23: error: 'qCInfo' was not de
clared in this scope
qCInfo(lcChecksums) << "Computing" << checksumType() << "checksum of" << fi
lePath << "in a thread";
^
In file included from C:/Qt/Qt5.3.1/5.3/mingw482_32/include/QtCore/QLoggingCateg
ory:1:0,
from C:\Users\Win7\client\src\common\filesystembase.h:26,
from C:\Users\Win7\client\src\common\checksums.cpp:19:
C:\Users\Win7\client\src\common\checksums.cpp: In static member function 'static
QByteArray OCC::ComputeChecksum::computeNow(const QString&, const QByteArray&)'
:
C:\Users\Win7\client\src\common\checksums.cpp:186:9: error: 'lcChecksums' was no
t declared in this scope
qCWarning(lcChecksums) << "Checksum computation disabled by environment
variable";
^
C:\Users\Win7\client\src\common\checksums.cpp:202:9: error: 'lcChecksums' was no
t declared in this scope
qCWarning(lcChecksums) << "Unknown checksum type:" << checksumType;
^
C:\Users\Win7\client\src\common\checksums.cpp: In member function 'void OCC::Val
idateChecksumHeader::start(const QString&, const QByteArray&)':
C:\Users\Win7\client\src\common\checksums.cpp:232:9: error: 'lcChecksums' was no
t declared in this scope
qCWarning(lcChecksums) << "Checksum header malformed:" << checksumHeade
r;
^
C:\Users\Win7\client\src\common\checksums.cpp: In static member function 'static
QByteArray OCC::CSyncChecksumHook::hook(const QByteArray&, const QByteArray&, v
oid)':
C:\Users\Win7\client\src\common\checksums.cpp:268:12: error: 'lcChecksums' was n
ot declared in this scope
qCInfo(lcChecksums) << "Computing" << type << "checksum of" << path << "in
the csync hook";
^
C:\Users\Win7\client\src\common\checksums.cpp:268:23: error: 'qCInfo' was not de
clared in this scope
qCInfo(lcChecksums) << "Computing" << type << "checksum of" << path << "in
the csync hook";
^
At global scope:
cc1plus.exe: warning: unrecognized command line option "-Wno-gnu-zero-variadic-m
acro-arguments" [enabled by default]
src\csync\CMakeFiles\ocsync.dir\build.make:62: recipe for target 'src/csync/CMak
eFiles/ocsync.dir/__/common/checksums.cpp.obj' failed
mingw32-make[2]:
[src/csync/CMakeFiles/ocsync.dir/__/common/checksums.cpp.ob
j] Error 1
CMakeFiles\Makefile2:115: recipe for target 'src/csync/CMakeFiles/ocsync.dir/all
' failed
mingw32-make[1]:
[src/csync/CMakeFiles/ocsync.dir/all] Error 2
Makefile:150: recipe for target 'all' failed
mingw32-make: *
* [all] Error 2
.................................................
Please help me

packaging

Most helpful comment

Yes, we require Qt 5.5 for 2.4 and Qt 5.6 for 2.5, we should make this explicit.

All 2 comments

@NguyenVanVuong You are very likely using a Qt version that is too old. Q_LOGGING_CATEGORY with three arguments was introduced in Qt 5.4. Use at least 5.6.

@ogoffart @guruz Since the client doesn't even compile with <5.4 anymore I'd like to add a cmake error if the version is too old. Do you know which version we require? It could be >= 5.6 since that's the LTS version?

Yes, we require Qt 5.5 for 2.4 and Qt 5.6 for 2.5, we should make this explicit.

Was this page helpful?
0 / 5 - 0 ratings