TETYYS/LiveProxies

Error make

Closed this issue · 1 comments

Building C object CMakeFiles/LiveProxies.dir/Server.c.o
/LiveProxies/Server.c: In function ‘SendChunkPrintf’:
/LiveProxies/Server.c:56:3: warning: implicit declaration of function ‘vasprintf’ [-Wimplicit-function-declaration]
   vasprintf(&body, Format, args);
   ^
/LiveProxies/Server.c:61:2: warning: passing argumeQnt 1 of ‘sprintf’ from incompatible pointer type [enabled by default]
  sprintf(hex, "%x", bodyLen);
  ^
In file included from LiveProxies/GeoIP.h:42:0,
             from /LiveProxies/Server.c:6:
/usr/include/stdio.h:364:12: note: expected ‘char * restrict’ but argument is of type ‘char **’
 extern int sprintf (char *__restrict __s,
        ^
/LiveProxies/Server.c:61:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat=]
  sprintf(hex, "%x", bodyLen);
  ^
/LiveProxies/Server.c:63:2: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
  all = malloc((strlen(hex) + 2 + bodyLen + 2) * sizeof(char) + 1); {
  ^
In file included from //LiveProxies/GeoIP.h:44:0,
             from /LiveProxies/Server.c:6:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘char **’
 extern size_t strlen (const char *__s)
           ^
/LiveProxies/Server.c:64:3: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char **’ [-Wformat=]
   sprintf(all, "%s\r\n%s\r\n", hex, body);
   ^
/LiveProxies/Server.c:65:3: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
   bufferevent_write(BuffEvent, all, (strlen(hex) + 2 + bodyLen + 2) * sizeof(char));
   ^
In file included from /LiveProxies/GeoIP.h:44:0,
             from /LiveProxies/Server.c:6:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘char **’
 extern size_t strlen (const char *__s)
           ^
LiveProxies/Server.c: In function ‘ServerFindHeader’:
LiveProxies/Server.c:81:16: warning: assignment makes integer from pointer without a cast [enabled by default]
    searchIndex = valIndex + inLen;
            ^
/LiveProxies/Server.c: In function ‘ProxyCheckLanding’:
/LiveProxies/Server.c:125:3: warning: passing argument 2 of ‘Base64Decode’ from incompatible pointer type [enabled by default]
   if (!Base64Decode(keyRaw, &key, &len)) {
   ^
In file included from /LiveProxies/Server.c:1:0:
/LiveProxies/Base64.h:8:14: note: expected ‘unsigned char **’ but argument is of type ‘char **’
 bool MEM_OUT Base64Decode(char* b64message, unsigned char** buffer, size_t* length);
          ^
/LiveProxies/Server.c:213:8: warning: passing argument 5 of ‘pcre_get_substring’ from incompatible pointer type [enabled by default]
    pcre_get_substring(Buff, subStrVec, regexRet, x, &(foundIpStr));
    ^
In file included from /LiveProxies/Server.c:12:0:
/usr/include/pcre.h:465:20: note: expected ‘const char **’ but argument is of type ‘char **’
 PCRE_EXP_DECL int  pcre_get_substring(const char *, int *, int, int,
                ^
/LiveProxies/Server.c: In function ‘ServerLanding’:
/LiveProxies/Server.c:313:3: warning: passing argument 3 of ‘bufferevent_setcb’ from incompatible pointer type [enabled by default]
   bufferevent_setcb(BuffEvent, HTTPRead, bufferevent_free, ServerEvent, NULL);
   ^
In file included from /LiveProxies/ProxyRequest.h:4:0,
             from /LiveProxies/Server.c:7:
/usr/include/event2/bufferevent.h:299:6: note: expected ‘bufferevent_data_cb’ but argument is of type ‘void (*)(struct bufferevent *)’
 void bufferevent_setcb(struct bufferevent *bufev,
      ^
/LiveProxies/Server.c: In function ‘HTTPRead’:
/LiveProxies/Server.c:337:2: warning: implicit declaration of function ‘evbuffer_copyout_from’ [-Wimplicit-function-declaration]
  evbuffer_copyout_from(evBuff, &pos, buff, 4);
  ^
/LiveProxies/Server.c: In function ‘LevConnListenerBindCustom’:
/LiveProxies/Server.c:395:58: error: ‘LEV_OPT_REUSEABLE_PORT’ undeclared (first use in this function)
  int flags = LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE | LEV_OPT_REUSEABLE_PORT | LEV_OPT_DEFERRED_ACCEPT;
                                                      ^
/LiveProxies/Server.c:395:58: note: each undeclared identifier is reported only once for each function it appears in
/LiveProxies/Server.c:395:83: error: ‘LEV_OPT_DEFERRED_ACCEPT’ undeclared (first use in this function)
  int flags = LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE | LEV_OPT_REUSEABLE_PORT | LEV_OPT_DEFERRED_ACCEPT;
                                                                               ^
/LiveProxies/Server.c:407:2: warning: implicit declaration of function ‘evutil_make_listen_socket_reuseable_port’ [-Wimplicit-function-declaration]
  if (evutil_make_listen_socket_reuseable_port(fd) < 0)
  ^
/LiveProxies/Server.c:410:2: warning: implicit declaration of function ‘evutil_make_tcp_listen_socket_deferred’ [-Wimplicit-function-declaration]
  if (evutil_make_tcp_listen_socket_deferred(fd) < 0)
  ^
/LiveProxies/Server.c: In function ‘ServerBaseSSL’:
/LiveProxies/Server.c:445:3: warning: passing argument 3 of ‘LevConnListenerBindCustom’ makes pointer from integer without a cast [enabled by default]
   levServerListSSL4 = LevConnListenerBindCustom(levServerBaseSSL, ServerAccept, SSL4, &map, SSLServerPort);
   ^
/LiveProxies/Server.c:389:31: note: expected ‘void *’ but argument is of type ‘int’
 static struct evconnlistener *LevConnListenerBindCustom(struct event_base *Base, evconnlistener_cb Cb, void *Arg, IPv6Map *Ip, uint16_t Port)
                           ^
/LiveProxies/Server.c:454:3: warning: passing argument 3 of ‘LevConnListenerBindCustom’ makes pointer from integer without a cast [enabled by default]
   levServerListSSL6 = LevConnListenerBindCustom(levServerBaseSSL, ServerAccept, SSL6, &map, SSLServerPort);
   ^
/LiveProxies/Server.c:389:31: note: expected ‘void *’ but argument is of type ‘int’
 static struct evconnlistener *LevConnListenerBindCustom(struct event_base *Base, evconnlistener_cb Cb, void *Arg, IPv6Map *Ip, uint16_t Port)
                           ^
LiveProxies/Server.c: In function ‘ServerBase’:
/LiveProxies/Server.c:483:3: warning: passing argument 3 of ‘LevConnListenerBindCustom’ makes pointer from integer without a cast [enabled by default]
   levServerList6 = LevConnListenerBindCustom(levServerBase, ServerAccept, HTTP6, &map, ServerPort);
   ^
LiveProxies/Server.c:389:31: note: expected ‘void *’ but argument is of type ‘int’
 static struct evconnlistener *LevConnListenerBindCustom(struct event_base *Base, evconnlistener_cb Cb, void *Arg, IPv6Map *Ip, uint16_t Port)
                           ^
/LiveProxies/Server.c: In function ‘ServerUDP’:
/LiveProxies/Server.c:512:3: warning: passing argument 1 of ‘RawToIPv6Map’ from incompatible pointer type [enabled by default]
   IPv6Map *ip = RawToIPv6Map(&remote); {
   ^
In file included from /LiveProxies/Global.h:3:0,
             from /LiveProxies/Base64.h:3,
             from /LiveProxies/Server.c:1:
/LiveProxies/IPv6Map.h:34:10: note: expected ‘struct sockaddr *’ but argument is of type ‘struct sockaddr_in *’
 IPv6Map *RawToIPv6Map(struct sockaddr *In);
      ^
/LiveProxies/Server.c: In function ‘ServerUDP4’:
/LiveProxies/Server.c:579:2: warning: passing argument 4 of ‘pthread_create’ makes pointer from integer without a cast [enabled by default]
  int status = pthread_create(&wServerUDP, NULL, (void*)ServerUDP, hSock);
  ^
In file included from /LiveProxies/ProxyLists.h:6:0,
             from //LiveProxies/Server.c:4:
/usr/include/pthread.h:244:12: note: expected ‘void * restrict’ but argument is of type ‘int’
 extern int pthread_create (pthread_t *__restrict __newthread,
        ^
/LiveProxies/Server.c:582:3: warning: ‘return’ with a value, in function returning void [enabled by default]
   return status;
   ^
/LiveProxies/Server.c: In function ‘ServerUDP6’:
/LiveProxies/Server.c:604:2: warning: passing argument 4 of ‘pthread_create’ makes pointer from integer without a cast [enabled by default]
  int status = pthread_create(&wServerUDP, NULL, (void*)ServerUDP, hSock);
  ^
In file included from /h/LiveProxies/ProxyLists.h:6:0,
             from /LiveProxies/Server.c:4:
/usr/include/pthread.h:244:12: note: expected ‘void * restrict’ but argument is of type ‘int’
 extern int pthread_create (pthread_t *__restrict __newthread,
        ^
/LiveProxies/Server.c:607:3: warning: ‘return’ with a value, in function returning void [enabled by default]
   return status;
   ^
make[2]: *** [CMakeFiles/LiveProxies.dir/Server.c.o] Ошибка 1
make[1]: *** [CMakeFiles/LiveProxies.dir/all] Ошибка 2
make: *** [all] Ошибка 2

Your libevent lacks support for LEV_OPT_DEFERRED_ACCEPT, which was introduced in libevent 2.1 and LEV_OPT_REUSEABLE_PORT which was introduced in 2.1.5 (I think). Update libevent to 2.1.5-beta or higher. 2.1.5-beta is also required for such functions as evbuffer_copyout_from. libevent version in dependencies README.me will be updated.