Page 1 of 1

Yocto QT SDK Build Failure on Ubuntu 16.04

Posted: Tue Nov 14, 2017 6:20 pm
by kengineer
When attempting to run:

Code: Select all

time bitbake -c populate_sdk atmel-qt5-demo-image

or the related meta-toolchain-qt5 recipe on Ubuntu 16.04 I ran into an issue. Just thought I would report this for others as it's probably something that should be documented.

When running that recipe, the following errors will occur:
g++: error: unrecognized command line option ‘-Wshift-overflow=2’
g++: error: unrecognized command line option ‘-Wduplicated-cond’

This is because Ubuntu 16.04 ships with GCC 5. These specific warning options were introduced in GCC 6:
https://gcc.gnu.org/gcc-6/changes.html

Simple solution is to install a newer version of gcc, I did this via the following:

Code: Select all

# Add the repository for gcc 7 and install
sudo add-apt-repository ppa:jonathonf/gcc-7.1
sudo apt-get update
sudo apt-get install gcc-7 g++-7

# Update system to use gcc/g++ 7 when calling raw commands
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 50
Hope this helps somebody!

Re: Yocto QT SDK Build Failure on Ubuntu 16.04

Posted: Wed Nov 15, 2017 1:03 pm
by nferre
Hi,

Thanks for this feedback!
Can you tell on which package this error pops up?

Best regards,
Nicolas

Re: Yocto QT SDK Build Failure on Ubuntu 16.04

Posted: Wed Nov 15, 2017 5:39 pm
by kengineer
Looks like maybe in "qttools-native?"

Code: Select all

compiling /yocto/poky/build-atmel/tmp/work/x86_64-linux/qttools-native/5.9.1+gitAUTOINC+dfda6f14b3-r0/git/src/qtplugininfo/qtplugininfo.cpp
g++: error: unrecognized command line option ‘-Wshift-overflow=2’
g++: error: unrecognized command line option ‘-Wduplicated-cond’