4

我正在尝试在 Ubuntu i386 上安装 Qt5 - Beta。 http://qt-project.org/wiki/Qt_5.0

我运行命令:

./configure -prefix $PWD/qtbase -opensource -nomake tests
make

也试过

./configure -prefix $PWD/qtbase -opensource -nomake tests
./build -j 4

我分别有以下错误:

make[2]: Entering directory `/home/qt-everywhere-opensource-src-5.0.0/qtbase/examples'
cd serviceframework/ && /home/qt-everywhere-opensource-src-5.0.0/qtbase/bin/qmake  /home/qt-everywhere-opensource-src-5.0.0/qtbase/examples/serviceframework   /serviceframework.pro -spec /home/qt-everywhere-opensource-src-5.0.0/qtbase/mkspecs/linux-g++ -o Makefile
Cannot find file: /home/qt-everywhere-opensource-src-5.0.0/qtbase/examples/serviceframework/serviceframework.pro.
make[2]: *** [serviceframework/Makefile] Error 2
make[2]: Leaving directory `/home/qt-everywhere-opensource-src-5.0.0/qtbase/examples'
make[1]: *** [sub-examples-make_default-ordered] Error 2
make[1]: Leaving directory `/home/qt-everywhere-opensource-src-5.0.0/qtbase'
make: *** [module-qtbase-make_default] Error 2

Cannot find file: /home/qt-everywhere-opensource-src-5.0.0/qtbase/examples/serviceframework/serviceframework.pro.
make[1]: *** [serviceframework/Makefile] Error 2
make[1]: *** Waiting for unfinished jobs....
Cannot find file: /home/qt-everywhere-opensource-src-5.0.0/qtbase/examples/publishsubscribe/publishsubscribe.pro.
make[1]: *** [publishsubscribe/Makefile] Error 2
make[1]: Leaving directory `/home/qt-everywhere-opensource-src-5.0.0/qtbase/examples'
make: *** [sub-examples-make_default-ordered] Error 2
cd qtbase && make -j 4 exited with status 512 at ./build line 64
    Qt::Build::exe('Qt::Build=HASH(0x8dae8b8)', 'cd qtbase && make -j 4') called at ./build line 114
    Qt::Build::exeLowPriv('Qt::Build=HASH(0x8dae8b8)', 'cd qtbase && make -j 4') called at ./build line 377
    Qt::Build::build_project('Qt::Build=HASH(0x8dae8b8)', 'qtbase') called at ./build line 408
    Qt::Build::build_qt('Qt::Build=HASH(0x8dae8b8)') called at ./build line 437
    Qt::Build::run('Qt::Build=HASH(0x8dae8b8)') called at ./build line 446
'cd qtbase && make -j 4' failed: 512 at ./build line 377.

好吧,我也在 Windows 8 上试过。做了类似的方法:

 set PATH=%PATH%;%CD%\qtbase\bin;
 configure -prefix %CD%\qtbase -opensource -nomake tests
 mingw32-make

 set PATH=%PATH%;%CD%\qtbase\bin;
 configure -prefix %CD%\qtbase -opensource -nomake tests
 perl build

分别有以下错误:

 codecs\qtextcodec.cpp: In function 'void setup()':
 codecs\qtextcodec.cpp:288:16: error: expected type-specifier before 'QIconvCodec
 '
codecs\qtextcodec.cpp:288:16: error: expected ';' before 'QIconvCodec'
mingw32-make[4]: *** [tmp/obj/debug_shared/qtextcodec.o] Error 1
mingw32-make[4]: Leaving directory `C:/2_install/qt-everywhere-opensource-src-5.
0.0-beta1/qtbase/src/corelib'
mingw32-make[3]: *** [debug-all] Error 2
mingw32-make[3]: Leaving directory `C:/2_install/qt-everywhere-opensource-src-5.
0.0-beta1/qtbase/src/corelib'
mingw32-make[2]: *** [sub-corelib-make_first] Error 2
mingw32-make[2]: Leaving directory `C:/2_install/qt-everywhere-opensource-src-5.
0.0-beta1/qtbase/src'
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory `C:/2_install/qt-everywhere-opensource-src-5.
0.0-beta1/qtbase'
mingw32-make: *** [module-qtbase-make_first] Error 2

codecs\qtextcodec.cpp:288:16: error: expected ';' before 'QIconvCodec'
mingw32-make[3]: *** [tmp/obj/debug_shared/qtextcodec.o] Error 1
mingw32-make[3]: Leaving directory `C:/2_install/qt-everywhere-opensource-src-5.
0.0-beta1/qtbase/src/corelib'
mingw32-make[2]: *** [debug-all] Error 2
mingw32-make[2]: Leaving directory `C:/2_install/qt-everywhere-opensource-src-5.
0.0-beta1/qtbase/src/corelib'
mingw32-make[1]: *** [sub-corelib-make_first] Error 2
mingw32-make[1]: Leaving directory `C:/2_install/qt-everywhere-opensource-src-5.
0.0-beta1/qtbase/src'
mingw32-make: *** [sub-src-make_first] Error 2
'cd qtbase && "C:\MinGW\bin\mingw32-make.exe" ' failed: 512
Fatal failure building qtbase at build line 443.
    Qt::Build::build_project('Qt::Build=HASH(0x5a711c)', 'qtbase') called at
  build line 484
    Qt::Build::build_qt('Qt::Build=HASH(0x5a711c)') called at build line 544

    Qt::Build::run('Qt::Build=HASH(0x5a711c)') called at build line 553

所以,显然这是包中的一个错误。

一些评论?任何建议都非常感谢!

4

1 回答 1

3

而不是运行静态二进制文件,而是从源代码构建它,很可能你会解决这种奇怪的错误。我遇到了类似的问题,只有在构建后才解决。在这里检查一下:

于 2014-02-26T23:38:13.557 回答