tree-sitter icon indicating copy to clipboard operation
tree-sitter copied to clipboard

Fails to build on ubuntu 20.04.4

Open xloem opened this issue 3 years ago • 4 comments

Build log: https://dweb.link/ipfs/bafybeifnhfeoo6lj4pnk7xudqf7m3k5gxzgvhghc7n2vzajwdkqtctrfmy/make.log

gcc version: 7.5.0

xloem avatar May 01 '22 21:05 xloem

I think this is because of -wall -wextra -werror

ahelwer avatar May 02 '22 02:05 ahelwer

I think this is because of -wall -wextra -werror

NO! It is for error reporting. When you don't know, don't say anything plz

darrigu avatar May 25 '22 14:05 darrigu

What is the github of the project ?

darrigu avatar May 25 '22 15:05 darrigu

I have edited away this comment I made while upset and confused, which I am very sorry for. I guess frexsdev must have misposted the github project question here by accident, and I responded very poorly. If it's unclear, this github right here is the project in question. Be well, frexsdev and ahelwer. Thank you for looking at my issue.

xloem avatar May 25 '22 18:05 xloem

Is this still a problem? If so we need more information. The provided link also does not work.

dundargoc avatar Feb 07 '24 21:02 dundargoc

I am no longer using either ubuntu or this project at this time, but here is more conventional ipfs.io link to the build log: https://ipfs.io/ipfs/bafybeifnhfeoo6lj4pnk7xudqf7m3k5gxzgvhghc7n2vzajwdkqtctrfmy/make.log . It's just an ipfs file; it's still on ipfs.

xloem avatar Feb 14 '24 02:02 xloem

Here's the content. Do IPFS links from other people work for you?


cc -O3 -Wall -Wextra -Werror -std=gnu99 -fPIC -Ilib/src -Ilib/include   -c -o lib/src/subtree.o lib/src/subtree.c
lib/src/subtree.c: In function ‘ts_subtree_string’:
lib/src/subtree.c:852:25: error: ‘(NULL)’ directive output truncated writing 6 bytes into a region of size 1 [-Werror=format-truncation=]
   if (!self.ptr) return snprintf(string, limit, "(NULL)");
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 7 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:875:17: error: ‘(UNEXPECTED ’ directive output truncated writing 12 bytes into a region of size 1 [-Werror=format-truncation=]
       cursor += snprintf(*writer, limit, "(UNEXPECTED ");
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 13 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:818:12: error: ‘INVALID’ directive output truncated writing 7 bytes into a region of size 1 [-Werror=format-truncation=]
     return snprintf(s, n, "INVALID");
            ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 8 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:820:12: error: ‘'\0'’ directive output truncated writing 4 bytes into a region of size 1 [-Werror=format-truncation=]
     return snprintf(s, n, "'\\0'");
            ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 5 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:822:12: error: ‘'\n'’ directive output truncated writing 4 bytes into a region of size 1 [-Werror=format-truncation=]
     return snprintf(s, n, "'\\n'");
            ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 5 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:824:12: error: ‘'\t'’ directive output truncated writing 4 bytes into a region of size 1 [-Werror=format-truncation=]
     return snprintf(s, n, "'\\t'");
            ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 5 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:826:12: error: ‘'\r'’ directive output truncated writing 4 bytes into a region of size 1 [-Werror=format-truncation=]
     return snprintf(s, n, "'\\r'");
            ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 5 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:828:12: error: ‘%c’ directive output truncated writing 1 byte into a region of size 0 [-Werror=format-truncation=]
     return snprintf(s, n, "'%c'", c);
            ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 4 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:830:12: error: ‘__builtin___snprintf_chk’ output truncated before the last format character [-Werror=format-truncation=]
     return snprintf(s, n, "%d", c);
            ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 2 and 12 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:885:21: error: ‘"’ directive output truncated writing 1 byte into a region of size 0 [-Werror=format-truncation=]
           cursor += snprintf(*writer, limit, "\"%s\"", symbol_name);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 3 or more bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:888:19: error: ‘__builtin___snprintf_chk’ output truncated before the last format character [-Werror=format-truncation=]
         cursor += snprintf(*writer, limit, "(%s", symbol_name);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 2 or more bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:894:15: error: ‘("’ directive output truncated writing 2 bytes into a region of size 1 [-Werror=format-truncation=]
     cursor += snprintf(*writer, limit, "(\"%s\")", symbol_name);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 5 or more bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:942:29: error: ‘__builtin_snprintf’ output truncated before the last format character [-Werror=format-truncation=]
   if (is_visible) cursor += snprintf(*writer, limit, ")");
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 2 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:881:19: error: ‘(MISSING ’ directive output truncated writing 9 bytes into a region of size 1 [-Werror=format-truncation=]
         cursor += snprintf(*writer, limit, "(MISSING ");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 10 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/src/subtree.c:881:19: error: ‘(MISSING ’ directive output truncated writing 9 bytes into a region of size 1 [-Werror=format-truncation=]
         cursor += snprintf(*writer, limit, "(MISSING ");
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867:0,
                 from lib/src/subtree.c:6:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin_snprintf’ output 10 bytes into a destination of size 1
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: lib/src/subtree.o] Error 1

xloem avatar Feb 14 '24 03:02 xloem

Those are just warnings. Werror has been removed. Just ignore.

dundargoc avatar Feb 14 '24 08:02 dundargoc

Thanks. These warnings of course are intended to catch severe buffer overflows. I infer you have reviewed the code and situation and verified it is okay.

xloem avatar Feb 14 '24 10:02 xloem

Lol no. But I can't recreate the warning. If you can, feel free to open a new issue.

dundargoc avatar Feb 14 '24 11:02 dundargoc

Thanks. I'm not set up to test this anymore. We'll see. But thank you.

xloem avatar Feb 14 '24 16:02 xloem