Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snprintf version doesn't compile for me #12

Open
Eli-the-Bearded opened this issue Oct 30, 2023 · 2 comments
Open

snprintf version doesn't compile for me #12

Eli-the-Bearded opened this issue Oct 30, 2023 · 2 comments
Labels
build Issues with building / compiling help wanted Extra attention is needed

Comments

@Eli-the-Bearded
Copy link
Contributor

If I go back one commit to c7f0826, I can compile the game and run the game (but I don't see any colors). The current version at 5e75295b5 gets about a third of the way through compile before the snprintf() truncation warnings (all warnings treated as errors here) start to kick in. First one is:

src/dungeon_los.cpp:526:47: error: ‘%s’ directive output may be truncated writing up to 159 bytes into a region of size between 149 and 152 [-Werror=format-truncation=]
  526 |                 (void) snprintf(msg, 160, "%s %s ---pause---", description, obj_string);
@call-cc
Copy link

call-cc commented Nov 14, 2023

I get the same. I'm using Ubuntu 22.04 LTS with g++:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)

@call-cc
Copy link

call-cc commented Nov 17, 2023

If I go back one commit to c7f0826, I can compile the game and run the game (but I don't see any colors).

Try setting the terminal to 'xterm-256color', that fixed the color issue for me.

@andrewtweber andrewtweber added help wanted Extra attention is needed build Issues with building / compiling labels Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues with building / compiling help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants