This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: Linux/AM3358: Qt serial port build issue

Part Number: AM3358

Tool/software: Linux

Hello,

Here are my specs:

TI SDK: 03.03.00.04

QT Build version: v5.9.5

Ubuntu 18.04

I am trying to import the qtserialport into my SDK for my Beaglebone Black application. Here are the steps I followed:

1) Git init for /opt/serialport (Directory i am working)

2) git clone git://code.qt.io/qt/qtserialport.git (Cloning the repository)

3) git checkout v5.9.5 (Selecting my version of the module)

4) Source environment-setup (My linux-devkit)

5) qmake qtserialport.pro

Result:

Info: creating cache file /opt/qtserialport/qtserialport/.qmake.cache
Checking for ntddmodm... no

6)Make

This is where i get the errors (see bold below):

[linux-devkit]:/opt/qtserialport/qtserialport> make
cd src/ && ( test -e Makefile || /opt/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/qt5/qmake /opt/qtserialport/qtserialport/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory '/opt/qtserialport/qtserialport/src'
cd serialport/ && ( test -e Makefile || /opt/ti-processor-sdk-linux-am335x-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/qt5/qmake /opt/qtserialport/qtserialport/src/serialport/serialport.pro -o Makefile ) && make -f Makefile
/opt/qtserialport/qtserialport/src/serialport/serialport-lib.pri:3: 'qtConfig' is not a recognized test function.
<srcbase> = /opt/qtserialport/qtserialport
<outbase> = /opt/qtserialport/qtserialport
QtSerialPort: created fwd-include header(s) for <srcbase>/src/serialport/ { qserialport.h (2), qserialport_p.h (1), qserialportglobal.h (1), qserialportinfo.h (2), qserialportinfo_p.h (1), qtudev_p.h (1) }
QtSerialPort: created version header
QtSerialPort: created master header
QtSerialPort: created headers.pri file
make[2]: Entering directory '/opt/qtserialport/qtserialport/src/serialport'
creating linker version script QtSerialPort.version
moc qserialport.h
compiling qserialport.cpp
qserialport.cpp: In constructor 'QSerialPortPrivate::QSerialPortPrivate()':
qserialport.cpp:125:5: error: 'writeBufferChunkSize' was not declared in this scope
     writeBufferChunkSize = InitialBufferSize;
     ^
qserialport.cpp: At global scope:
qserialport.cpp:611:1: error: 'QT_WARNING_DISABLE_DEPRECATED' does not name a type
 QT_WARNING_DISABLE_DEPRECATED
 ^
qserialport.cpp: In member function 'bool QSerialPort::clear(QSerialPort::Directions)':
qserialport.cpp:1085:12: error: 'class QSerialPortPrivate' has no member named 'writeBuffer'
         d->writeBuffer.clear();
            ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp: In static member function 'static void QSerialPort::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
.moc/moc_qserialport.cpp:340:104: warning: 'void QSerialPort::dataErrorPolicyChanged(QSerialPort::DataErrorPolicy)' is deprecated [-Wdeprecated-declarations]
         case 5: _t->dataErrorPolicyChanged((*reinterpret_cast< QSerialPort::DataErrorPolicy(*)>(_a[1]))); break;
                                                                                                        ^
In file included from qserialport.cpp:43:0:
qserialport.h:283:24: note: declared here
     QT_DEPRECATED void dataErrorPolicyChanged(QSerialPort::DataErrorPolicy policy);
                        ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp:345:89: warning: 'void QSerialPort::settingsRestoredOnCloseChanged(bool)' is deprecated [-Wdeprecated-declarations]
         case 10: _t->settingsRestoredOnCloseChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
                                                                                         ^
In file included from qserialport.cpp:43:0:
qserialport.h:292:24: note: declared here
     QT_DEPRECATED void settingsRestoredOnCloseChanged(bool restore);
                        ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp:389:80: warning: 'void QSerialPort::dataErrorPolicyChanged(QSerialPort::DataErrorPolicy)' is deprecated [-Wdeprecated-declarations]
             if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&QSerialPort::dataErrorPolicyChanged)) {
                                                                                ^
In file included from qserialport.cpp:43:0:
qserialport.h:283:24: note: declared here
     QT_DEPRECATED void dataErrorPolicyChanged(QSerialPort::DataErrorPolicy policy);
                        ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp:424:80: warning: 'void QSerialPort::settingsRestoredOnCloseChanged(bool)' is deprecated [-Wdeprecated-declarations]
             if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&QSerialPort::settingsRestoredOnCloseChanged)) {
                                                                                ^
In file included from qserialport.cpp:43:0:
qserialport.h:292:24: note: declared here
     QT_DEPRECATED void settingsRestoredOnCloseChanged(bool restore);
                        ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp:448:80: warning: 'QSerialPort::DataErrorPolicy QSerialPort::dataErrorPolicy() const' is deprecated [-Wdeprecated-declarations]
         case 5: *reinterpret_cast< DataErrorPolicy*>(_v) = _t->dataErrorPolicy(); break;
                                                                                ^
qserialport.cpp:1152:30: note: declared here
 QSerialPort::DataErrorPolicy QSerialPort::dataErrorPolicy() const
                              ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp:452:77: warning: 'bool QSerialPort::settingsRestoredOnClose() const' is deprecated [-Wdeprecated-declarations]
         case 9: *reinterpret_cast< bool*>(_v) = _t->settingsRestoredOnClose(); break;
                                                                             ^
qserialport.cpp:636:6: note: declared here
 bool QSerialPort::settingsRestoredOnClose() const
      ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp:466:80: warning: 'bool QSerialPort::setDataErrorPolicy(QSerialPort::DataErrorPolicy)' is deprecated [-Wdeprecated-declarations]
         case 5: _t->setDataErrorPolicy(*reinterpret_cast< DataErrorPolicy*>(_v)); break;
                                                                                ^
qserialport.cpp:1133:6: note: declared here
 bool QSerialPort::setDataErrorPolicy(DataErrorPolicy policy)
      ^
In file included from qserialport.cpp:1476:0:
.moc/moc_qserialport.cpp:469:77: warning: 'void QSerialPort::setSettingsRestoredOnClose(bool)' is deprecated [-Wdeprecated-declarations]
         case 9: _t->setSettingsRestoredOnClose(*reinterpret_cast< bool*>(_v)); break;
                                                                             ^
In file included from qserialport.cpp:43:0:
qserialport.h:217:24: note: declared here
     QT_DEPRECATED void setSettingsRestoredOnClose(bool restore);
                        ^
Makefile:658: recipe for target '.obj/qserialport.o' failed
make[2]: *** [.obj/qserialport.o] Error 1
make[2]: Leaving directory '/opt/qtserialport/qtserialport/src/serialport'
Makefile:42: recipe for target 'sub-serialport-make_first' failed
make[1]: *** [sub-serialport-make_first] Error 2
make[1]: Leaving directory '/opt/qtserialport/qtserialport/src'
Makefile:44: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2

I have no idea what the issue is and have tried countless solutions with no results.

Any help is appreciated.

  • Hello David,

    Please, build the qtserialport in this way.

    Best regards,
    Kemal

  • Hello Kemal,

    Yes I have tried this procedure before. When I run the last command "MACHINE=am335x-evm bitbake qtserialport" i get the following error:

    root@david-ThinkPad-T450s:/opt/tisdk/build# MACHINE=am335x-evm bitbake qtserialport
    NOTE: Your conf/bblayers.conf has been automatically updated.
    NOTE: Your conf/bblayers.conf has been automatically updated.
    ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
        Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
        Following is the list of potential problems / advisories:

        Do not use Bitbake as root.

    Summary: There was 1 ERROR message shown, returning a non-zero exit code.

    Not sure if any of this is supposed to be done while in the linux-devkit as the steps do not specify, so it was done in root. Furthermore when i try to run this command the directory is incomplete:

    cp -r <tisdk>/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/qtserialport/<version>/image/usr/ <Processor SDK>/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/


    qtserialport folder is not in armv7ahf-neon-linux-gnueabi, perhaps because of the previous error i mentioned. So do these need to be run while sourcing the devkit?

  • The first rule of building "Do not build as root!".

    Exit from the root shell, initialize the OE in your home directory and retry the steps.

  • So to be clear you are saying that the whole process is to be done in the Devkit? Including cloning the repository?

  • Yes. Building it in the OE build system will be the easiest way.

  • So the first thing i did was source environment-setup to go into my devkit. I then proceeded to follow the steps one by one. It now fails here:

    ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-04.02.00.09-config.txt

    I get this error:

    cloning repo meta-ros

    Cloning into '/opt/tisdk/sources/meta-ros'...
    fatal: unable to access 'github.com/.../': error setting certificate verify locations:
      CAfile: /tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sy
    ERROR: Could not clone repository at 

     


    This only happens in the devkit, I can clone it fine in root. I thought Ti's documentation said it was inappropriate to clone repositories while in the sdk environment.

  • Can you switch to the latest processor SDK version? Is it mandatory to use the TI SDK: 03.03.00.04? If it is a must to use the TI SDK: 03.03.00.04, you will need to initialize the processor-sdk-03.00.00.04-config.txt file, but it will not build fine over Ubuntu 18.04. You will need to downgrade the Ubuntu to 16.04 or 14.04 to be able to build that old TI SDK: 03.03.00.04.

  • Sorry for the late reply. I was finally able to successfully compile my module. The issue was I was using the wrong module version. It was supposed to be 5.6.2, not 5.9.5. I followed my original steps and was able to build serialport and application with no further issue. Thanks for your insight Kemal.