build error Raspbian Buster

Get help with installing and running the Cafu Engine here. This forum is also for general questions and discussion of all aspects regarding the Cafu Engine.
Post Reply
User avatar
arfur9
Posts: 90
Joined: 2017-02-25, 18:57
Location: uk
Contact:

build error Raspbian Buster

Post by arfur9 » 2020-02-05, 11:38

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.
User avatar
Carsten
Site Admin
Posts: 2169
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: build error Raspbian Buster

Post by Carsten » 2020-02-07, 10:22

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];
Best regards,
Carsten
User avatar
arfur9
Posts: 90
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: build error Raspbian Buster

Post by arfur9 » 2020-02-08, 12:31

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 :)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests