Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 413
    • Issues 413
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2538
Closed
Open
Created Feb 06, 2026 by Daan Spijkers@daanrs

Building cmake DEBUG version errors on null destination pointer for STRstring2Array

This is not very important for me since I can build the RELEASE version just fine but I figured I'd report it anyway.

If I try to build the DEBUG release with cmake (commit bed278c6 but I've had it before I think), then I get the following error:

[ 48%] Building C object src/libsac2c/CMakeFiles/sac2cShared.dir/support/str.c.o
In file included from /nix/store/m3n0h7646c7qwf6dbvdqhslmxmv2dg3z-glibc-2.40-66-dev/include/stdio.h:970,
                 from /home/uni/code/uni/sac2c/src/libsac2c/types/types.h:10,
                 from /home/uni/code/uni/sac2c/src/libsac2c/support/str.h:4,
                 from /home/uni/code/uni/sac2c/src/libsac2c/support/str.c:10:
In function ‘sprintf’,
    inlined from ‘STRstring2Array’ at /home/uni/code/uni/sac2c/src/libsac2c/support/str.c:1317:9:
/nix/store/m3n0h7646c7qwf6dbvdqhslmxmv2dg3z-glibc-2.40-66-dev/include/bits/stdio2.h:30:10: error: null destination pointer [-Werror=format-overflow=]
   30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   31 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
make[2]: *** [src/libsac2c/CMakeFiles/sac2cShared.dir/build.make:5839: src/libsac2c/CMakeFiles/sac2cShared.dir/support/str.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1214: src/libsac2c/CMakeFiles/sac2cShared.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking