问题编译动作

时间:2018-10-05 16:10:51

标签: compilation

(如果任何人都可以使这个问题更笼统,请这样做。)

从Ubuntu 17.10升级到18.04。

我正在将actiona用于各种任务。升级后,它因失败而不再起作用(本地编译):

  

./ actiona:加载共享库时出错:libopencv_imgproc.so.3.1:无法打开共享库文件:没有这样的文件或目录

我做了一个git pull并试图重新构建。

qmake给我:

$ qmake -r
Reading /mnt/home01/soft/actiona/actiona/tools/tools.pro
Reading /mnt/home01/soft/actiona/actiona/actiontools/actiontools.pro
Project MESSAGE: Warning: unknown QT: x11extras
Project MESSAGE: Warning: unknown QT: x11extras
Reading /mnt/home01/soft/actiona/actiona/executer/executer.pro
Project MESSAGE: Warning: unknown QT: uitools
Reading /mnt/home01/soft/actiona/actiona/gui/gui.pro
Project MESSAGE: Warning: unknown QT: x11extras
Reading /mnt/home01/soft/actiona/actiona/actexecuter/actexecuter.pro
Reading /mnt/home01/soft/actiona/actiona/actions/actionpackinternal/actionpackinternal.pro
Reading /mnt/home01/soft/actiona/actiona/actions/actionpackwindows/actionpackwindows.pro
Reading /mnt/home01/soft/actiona/actiona/actions/actionpackdevice/actionpackdevice.pro
Project MESSAGE: Warning: unknown QT: x11extras
Reading /mnt/home01/soft/actiona/actiona/actions/actionpacksystem/actionpacksystem.pro
/mnt/home01/soft/actiona/actiona/actions/actionpacksystem/systeminfo/systeminfo.pri:85: Unknown test function: qtHaveModule
Project MESSAGE: Warning: unknown QT: multimediawidgets
Reading /mnt/home01/soft/actiona/actiona/actions/actionpackdata/actionpackdata.pro

make先后因QString错误而失败:

$ make
cd tools/ && make -f Makefile 
make[1]: Entering directory '/mnt/home01/soft/actiona/actiona/tools'
g++ -c -m64 -pipe -std=c++11 -O2 -O3 -s -Wall -W -D_REENTRANT -fPIC -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DACT_VERSION=3.10.0 -DACT_SCRIPT_VERSION=1.1.0 -DACT_BUILD_NAME=\"\" -DACT_PREFIX="\"/usr/local\"" -DACT_LIBDIR="\"lib\"" -DTOOLS_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Isrc -Igenerated -o generated/version.o version.cpp
version.cpp: In member function ‘QString Tools::Version::toString() const’:
version.cpp:89:23: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1").arg(d->major);
                       ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:91:26: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1.%2").arg(d->major).arg(d->minor);
                          ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:93:29: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1.%2.%3").arg(d->major).arg(d->minor).arg(d->micro);
                             ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:95:32: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1.%2.%3.%4").arg(d->major).arg(d->minor).arg(d->micro).arg(d->nano);
                                ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp: In member function ‘bool Tools::Version::setFromString(const QString&)’:
version.cpp:103:37: error: ‘QChar::QChar(char)’ is private within this context
   int newNumberCount = str.count('.') + 1;
                                     ^
In file included from /usr/include/qt4/QtCore/qstring.h:45:0,
                 from /usr/include/qt4/QtCore/QString:1,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qchar.h:359:5: note: declared private here
     QChar(char c);
     ^~~~~
version.cpp: In static member function ‘static bool Tools::Version::isValidVersion(const QString&)’:
version.cpp:146:37: error: ‘QChar::QChar(char)’ is private within this context
   int newNumberCount = str.count('.') + 1;
                                     ^
In file included from /usr/include/qt4/QtCore/qstring.h:45:0,
                 from /usr/include/qt4/QtCore/QString:1,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qchar.h:359:5: note: declared private here
     QChar(char c);
     ^~~~~
