Skip to content

won't build on stock centos8 #15

@naox

Description

@naox

won't build on stock centos8 (builds ok on stock centos 7)

yum -y groupinstall "Development Tools"
yum -y install glibc-static
...
make[1]: Leaving directory '/root/mmproxy/libseccomp'
cc  -g -ggdb -O3 -Wall -Wextra -Wno-unused-parameter -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector -fPIE -Ilibmill -Ilibseccomp/include \
        src/main.c \
        src/utils.c \
        src/net.c \
        libmill/.libs/libmill.a \
        libseccomp/src/.libs/libseccomp.a \
        -Wl,-z,now -Wl,-z,relro \
        -o mmproxy -static
In file included from src/main.c:2:
src/main.c: In function ‘new_connection’:
libmill/libmill.h:316:6: warning: value computed is not used [-Wunused-value]
     (*(type*)mill_chr_((channel), sizeof(type), MILL_HERE_))
     ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libmill/libmill.h:421:21: note: in expansion of macro ‘mill_chr__’
 #define chr(ch, tp) mill_chr__((ch), tp)
                     ^~~~~~~~~~
src/main.c:165:2: note: in expansion of macro ‘chr’
  chr(ch, int);
  ^~~
src/net.c: In function ‘net_str’:
src/net.c:308:34: warning: ‘%d’ directive output may be truncated writing between 1 and 3 bytes into a region of size between 0 and 127 [-Wformat-truncation=]
   snprintf(buf, sizeof(buf), "%s/%d", dst, prefix_len);
                                  ^~
src/net.c:308:30: note: directive argument in the range [0, 128]
   snprintf(buf, sizeof(buf), "%s/%d", dst, prefix_len);
                              ^~~~~~~
In file included from /usr/include/stdio.h:873,
                 from src/net.c:6:
/usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 3 and 132 bytes into a destination of size 128
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/net.c:305:34: warning: ‘%d’ directive output may be truncated writing between 1 and 3 bytes into a region of size between 0 and 127 [-Wformat-truncation=]
   snprintf(buf, sizeof(buf), "%s/%d", dst, prefix_len - 96);
                                  ^~
src/net.c:305:30: note: directive argument in the range [-96, 32]
   snprintf(buf, sizeof(buf), "%s/%d", dst, prefix_len - 96);
                              ^~~~~~~
In file included from /usr/include/stdio.h:873,
                 from src/net.c:6:
/usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 3 and 132 bytes into a destination of size 128
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [Makefile:28: mmproxy] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions