jsoftware / jsource

J engine source mirror
Other
657 stars 90 forks source link

Errors in build process in Ubuntu Focal Fossa #14

Closed Xliff closed 4 years ago

Xliff commented 4 years ago

I am getting an error when attempting to build for Linux x64 under Ubuntu Focal Fossa 20.04:

In file included from ../../../../jsrc/f.c:6:
../../../../jsrc/j.h:102:25: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
  102 | #define FMTI            "%lli"
      |                         ^~~~~~
~~~
bilam commented 4 years ago

what's the version of your compiler?

Xliff commented 4 years ago
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 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.
bilam commented 4 years ago

I think this warning is false positive, the line might had been there for 2 decades already and never had any issue with other versions of compilers. please add try adding -Wno-format-overflow to cflags.

Xliff commented 4 years ago

@bilam - Thank you for the suggestion! I will report back my findings.

Xliff commented 4 years ago

@bilam: Was able to successfully build adding that flag to all of the build scripts in make2/

Thanks!