Page 1 of 1

g++ 6.2.0 (Linux 4.8.0-32) warnings --> build failure

Posted: 2016-12-28, 16:06
by bmg60
An attempted build from source obtained 2016.12.27 around 24:00 GMT via
> git clone --recursive https://bitbucket.org/cafu/cafu.git Cafu
ended unsuccessfully with these 3 lines:

cc1plus: all warnings being treated as errors
scons: *** [Libs/build/linux2/g++/release/MaterialSystem/MapComposition.o] Error 1
scons: building terminated because of errors.

There seem to be 3 classes of error, and I do not know which are critical.

1. There were 5 complaints/observations from invocations of ar rcu as in eg.
ar rcu /home/bub/Cafu/ExtLibs/wxWidgets/build-gtk/lib/libwx.......
ar: `u' modifier ignored since `D' is the default (see `U')

2. There were 2 types of warnings, W1 and W2,
W1:warning: the compiler can assume that the address of '____' will always evaluate to 'true'
W2:warning: nonnull argument '____' compared to NULL
from Cafu/ExtLibs/wxWidgets/build-gtk/
../src/aui/dockart.cpp W1 W2
../src/propgrid/advprops.cpp W1 W2
../src/propgrid/editors.cpp W1
../src/propgrid/manager.cpp W1
../src/propgrid/property.cpp W1 W2
../src/propgrid/propgrid.cpp W1
../src/propgrid/propgridiface.cpp W1
../src/propgrid/propgridpagestate.cpp W1
../src/propgrid/props.cpp W1 W2

3. After the above warnings, the build process continued with:
make[1]: Leaving directory '/home/bub/Cafu/ExtLibs/wxWidgets/build-gtk/utils/wxrc'
os.chdir('/home/bub/Cafu')
Note: The FBX SDK is not present.

scons: done reading SConscript files.
scons: Building targets ...

g++ -o Libs/build/linux2/g++/release/MaterialSystem/MapComposition.o -c -std=c++0x -O3 -funsigned-char -Wall -Werror -Wno-char-subscripts -fno-strict-aliasing -DNDEBUG -DSCONS_BUILD_DIR=build/linux2/g++/release -ILibs
-IExtLibs Libs/MaterialSystem/MapComposition.cpp

Libs/MaterialSystem/MapComposition.cpp: In member function 'BitmapT* MapCompositionT::GetBitmap() const':
Libs/MaterialSystem/MapComposition.cpp:579:33: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (x_<0) continue; if (x_>=int(Original.SizeX)) continue;
^~
Libs/MaterialSystem/MapComposition.cpp:579:53: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (x_<0) continue; if (x_>=int(Original.SizeX)) continue;
^~
Libs/MaterialSystem/MapComposition.cpp:580:33: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (y_<0) continue; if (y_>=int(Original.SizeY)) continue;
^~
Libs/MaterialSystem/MapComposition.cpp:580:53: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (y_<0) continue; if (y_>=int(Original.SizeY)) continue;
^~
cc1plus: all warnings being treated as errors
scons: *** [Libs/build/linux2/g++/release/MaterialSystem/MapComposition.o] Error 1
scons: building terminated because of errors.

My system is Kubuntu (Linux 4.8.0-32) and the compiler is g++ 6.2.0.
Do let me know if I've omitted anything, or if I can provide more info. Thanks/Bob McGhee

Re: g++ 6.2.0 (Linux 4.8.0-32) warnings --> build failure

Posted: 2016-12-29, 12:03
by Carsten
Hello Bob,
welcome to the Cafu forums! :welcome:

Thanks for posting these issues, I was not aware of them. Can you please tell what version of Kubuntu you have? e.g. 16.04, 16.10?

Re: g++ 6.2.0 (Linux 4.8.0-32) warnings --> build failure

Posted: 2016-12-30, 18:54
by Carsten
Hi Bob,

I just applied fixes for the issues that you reported above and in ticket #153.

Can you please try again with the current master branch? :up: