Bug 2370 - Fails to build from source with GCC 6
Fails to build from source with GCC 6
Status: RESOLVED FIXED
Product: netanim
Classification: Unclassified
Component: animator
unspecified
PC Linux
: P5 major
Assigned To: John Abraham
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-09 05:51 UTC by Vedran Miletić
Modified: 2016-04-11 00:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vedran Miletić 2016-04-09 05:51:40 UTC
I'm using Fedora 24 x86_64 with

$ g++ --version
g++ (GCC) 6.0.0 20160331 (Red Hat 6.0.0-0.19)
Copyright (C) 2016 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.

When building ns-3-allinone I get

$ ./build.py 
# Build NetAnim
Entering directory `netanim'
 =>  qmake -v
Could not find qmake in the default path
 =>  qmake-qt4 -v
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib64
qmake-qt4 found
 =>  qmake-qt4 NetAnim.pro
 =>  make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iqtpropertybrowser/src -I. -o main.o main.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iqtpropertybrowser/src -I. -o log.o log.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iqtpropertybrowser/src -I. -o fatal-error.o fatal-error.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iqtpropertybrowser/src -I. -o fatal-impl.o fatal-impl.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iqtpropertybrowser/src -I. -o logqt.o logqt.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iqtpropertybrowser/src -I. -o resizeableitem.o resizeableitem.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DNS3_LOG_ENABLE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -Iqtpropertybrowser/src -I. -o animnode.o animnode.cpp
animnode.cpp: In function ‘QColor netanim::generateColor(size_t, uint8_t)’:
animnode.cpp:92:65: error: invalid operands of types ‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ and ‘int’ to binary ‘operator%’
       result.setBlue (abs ((int)result.green () - step * index) % 255);
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Makefile:566: recipe for target 'animnode.o' failed
make: *** [animnode.o] Error 1
Error building NetAnim.
Skipping NetAnim ....
Leaving directory `netanim'
Comment 1 John Abraham 2016-04-11 00:52:06 UTC
netanim: Bug 2370 - Fails to build from source with GCC 6

Please re-open if any other issues are seen.