martyr-deepin / deepin-tool-kit

163 stars 47 forks source link

Building ail ... #9

Closed Creteil closed 3 years ago

Creteil commented 7 years ago

Hi,

My attempt to build deepin-tool-kit fail with compilation error :

g++ -c -m64 -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -DLIBDTK_LIBRARY -DQT_MESSAGELOGCONTEXT -DLIBDTKUTIL_LIBRARY -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -Idlog -I../dbase -isystem /usr/include/x86_64-linux-gnu/qt5/QGSettings -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtMultimedia -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtDBus -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o dfilesystemwatcher_linux.o dfilesystemwatcher_linux.cpp
In file included from dfilesystemwatcher_linux.cpp:11:0:
private/dfilesystemwatcher_linux_p.h:33:17: error: field ‘files’ has incomplete type ‘QStringList’
     QStringList files, directories;
                 ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:41:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1,
                 from dfilesystemwatcher.h:16,
                 from dfilesystemwatcher_linux.cpp:10:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:73:7: note: forward declaration of ‘class QStringList’
 class QStringList;
       ^
In file included from dfilesystemwatcher_linux.cpp:11:0:
private/dfilesystemwatcher_linux_p.h:33:24: error: field ‘directories’ has incomplete type ‘QStringList’
     QStringList files, directories;
                        ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:41:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1,
                 from dfilesystemwatcher.h:16,
                 from dfilesystemwatcher_linux.cpp:10:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:73:7: note: forward declaration of ‘class QStringList’
 class QStringList;
       ^
Makefile:547: recipe for target 'dfilesystemwatcher_linux.o' failed
make[2]: *** [dfilesystemwatcher_linux.o] Error 1
make[2]: Leaving directory '/home/bigbob/tmp/Building/linuxdeepin/deepin-tool-kit/dutil'
Makefile:71: recipe for target 'sub-dutil-make_first' failed
make[1]: *** [sub-dutil-make_first] Error 2
make[1]: Leaving directory '/home/bigbob/tmp/Building/linuxdeepin/deepin-tool-kit'
dh_auto_build: make -j1 returned exit code 2
debian/rules:7: recipe for target 'build' failed
make: *** [build] Error 25
dpkg-buildpackage: erreur: debian/rules build a produit une erreur de sortie de type 2
bigbob@bigbob-UX31A:~/tmp/Building/linuxdeepin/deepin-tool-kit$

Do you have any idea on how to fix it ?

A++

Creteil commented 7 years ago

I finally fixed the error by adding #include in deepin-tool-kit-0.3.4/dutil/dfilesystemwatcher.h

A++

Iceyer commented 7 years ago

@Creteil please see https://github.com/linuxdeepin/dtkcore https://github.com/linuxdeepin/dtkwidget

this repo is discard, and will be a super module as all dtk module.

NathanIceSea commented 6 years ago

@Iceyer failed to install dtkwidget qtbase5-dev version is 5.5.1+dfsg-16ubuntu7.5, running on Elementary OS it says:

/usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:103:5: error: no matching function for call to ‘qHash(const QMimeType&)’ Q_DECL_NOEXCEPT_EXPR(noexcept(qHash(t)))

make failed

Iceyer commented 6 years ago

@NathanIceSea

Add below code the to dthumbnailprovider.cpp

uint qHash(const QMimeType &key, uint seed) Q_DECL_NOTHROW
{
    return qHash(key.name(), seed);
}

However, We will not support 5.5.1 the next version, because of the hiDPI support need Qt 5.6 and higher.

justforlxz commented 3 years ago

Sorry, this issue will be closed soon. If it is necessary to discuss it again, please create a new issue.