version.cpp: In static member function ‘static QString Tools::Version::regExpForNumberCount(int)’:
version.cpp:326:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)$";
           ^~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:328:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)\\.([0-9]+)$";
           ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:330:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$";
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,$ make
cd tools/ && make -f Makefile 
make[1]: Entering directory '/mnt/home01/soft/actiona/actiona/tools'
g++ -c -m64 -pipe -std=c++11 -O2 -O3 -s -Wall -W -D_REENTRANT -fPIC -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DACT_VERSION=3.10.0 -DACT_SCRIPT_VERSION=1.1.0 -DACT_BUILD_NAME=\"\" -DACT_PREFIX="\"/usr/local\"" -DACT_LIBDIR="\"lib\"" -DTOOLS_LIBRARY -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Isrc -Igenerated -o generated/version.o version.cpp
version.cpp: In member function ‘QString Tools::Version::toString() const’:
version.cpp:89:23: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1").arg(d->major);
                       ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:91:26: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1.%2").arg(d->major).arg(d->minor);
                          ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:93:29: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1.%2.%3").arg(d->major).arg(d->minor).arg(d->micro);
                             ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:95:32: error: ‘QString::QString(const char*)’ is private within this context
    return QString("%1.%2.%3.%4").arg(d->major).arg(d->minor).arg(d->micro).arg(d->nano);
                                ^
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp: In member function ‘bool Tools::Version::setFromString(const QString&)’:
version.cpp:103:37: error: ‘QChar::QChar(char)’ is private within this context
   int newNumberCount = str.count('.') + 1;
                                     ^
In file included from /usr/include/qt4/QtCore/qstring.h:45:0,
                 from /usr/include/qt4/QtCore/QString:1,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qchar.h:359:5: note: declared private here
     QChar(char c);
     ^~~~~
version.cpp: In static member function ‘static bool Tools::Version::isValidVersion(const QString&)’:
version.cpp:146:37: error: ‘QChar::QChar(char)’ is private within this context
   int newNumberCount = str.count('.') + 1;
                                     ^
In file included from /usr/include/qt4/QtCore/qstring.h:45:0,
                 from /usr/include/qt4/QtCore/QString:1,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qchar.h:359:5: note: declared private here
     QChar(char c);
     ^~~~~
version.cpp: In static member function ‘static QString Tools::Version::regExpForNumberCount(int)’:
version.cpp:326:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)$";
           ^~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:328:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)\\.([0-9]+)$";
           ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:330:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$";
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:332:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)$";
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
Makefile:251: recipe for target 'generated/version.o' failed
make[1]: *** [generated/version.o] Error 1
make[1]: Leaving directory '/mnt/home01/soft/actiona/actiona/tools'
Makefile:48: recipe for target 'sub-tools-make_default-ordered' failed
make: *** [sub-tools-make_default-ordered] Error 2
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
version.cpp:332:11: error: ‘QString::QString(const char*)’ is private within this context
    return "^([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)$";
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt4/QtCore/QString:1:0,
                 from version.h:26,
                 from version.cpp:21:
/usr/include/qt4/QtCore/qstring.h:597:5: note: declared private here
     QString(const char *ch);
     ^~~~~~~
Makefile:251: recipe for target 'generated/version.o' failed
make[1]: *** [generated/version.o] Error 1
make[1]: Leaving directory '/mnt/home01/soft/actiona/actiona/tools'
Makefile:48: recipe for target 'sub-tools-make_default-ordered' failed
make: *** [sub-tools-make_default-ordered] Error 2

不确定从何处继续。尝试手动更新每个依赖项,但无济于事。

注意,对于Ubuntu 18.04,libopencv的版本为3.2。可以安装3.1吗?如果是这样,如何以及如何保持/不搞乱3.2,因为它可能在其他地方使用。

还是其他调查途径?

0 个答案:

没有答案