Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCS: Build broken on GCC 8.1 (qsciencespinbox) #2205

Open
tracernz opened this issue May 18, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@tracernz
Copy link
Member

commented May 18, 2018

Bad code in ~~~qsciencespinbox~~~ -e- actually in Qt... according to our source file:

/**
 * Code copied from http://www.matthiaspospiech.de/blog/2009/01/03/qt-spinbox-widget-with-scientific-notation/
 */

-e- Fixed in qt/qtbase@342bb5b
So, either need to wait for Qt 5.9.5, or go to Qt 5.10/11... or I need to build my own patched Qt 5.9.2. 😢

$ gcc --version
gcc (GCC) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make -j8 gcs
.... snip ...
compiling /home/mike/dev/dronin/ground/gcs/src/libs/qscispinbox/QScienceSpinBox.cpp
moc /home/mike/dev/dronin/ground/gcs/src/libs/qscispinbox/QScienceSpinBox.h
compiling .moc/debug-shared/moc_QScienceSpinBox.cpp
In file included from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qbrush.h:50,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qpalette.h:46,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/qwidget.h:48,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/qabstractspinbox.h:44,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/qspinbox.h:44,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/QDoubleSpinBox:1,
                 from /home/mike/dev/dronin/ground/gcs/src/libs/qscispinbox/QScienceSpinBox.h:13,
                 from /home/mike/dev/dronin/ground/gcs/src/libs/qscispinbox/QScienceSpinBox.cpp:4:
/home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qtransform.h: In member function ‘QTransform& QTransform::operator=(QTransform&&)’:
/home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qtransform.h:81:46: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class QTransform’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
     { memcpy(this, &other, sizeof(QTransform)); return *this; }
                                              ^
/home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qtransform.h:57:20: note: ‘class QTransform’ declared here
 class Q_GUI_EXPORT QTransform
                    ^~~~~~~~~~
cc1plus: all warnings being treated as errors
make[4]: *** [Makefile:740: .obj/debug-shared/QScienceSpinBox.o] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qbrush.h:50,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qpalette.h:46,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/qwidget.h:48,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/qabstractspinbox.h:44,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/qspinbox.h:44,
                 from /home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtWidgets/QDoubleSpinBox:1,
                 from .moc/debug-shared/../../../../../../../../ground/gcs/src/libs/qscispinbox/QScienceSpinBox.h:13,
                 from .moc/debug-shared/moc_QScienceSpinBox.cpp:9:
/home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qtransform.h: In member function ‘QTransform& QTransform::operator=(QTransform&&)’:
/home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qtransform.h:81:46: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class QTransform’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
     { memcpy(this, &other, sizeof(QTransform)); return *this; }
                                              ^
/home/mike/dev/dronin/tools/Qt5.9.2/5.9.2/gcc_64/include/QtGui/qtransform.h:57:20: note: ‘class QTransform’ declared here
 class Q_GUI_EXPORT QTransform
                    ^~~~~~~~~~
cc1plus: all warnings being treated as errors
make[4]: *** [Makefile:743: .obj/debug-shared/moc_QScienceSpinBox.o] Error 1
make[3]: *** [Makefile:54: sub-qscispinbox-make_first-ordered] Error 2
make[2]: *** [Makefile:48: sub-libs-make_first-ordered] Error 2
make[1]: *** [Makefile:47: sub-src-make_first-ordered] Error 2
make: *** [Makefile:291: gcs] Error 2

@tracernz tracernz added this to the Inconceivable milestone May 18, 2018

@tracernz tracernz changed the title GCS: Build broken on GCC 8.1 GCS: Build broken on GCC 8.1 (qsciencespinbox) May 18, 2018

@mlyle mlyle modified the milestones: Inconceivable, Ludicrous May 18, 2018

@mlyle

This comment has been minimized.

Copy link
Member

commented May 18, 2018

Bumped to Ludicrous-- can't do tools changes this late in inconceivable cycle (want to ship)

@mlyle

This comment has been minimized.

Copy link
Member

commented May 18, 2018

It looks like we have a few dubious memcpy's too but should wait for upstream tools to be ready for 8.1 to hunt 'em.

@tracernz

This comment has been minimized.

Copy link
Member Author

commented May 18, 2018

I can still build with clang (6.0.0) without any hax (luckily we don't do -Werror there).

rgorosito added a commit to rgorosito/dRonin that referenced this issue Mar 17, 2019

tracernz added a commit that referenced this issue Mar 25, 2019

Merge pull request #2243 from rgorosito/fix-2205
disable '-Werror' on linux too. Fix issue #2205

fxbisto added a commit to fxbisto/dRonin-MQF that referenced this issue Apr 12, 2019

fxbisto added a commit to fxbisto/dRonin-MQF that referenced this issue Apr 12, 2019

fxbisto added a commit to fxbisto/dRonin-MQF that referenced this issue Apr 13, 2019

Pull upstream changes into "next"
* pios_bmp280: prevent i2c/spi r/w peeking at globals

* pios_bmp280: formatting

* pios_bmp280: probe without allocating structures

* pios_i2c: check bus clear before completion of init

* revolution: simplify i2c init / clone logic

* revolution: probe bmp280 on clones

* GCS:UAVTalk: Don't check backlog for QFileDevices

It has quite a large buffer, larger than our backlog limit for telemetry,
thus it always got blocked by our internal buffer size check and stopped
working.

* disable '-Werror' on linux too. Fix issue d-ronin#2205

* UAVOMSPBridge: Send ! instead of | for MSP error

This was raised in a BLHeli issue[6]. The MSP code sends a message with `|` in
the case of an unknown message type[1]. That is consistent with the Multiwii
protocol spec[2], but differs from the actual multiwii/baseflight/betaflight
implementations, which send `!`[3][4][5]. Since we're on our own here, I think
we need to disregard the original protocol spec.

[1] https://github.com/d-ronin/dRonin/blob/7b44093d461d073eba52d8d9558a4e56769fd4b3/flight/Modules/UAVOMSPBridge/UAVOMSPBridge.c#L238
[2] http://www.multiwii.com/forum/viewtopic.php?f=8&t=1516
[3] https://github.com/multiwii/multiwii-firmware/blob/upstream_shared/Protocol.cpp#L127
[4] https://github.com/multiwii/baseflight/blob/master/src/serial.c#L214
[5] https://github.com/betaflight/betaflight/blob/8e10e735807945dcf53a3a563085a2df91100355/src/main/msp/msp_serial.c#L305
[6] bitdump/BLHeli#324 (comment)

* Add IBus to available RSSI input types (d-ronin#2246)

* Update inputchannelform.cpp

Add IBus to Available RSSI types

* Update manualcontrolsettings.xml

Add IBus to RSSI options

* Update transmitter_control.c

Add IBus to RSSI option

* Update inputchannelform.cpp

* gcs, inputchannelform: Fix whitespaces.

* Update modules.ui (d-ronin#2250)

GCS:Config: Allow zero battery cells to disable auto-detect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.