我試圖在Ubuntu 16.10安裝QtCore4
,perl的版本5.24.1:無法在Ubuntu 16.10,perl的版本上安裝QtCore4 5.24.1
sudo apt-get install cmake
sudo apt-get install qt4-designer libqtgui4-perl
cpan -g QtCore4
bunzip2 Qt4-0.99.0.tar.bz2
tar xvf Qt4-0.99.0.tar
cd Qt4-0.99.0
perl Makefile.PL
make VERBOSE=1
這裏make
失敗,錯誤消息:
Building CXX object smokeqt/qtdbus/CMakeFiles/smokeqtdbus.dir/x_1.cpp.o
cd /home/hakon/Qt4-0.99.0/smokeqt/qtdbus
/usr/bin/c++ -DSMOKE_BUILDING -Dsmokeqtdbus_EXPORTS \
-I/usr/include/qt4/QtDesigner \
-I/usr/include/qt4/QtDeclarative \
-I/usr/include/qt4/QtScriptTools \
-I/usr/include/qt4/QtDBus \
-I/usr/include/qt4/QtXml \
-I/usr/include/qt4/QtSql \
-I/usr/include/qt4/QtOpenGL \
-I/usr/include/qt4/QtNetwork \
-I/usr/include/qt4/QtXmlPatterns \
-I/usr/include/qt4/QtHelp \
-I/usr/include/qt4/QtUiTools \
-I/usr/include/qt4/QtTest \
-I/usr/include/qt4/QtScript \
-I/usr/include/qt4/QtSvg \
-I/usr/include/qt4/Qt3Support \
-I/usr/include/qt4/QtGui \
-I/usr/include/qt4/QtCore \
-I/usr/share/qt4/mkspecs/default \
-I/usr/include/qt4 \
-I/home/hakon/Qt4-0.99.0/src \
-I/home/hakon/Qt4-0.99.0/smokeqt \
-I/home/hakon/Qt4-0.99.0/smokegen \
-I/home/hakon/Qt4-0.99.0/smokeqt/qtdbus \
-I/home/hakon/Qt4-0.99.0/smoke \
-I/home/hakon/Qt4-0.99.0/smoke/qtdbus \
-O3 -DNDEBUG -fPIC -o CMakeFiles/smokeqtdbus.dir/x_1.cpp.o \
-c /home/hakon/Qt4-0.99.0/smokeqt/qtdbus/x_1.cpp
/home/hakon/Qt4-0.99.0/smokeqt/qtdbus/x_1.cpp:1594:7: error: deleted function ‘virtual __smokeqtdbus::x_QDBusConnectionInterface::~x_QDBusConnectionInterface()’
class x_QDBusConnectionInterface : public QDBusConnectionInterface {
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt4/QtDBus/QtDBus:8:0,
from /home/hakon/Qt4-0.99.0/smokeqt/qtdbus/qtdbus_includes.h:2,
from /home/hakon/Qt4-0.99.0/smokeqt/qtdbus/x_1.cpp:2:
/usr/include/qt4/QtDBus/qdbusconnectioninterface.h:73:5: error: overriding non-deleted function ‘virtual QDBusConnectionInterface::~QDBusConnectionInterface()’
~QDBusConnectionInterface();
^
/home/hakon/Qt4-0.99.0/smokeqt/qtdbus/x_1.cpp:1594:7: note: ‘virtual __smokeqtdbus::x_QDBusConnectionInterface::~x_QDBusConnectionInterface()’ is implicitly deleted because the default definition would be ill-formed:
class x_QDBusConnectionInterface : public QDBusConnectionInterface {
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hakon/Qt4-0.99.0/smokeqt/qtdbus/x_1.cpp:1594:7: error: ‘virtual QDBusConnectionInterface::~QDBusConnectionInterface()’ is private within this context
這些線程可能涉及:
What is this error message about implicitly deleted virtual destructors?
PythonQt Dynamic Python binding for Qt Applications: build error in C++11 mode
是否與'-fPIC'(如編譯器的建議)的新問題幫助重新編譯? – hlt
@hlt我認爲它需要使用'-fPIC'標誌重新編譯'libperl.a'中的目標文件。我不確定如何執行此操作,請參閱[this](http://stackoverflow.com/q/) 43203477/2173773)的問題。 –
新增[cpan錯誤報告](https://rt.cpan.org/Ticket/Display.html?id=121203) –