PDA

View Full Version : Build QSerialPort with QT5.02 and mingw error



wang9658
24th April 2013, 01:11
Newbie to QSerialPort.

I'v gotten QSerialPrt code from git: git clone git://gitorious.org/qt/qtserialport.git
The directory tree:

G:\GNU\QSerialPort

013/04/24 07:24 <DIR> .
013/04/24 07:24 <DIR> ..
013/04/24 07:09 <DIR> qtserialport
013/04/24 07:24 <DIR> serialport-build


qtserialport is src
I create serial-build for objects output.

Perl installed with msys+mingw32, I added it to the PATH.

build steps:

G:\GNU\QSerialPort\serialport-build>qmake ..\qtserialport\qtserialport.pro
Info: creating cache file G:/GNU/QSerialPort/serialport-build/.qmake.cache

G:\GNU\QSerialPort\serialport-build>mingw32-make
cd src/ && ( test -e Makefile || C:/Qt/Qt5.0.2/5.0.2/mingw47_32/bin/qmake.exe G:
/GNU/QSerialPort/qtserialport/src/src.pro -o Makefile ) && mingw32-make -f Makef
ile
mingw32-make[1]: Entering directory 'g:/GNU/QSerialPort/serialport-build/src'
cd serialport/ && ( test -e Makefile || c:/Qt/Qt5.0.2/5.0.2/mingw47_32/bin/qmake
.exe G:/GNU/QSerialPort/qtserialport/src/serialport/serialport.pro -o Makefile )
&& c:/Qt/Qt5.0.2/Tools/MinGW/bin/mingw32-make -f Makefile
Project MESSAGE: C:/Qt/Qt5.0.2/5.0.2/mingw47_32/bin/syncqt.bat -module QtSerialP
ort -version 5.1.0 -outdir G:/GNU/QSerialPort/serialport-build G:/GNU/QSerialPor
t/qtserialport
<srcbase> = g:/GNU/QSerialPort/qtserialport
<outbase> = G:/GNU/QSerialPort/serialport-build
QtSerialPort: created fwd-include header(s) for <srcbase>/src/serialport/ { qser
ialport.h (2), qserialport_p.h (1), qserialport_symbian_p.h (1), qserialport_uni
x_p.h (1), qserialport_win_p.h (1), qserialportglobal.h (1), qserialportinfo.h (
2), qserialportinfo_p.h (1), qttylocker_unix_p.h (1) }
QtSerialPort: created fwd-include header(s) for <srcbase>/src/serialport/qt4supp
ort/ { qringbuffer_p.h (1), qwineventnotifier_p.h (1) }
QtSerialPort: created headers.pri file
mingw32-make[2]: Entering directory 'g:/GNU/QSerialPort/serialport-build/src/ser
ialport'
c:/Qt/Qt5.0.2/Tools/MinGW/bin/mingw32-make -f Makefile.Release all
mingw32-make[3]: Entering directory 'g:/GNU/QSerialPort/serialport-build/src/ser
ialport'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W
all -Wextra -DUNICODE -DQT_BUILD_SERIALPORT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO
_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEP
RECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQ
T_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CORE_LIB -IG:/GNU/QSerialPort/qtserialport/sr
c/serialport -I'G:/GNU/QSerialPort/qtserialport/src/serialport' -I'../../include
' -I'../../include/QtSerialPort' -I'../../include/QtSerialPort/5.1.0' -I'../../i
nclude/QtSerialPort/5.1.0/QtSerialPort' -I'tmp' -I'C:/Qt/Qt5.0.2/5.0.2/mingw47_3
2/include' -I'C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/QtCore' -I'C:/Qt/Qt5.0.2/5.
0.2/mingw47_32/include/QtCore/5.0.2' -I'C:/Qt/Qt5.0.2/5.0.2/mingw47_32/include/Q
tCore/5.0.2/QtCore' -I'.moc/release_shared' -I'.' -I'C:/Qt/Qt5.0.2/5.0.2/mingw47
_32/mkspecs/win32-g++' -o .obj/release_shared/qserialport.o G:/GNU/QSerialPort/q
tserialport/src/serialport/qserialport.cpp
In file included from G:/GNU/QSerialPort/qtserialport/src/serialport/qserialport
.h:48:0,
from G:/GNU/QSerialPort/qtserialport/src/serialport/qserialport
.cpp:45:
../../include/QtSerialPort/qserialportglobal.h:1:96: fatal error: ../../include/
QtSerialPort/../../../../../../g:/GNU/QSerialPort/qtserialport/src/serialport/qs
erialportglobal.h: Invalid argument
compilation terminated.
Makefile.Release:288: recipe for target '.obj/release_shared/qserialport.o' fail
ed
mingw32-make[3]: *** [.obj/release_shared/qserialport.o] Error 1
mingw32-make[3]: Leaving directory 'g:/GNU/QSerialPort/serialport-build/src/seri
alport'
Makefile:38: recipe for target 'release-all' failed
mingw32-make[2]: *** [release-all] Error 2
mingw32-make[2]: Leaving directory 'g:/GNU/QSerialPort/serialport-build/src/seri
alport'
Makefile:38: recipe for target 'sub-serialport-make_first' failed
mingw32-make[1]: *** [sub-serialport-make_first] Error 2
mingw32-make[1]: Leaving directory 'g:/GNU/QSerialPort/serialport-build/src'
makefile:40: recipe for target 'sub-src-make_first' failed
mingw32-make: *** [sub-src-make_first] Error 2

G:\GNU\QSerialPort\serialport-build\include\QtSerialPort\qserialportglobal.h was created by the build script
Who can help me?

kuzulis
24th April 2013, 07:54
You have the wrong Perl version.

It is necessary to install it: http://www.activestate.com/activeperl

PS: See Qt5 requirements

wang9658
24th April 2013, 09:57
It's not OK with the perl in msys? How do you find the wrong perl version?

kuzulis
24th April 2013, 11:39
See Qt5 Windows Build environment (http://qt-project.org/wiki/Building_Qt_5_from_Git#aea23489ce3aa9b6406ebb28e0c da430)

wang9658
24th April 2013, 15:07
I install the latest activeperl and activepython.
The error is still.

kuzulis
24th April 2013, 15:56
Please read this: https://bugreports.qt-project.org/browse/QTPLAYGROUND-26