0

我目前正在 Qt 中从事跨平台项目。我目前正在 Linux (Mint x64) 上开发,但需要将部分项目部署到 Solaris 10 服务器。

我一直在尝试在 solaris 上构建 Qt5.0.1 大约 3 天,但收效甚微!

我已经从这里下载了源代码并成功提取了存档。

在尝试运行配置脚本时,我首先遇到了通过将 qtbase/configure 脚本更改为使用 /bin/bash 而不是 /bin/sh 来修复的语法错误。

然后我在运行配置时遇到了几个问题:

./configure -platform solaris-g++
  • 配置无法检测架构(不是破坏性故障,而是......)
  • “未启用 QPA 平台插件!” - 我已明确安装(使用 pkgutil)libxcb 和 xcbutil
  • 使用 -no-qpa-platform-guard 标志时,配置完成,然后:
    • 当我运行 gmake -j4 时,我在构建中遇到了各种各样的错误

编译错误是:

In file included from ../3rdparty/pcre/pcre16_compile.c:43:0:
../3rdparty/pcre/pcre_compile.c: In function 'compile_branch':
../3rdparty/pcre/pcre_compile.c:5193:18: error: 'int64_t' undeclared (first use in this function)
../3rdparty/pcre/pcre_compile.c:5193:18: note: each undeclared identifier is reported only once for each function it appears in
../3rdparty/pcre/pcre_compile.c:5194:36: error: expected ')' before 'length_prevgroup'
../3rdparty/pcre/pcre_compile.c:5264:32: error: expected ')' before 'repeat_max'gcc -c -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_XCB -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_USE_ICU -DPCRE_HAVE_CONFIG_H -DHB_EXPORT=Q_CORE_EXPORT -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I../../mkspecs/solaris-g++ -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.0.1 -I../../include/QtCore/5.0.1/QtCore -Iglobal -I../3rdparty/pcre -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared -I/usr/sfw/include -o .obj/release-shared/pcre16_dfa_exec.o ../3rdparty/pcre/pcre16_dfa_exec.c
gmake[3]: *** [.obj/release-shared/pcre16_compile.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: Leaving directory `/export/home/emackenzie/Downloads/qt-everywhere-opensource-src-5.0.1/qtbase/src/corelib'
gmake[2]: *** [sub-corelib-make_first] Error 2
gmake[2]: Leaving directory `/export/home/emackenzie/Downloads/qt-everywhere-opensource-src-5.0.1/qtbase/src'
gmake[1]: *** [sub-src-make_first] Error 2
gmake[1]: Leaving directory `/export/home/emackenzie/Downloads/qt-everywhere-opensource-src-5.0.1/qtbase'
gmake: *** [module-qtbase-make_first] Error 2

任何帮助将不胜感激!

[更新] 好的,所以我通过注释掉 pcre_internal.h:217,218,219,221 解决了这个编译错误:

//#if HAVE_STDINT_H
//#include <stdint.h>
//#elif HAVE_INTTYPES_H
#include <inttypes.h>
//#endif

现在我收到此错误:

io/qtemporarydir.cpp: In member function 'void QTemporaryDirPrivate::create(const QString&)':
io/qtemporarydir.cpp:150:30: error: 'mkdtemp' was not declared in this scope
gmake[3]: *** [.obj/release-shared/qtemporarydir.o] Error 1

我已经检查了源并且 stdlib.h 被包含(应该在其中声明 mkdtemp)并且它位于 /usr/include 的文件系统中

同样,任何帮助都会很棒。

4

1 回答 1

0

找出系统中声明的标头int64_t以及pcre_compile.c#include上的哪个标头。

于 2013-04-09T15:54:17.093 回答