Page 1 of 1

build error Raspbian Buster

Posted: 2020-02-05, 11:38
by arfur9
Hi, ?I'm getting the following build error:

Code: Select all

CaTools/CaSanity.cpp: In function 'void ExportLightMaps(const char*)':
CaTools/CaSanity.cpp:107:28: error: '%s' directive writing up to 255 bytes into a region of size 197 [-Werror=format-overflow=]
         sprintf(LMNamePNG, "LM_%s_%02lu.png", WorldName, LMNr);
                            ^~~~~~~~~~~~~~~~~  ~~~~~~~~~
CaTools/CaSanity.cpp:107:16: note: 'sprintf' output between 11 and 274 bytes into a destination of size 200
         sprintf(LMNamePNG, "LM_%s_%02lu.png", WorldName, LMNr);
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
scons: *** [build/linux2/g++/release/CaTools/CaSanity.o] Error 1
scons: building terminated because of errors.

Re: build error Raspbian Buster

Posted: 2020-02-07, 10:22
by Carsten
I cannot see this with g++ 7.4.0, so it's probably a new compiler feature in later versions that triggers this message. I can see though why this error is raised. Can you please change in the line above the reported error the number 200 into 300? That is:

Code: Select all

char LMNamePNG[300];

Re: build error Raspbian Buster

Posted: 2020-02-08, 12:31
by arfur9
Thanks, I'm getting a lot of errors, I can't build with the fbx sdk, then it fails if I remove that.. I'll get back to you next week with the terminal output

Its ok on Windows which is the main thing :)