[SOLVED] QT Serial Communication with Beaglebone
-
you are request qmake from system bin prefix since
you are inside directory as i can see
/opt/qt/bin
use ./qmake instead of qmake
or use
@
cd ~/Downloads/qt-qtserialport && /opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro && make
@
then
@
sudo make install
@ -
Hi,
tried your command seiko but still get the errors...
cd ~/Downloads/qt-qtserialport && /opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro && make
WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/common/g++.conf:44: Variable QMAKE_RPATH is deprecated; use QMAKE_LFLAGS_RPATH instead.
WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/features/yacc.prf:27: Unescaped backslashes are deprecated.
WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/features/lex.prf:19: Unescaped backslashes are deprecated.
cd src/ && make -f Makefile
make[1]: Entering directory/home/julian/Downloads/qt-qtserialport/src' cd serialport/ && make -f Makefile make[2]: Entering directory
/home/julian/Downloads/qt-qtserialport/src/serialport'
arm-angstrom-linux-gnueabi-g++ -c -pipe -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_SERIALPORT_LIB -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -I. -I/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia/QtCore -I/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia -I. -I../../include -I../../include/QtSerialPort -Iqt4support/include -Iqt4support/include/QtCore -Iqt4support/include/private -I. -o qserialport_unix.o qserialport_unix.cpp
qserialport_unix.cpp:58:34: error: QtCore/qelapsedtimer.h: No such file or directory
qserialport_unix.cpp: In member function 'bool QSerialPortPrivate::waitForReadyRead(int)':
qserialport_unix.cpp:427: error: 'QElapsedTimer' was not declared in this scope
qserialport_unix.cpp:427: error: expected;' before 'stopWatch' qserialport_unix.cpp:429: error: 'stopWatch' was not declared in this scope qserialport_unix.cpp: In member function 'bool QSerialPortPrivate::waitForBytesWritten(int)': qserialport_unix.cpp:461: error: 'QElapsedTimer' was not declared in this scope qserialport_unix.cpp:461: error: expected
;' before 'stopWatch'
qserialport_unix.cpp:463: error: 'stopWatch' was not declared in this scope
make[2]: *** [qserialport_unix.o] Error 1
make[2]: Leaving directory/home/julian/Downloads/qt-qtserialport/src/serialport' make[1]: *** [sub-serialport-make_default] Error 2 make[1]: Leaving directory
/home/julian/Downloads/qt-qtserialport/src'
make: *** [sub-src-make_default-ordered] Error 2Then I tried : /opt/qt/bin$ sudo ./qmake ~/Downloads/qt-qtserialport/qtserialport.pro
Makefile has been generated but then, when calling make :
/opt/qt/bin$ lsMakefile moc qmake rcc uic
/opt/qt/bin$ sudo makeI get the following errors :
cd src/ && /opt/qt/bin/qmake /home/julian/Downloads/qt-qtserialport/src/src.pro -o Makefile
cd src/ && make -f Makefile
make[1]: Entering directory/opt/qt/bin/src' cd serialport/ && /opt/qt/bin/qmake /home/julian/Downloads/qt-qtserialport/src/serialport/serialport.pro -o Makefile cd serialport/ && make -f Makefile make[2]: Entering directory
/opt/qt/bin/src/serialport'
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/bin/g++ -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_SERIALPORT_LIB -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/opt/qt/mkspecs/qws/linux-am335x-g++ -I/home/julian/Downloads/qt-qtserialport/src/serialport -I/opt/qt/include/QtCore -I/opt/qt/include -I/home/julian/Downloads/qt-qtserialport/src/serialport -I../../include -I../../include/QtSerialPort -I/home/julian/Downloads/qt-qtserialport/src/serialport/qt4support/include -I/home/julian/Downloads/qt-qtserialport/src/serialport/qt4support/include/QtCore -I/home/julian/Downloads/qt-qtserialport/src/serialport/qt4support/include/private -I. -I/home/julian/Downloads/qt-qtserialport/src/serialport -I. -o qserialport.o /home/julian/Downloads/qt-qtserialport/src/serialport/qserialport.cpp
In file included from /home/julian/Downloads/qt-qtserialport/src/serialport/qserialport.cpp:1399:
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:14:2: error: #error "This file was generated using the moc from 4.6.3. It"
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:15:2: error: #error "cannot be used with the include files from this version of Qt."
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:16:2: error: #error "(The moc has changed too much.)"
make[2]: *** [qserialport.o] Error 1
make[2]: Leaving directory/opt/qt/bin/src/serialport' make[1]: *** [sub-serialport-make_default] Error 2 make[1]: Leaving directory
/opt/qt/bin/src'
make: *** [sub-src-make_default-ordered] Error 2I think I'm still missing sth but can't figure exactly what....
Thanks.
-
Are you sure from install qt 4.8 ?
Because the error still exist "QElapsedTimer"@
qserialport_unix.cpp:58:34: error: QtCore/qelapsedtimer.h: No such file or directory
qserialport_unix.cpp: In member function ‘bool QSerialPortPrivate::waitForReadyRead(int)’:
qserialport_unix.cpp:427: error: ‘QElapsedTimer’ was not declared in this scope
@By enter follow command you should see what's your qt version
@
/opt/qt/bin/qmake -v && /opt/qt/bin/moc -v
@ -
first of all check qt doc link "check qt doc link...":http://qt-project.org/wiki/QtSerialPort and re-extract to get a clean dir of QtSerialPort
because what I see here from your log
looks like duplicated qmake or you moc version isn't the same as qmake
@
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:14:2: error: #error “This file was generated using the moc from 4.6.3. It”
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:15:2: error: #error “cannot be used with the include files from this version of Qt.”
/home/julian/Downloads/qt-qtserialport/src/serialport/moc_qserialport.cpp:16:2:
@
check your moc version
@
/opt/qt/bin/moc -v
@
Also your qtopia using old qt flags
@
WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/share/qtopia/mkspecs/common/g++.conf:44: Variable QMAKE_RPATH is deprecated; use QMAKE_LFLAGS_RPATH instead.
WARNING: /usr/local/angstrom/arm/arm-angstrom-linux-
@ -
Qt Meta Object Compiler version 63 (Qt 4.8.2)
Would it help if I uninstall qt4-emebedded ?
I think it has worked this time.
So I downloaded qt-qtserialport once more and extracted it.
Then :
@cd ~/Downloads/qt-qtserialport
/opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro
make
sudo make install
@
and it finished without errors. I'm gonna check how it's going in QTCreator. -
Would it help if I uninstall qt4-emebedded ?
I don't think so , If you upgraded your qt version to 4.8 so your qt4-emebedded gonna upgraded too[quote author="Tilapia21" date="1391776804"]
I think it has worked this time.
So I downloaded qt-qtserialport once more and extracted it.
Then :
@cd ~/Downloads/qt-qtserialport
/opt/qt/bin/qmake ~/Downloads/qt-qtserialport/qtserialport.pro
make
sudo make install
@
and it finished without errors. I'm gonna check how it's going in QTCreator.[/quote]Here was my guess you used qmake version 4.6.3 then after you upgrade
you used qmake version 4.8.2 without clean the old moc files and MakeFileso I think everything gonna work fine with you this time
-
Sorry, I forgot to mention I had done it too.
@QT += core gui
CONFIG += serialport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgetsTARGET = QTTest2
target.files = QTTest2
target.path = /home/rootINSTALLS += target
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
FORMS += mainwindow.ui@
-
-
Ok, just a last problem then I think I'll be ready to fly on my own.
I compiled the "terminal" example and it was displayed on the beaglebone screen. But I wanted to change the mainWindow resolution cause the example was really small and I should have made sth wrong cause now I get this error :
16:06:32: Running steps for project terminal...
16:06:32: Configuration unchanged, skipping qmake step.
16:06:32: Starting: "/usr/bin/make"
arm-angstrom-linux-gnueabi-g++ -Wl,-rpath-link,/opt/qt/lib -o terminal main.o mainwindow.o settingsdialog.o console.o moc_mainwindow.o moc_settingsdialog.o moc_console.o qrc_terminal.o -L/home/julian/Downloads/qt-qtserialport/src/serialport -L/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/lib -lglib-2.0 -lQtSerialPort -lQtGui -lQtCore -lpthread
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lQtGui
collect2: ld returned 1 exit status
make: *** [terminal] Error 1
16:06:32: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project terminal (kit: BeagleboneKit)
When executing step 'Make'
16:06:32: Elapsed time: 00:00. -
@
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lQtGui
collect2: ld returned 1 exit status
@
the linker can't find QtGui because in follow directory you should have
QT library and I don't why qt qmake didn't even provide the path of lib maybe you should recall qmake
@
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/lib
@