Skip to content

Conversation

louishust
Copy link

rename STATIC_LIB to STATIC_LIBRARY.

@RoelVdP
Copy link
Contributor

RoelVdP commented Mar 9, 2023

Even with the -1 patch, the compile error remains

In file included from /usr/include/string.h:535,
                 from pquery/src/third_party/inih++/lib/ini.c:12:
In function ‘strncpy’,
    inlined from ‘strncpy0’ at pquery/src/third_party/inih++/lib/ini.c:55:3,
    inlined from ‘ini_parse_file’ at pquery/src/third_party/inih++/lib/ini.c:143:9:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: error: ‘__builtin_strncpy’ output may be truncated copying 49 bytes from a string of length 199 [-Werror=stringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [src/third_party/inih++/lib/CMakeFiles/inih++.dir/build.make:76: src/third_party/inih++/lib/CMakeFiles/inih++.dir/ini.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:171: src/third_party/inih++/lib/CMakeFiles/inih++.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

@RoelVdP
Copy link
Contributor

RoelVdP commented Mar 10, 2023

Changing strncpy to memcpy and using the inih++ directory from pstress instead seems to work fine. It is unclear if the -1 is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants