Comments (7)
we enable most warnings and set as error in order to be more strict. Is this something that can be fixed upstream in tinydir? Are its functions too big to inline?
from cdogs-sdl.
I just compared the build flags between Debian and Ubuntu and found that the difference that causes the problem is -D_FORTIFY_SOURCE=
. In Debian that is set to 2 and in Ubuntu to 3.
When I change it in the Debian build to 3, I get the same error.
I guess that with a better fortification the code is also getting a bit larger and it reaches the inlining instructions limit.
It probably should be addressed in tinydir upstream. For the cdogs-sdl package, I'll check if I can raise the limit.
from cdogs-sdl.
When I raise the inlining limit (-finline-limit=1000
), the build continues but fails later with:
src/cdogs/utils.c: In function ‘RelPathFromCWD’:
src/cdogs/utils.c:152:17: error: ‘__builtin___strncat_chk’ output may be truncated copying 4095 bytes from a string of length 4095 [-Werror=stringop-truncation]
152 | strncat(srcBuf, src, CDOGS_PATH_MAX - 1);
| ^
src/cdogs/utils.c: In function ‘GetDataFilePath’:
src/cdogs/utils.c:152:17: error: ‘__builtin___strncat_chk’ output may be truncated copying 4095 bytes from a string of length 4095 [-Werror=stringop-truncation]
(this check also seems to come from -D_FORTIFY_SOURCE=3
)
When I ignore that with -Wno-stringop-truncation
the build succeeds.
from cdogs-sdl.
Nix is disabling fortifying with level 3:
Gentoo, FreeBSD and OpenMandriva are patching out -Werror
:
https://gitweb.gentoo.org/repo/gentoo.git/tree/games-arcade/cdogs-sdl/files/cdogs-sdl-1.1.1-cmake.patch
https://cgit.freebsd.org/ports/tree/games/cdogs-sdl/files/patch-CMakeLists.txt
https://github.com/OpenMandrivaAssociation/cdogs-sdl/blob/master/cdogs-sdl-disable-werror.patch
from cdogs-sdl.
which version of ubuntu/gcc runs into this error?
- from build logs, it's ubuntu 20.04 gcc GNU 13.2.0
from cdogs-sdl.
Yes, 13.2.0, same on Debian unstable.
from cdogs-sdl.
After increasing the inline limit and ignoring stringop-truncation errors in the 2.0.0 Debian package, it also successfully built in Ubuntu and it made it just in time before the freeze for 24.04 LTS. 😄
from cdogs-sdl.
Related Issues (20)
- Zig development HOT 2
- Assets revamp
- Compass arrow points just below objective HOT 1
- Fix ubuntu/clang release build
- Crash with invalid config HOT 1
- Feature request: Stable network ports HOT 3
- Problem running itch.io version on Ubuntu 22.04 HOT 1
- 2.0 64-bit builds are missing .dll's HOT 1
- List of linux package managers where C-Dogs SDL is available HOT 1
- Re-evaluate OARS categorization HOT 1
- Use single channel for actor voices
- Add mission briefing menu in pause menu
- Segfault on startup in PlayMusic HOT 9
- Disable deploy on create or publish tag trigger
- Player 1 controls can affect other players in character selection HOT 1
- Linux build instructions don't work on Ubuntu versions older than 23.10
- Continue showing equip menu when players are done
- Resizing window breaks background image
- Manual Save or Quicksave HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdogs-sdl.