Error make error: ld returned 1 exit status
Closed this issue · 2 comments
nekulin commented
[ 8%] Building C object CMakeFiles/LiveProxies.dir/Server.c.o
/home/nekulin/LiveProxies/Server.c: In function ‘SendChunkPrintf’:
/home/nekulin/LiveProxies/Server.c:56:3: warning: implicit declaration of function ‘vasprintf’ [-Wimplicit-function-declaration]
vasprintf(&body, Format, args);
^
/home/nekulin/LiveProxies/Server.c:61:2: warning: passing argument 1 of ‘sprintf’ from incompatible pointer type [enabled by default]
sprintf(hex, "%x", bodyLen);
^
In file included from /home/nekulin/LiveProxies/GeoIP.h:42:0,
from /home/nekulin/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,
^
/home/nekulin/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);
^
/home/nekulin/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 /home/nekulin/LiveProxies/GeoIP.h:44:0,
from /home/nekulin/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)
^
/home/nekulin/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);
^
/home/nekulin/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 /home/nekulin/LiveProxies/GeoIP.h:44:0,
from /home/nekulin/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)
^
/home/nekulin/LiveProxies/Server.c: In function ‘ServerFindHeader’:
/home/nekulin/LiveProxies/Server.c:81:16: warning: assignment makes integer from pointer without a cast [enabled by default]
searchIndex = valIndex + inLen;
^
/home/nekulin/LiveProxies/Server.c: In function ‘ProxyCheckLanding’:
/home/nekulin/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 /home/nekulin/LiveProxies/Server.c:1:0:
/home/nekulin/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);
^
/home/nekulin/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 /home/nekulin/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,
^
/home/nekulin/LiveProxies/Server.c: In function ‘ServerLanding’:
/home/nekulin/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 /home/nekulin/LiveProxies/ProxyRequest.h:4:0,
from /home/nekulin/LiveProxies/Server.c:7:
/usr/local/include/event2/bufferevent.h:323:6: note: expected ‘bufferevent_data_cb’ but argument is of type ‘void (*)(struct bufferevent *)’
void bufferevent_setcb(struct bufferevent *bufev,
^
/home/nekulin/LiveProxies/Server.c: In function ‘ServerBaseSSL’:
/home/nekulin/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);
^
/home/nekulin/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)
^
/home/nekulin/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);
^
/home/nekulin/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)
^
/home/nekulin/LiveProxies/Server.c: In function ‘ServerBase’:
/home/nekulin/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);
^
/home/nekulin/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)
^
/home/nekulin/LiveProxies/Server.c: In function ‘ServerUDP’:
/home/nekulin/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 /home/nekulin/LiveProxies/Global.h:3:0,
from /home/nekulin/LiveProxies/Base64.h:3,
from /home/nekulin/LiveProxies/Server.c:1:
/home/nekulin/LiveProxies/IPv6Map.h:34:10: note: expected ‘struct sockaddr *’ but argument is of type ‘struct sockaddr_in *’
IPv6Map *RawToIPv6Map(struct sockaddr *In);
^
/home/nekulin/LiveProxies/Server.c: In function ‘ServerUDP4’:
/home/nekulin/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 /home/nekulin/LiveProxies/ProxyLists.h:6:0,
from /home/nekulin/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,
^
/home/nekulin/LiveProxies/Server.c:582:3: warning: ‘return’ with a value, in function returning void [enabled by default]
return status;
^
/home/nekulin/LiveProxies/Server.c: In function ‘ServerUDP6’:
/home/nekulin/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 /home/nekulin/LiveProxies/ProxyLists.h:6:0,
from /home/nekulin/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,
^
/home/nekulin/LiveProxies/Server.c:607:3: warning: ‘return’ with a value, in function returning void [enabled by default]
return status;
^
[ 16%] Building C object CMakeFiles/LiveProxies.dir/PBKDF2.c.o
/home/nekulin/LiveProxies/PBKDF2.c: In function ‘PBKDF2_HMAC_SHA_512Ex’:
/home/nekulin/LiveProxies/PBKDF2.c:29:4: warning: implicit declaration of function ‘floor’ [-Wimplicit-function-declaration]
ret = malloc(INTEGER_VISIBLE_SIZE(ITERATIONS) + saltb64Len + pbkdf2b64Len + 2 /* $ */ + 1 /* NULL */);
^
In file included from /home/nekulin/LiveProxies/Base64.h:3:0,
from /home/nekulin/LiveProxies/PBKDF2.c:2:
/home/nekulin/LiveProxies/Global.h:11:34: warning: incompatible implicit declaration of built-in function ‘floor’ [enabled by default]
#define INTEGER_VISIBLE_SIZE(x) (floor(log10(abs(x))) + 1)
^
/home/nekulin/LiveProxies/PBKDF2.c:29:17: note: in expansion of macro ‘INTEGER_VISIBLE_SIZE’
ret = malloc(INTEGER_VISIBLE_SIZE(ITERATIONS) + saltb64Len + pbkdf2b64Len + 2 /* $ */ + 1 /* NULL */);
^
/home/nekulin/LiveProxies/PBKDF2.c:29:4: warning: implicit declaration of function ‘log10’ [-Wimplicit-function-declaration]
ret = malloc(INTEGER_VISIBLE_SIZE(ITERATIONS) + saltb64Len + pbkdf2b64Len + 2 /* $ */ + 1 /* NULL */);
^
In file included from /home/nekulin/LiveProxies/Base64.h:3:0,
from /home/nekulin/LiveProxies/PBKDF2.c:2:
/home/nekulin/LiveProxies/Global.h:11:40: warning: incompatible implicit declaration of built-in function ‘log10’ [enabled by default]
#define INTEGER_VISIBLE_SIZE(x) (floor(log10(abs(x))) + 1)
^
/home/nekulin/LiveProxies/PBKDF2.c:29:17: note: in expansion of macro ‘INTEGER_VISIBLE_SIZE’
ret = malloc(INTEGER_VISIBLE_SIZE(ITERATIONS) + saltb64Len + pbkdf2b64Len + 2 /* $ */ + 1 /* NULL */);
^
Linking C executable LiveProxies
CMakeFiles/LiveProxies.dir/Interface.c.o: In function `InterfaceProxyRecheck':
Interface.c:(.text+0x1a90): undefined reference to `Recheck'
Interface.c:(.text+0x1bd9): undefined reference to `ReverseDNS'
Interface.c:(.text+0x1c35): undefined reference to `SpamhausZEN'
CMakeFiles/LiveProxies.dir/LiveProxies.c.o: In function `main':
LiveProxies.c:(.text+0x5c7): undefined reference to `evthread_use_pthreads'
LiveProxies.c:(.text+0xc1c): undefined reference to `SSL_load_error_strings'
LiveProxies.c:(.text+0xc21): undefined reference to `SSL_library_init'
LiveProxies.c:(.text+0xc57): undefined reference to `SSLv23_server_method'
LiveProxies.c:(.text+0xc5f): undefined reference to `SSL_CTX_new'
LiveProxies.c:(.text+0xc7f): undefined reference to `SSL_CTX_use_certificate_chain_file'
LiveProxies.c:(.text+0xca1): undefined reference to `SSL_CTX_use_PrivateKey_file'
LiveProxies.c:(.text+0xceb): undefined reference to `SSL_CTX_ctrl'
LiveProxies.c:(.text+0xd04): undefined reference to `SSL_CTX_set_cipher_list'
CMakeFiles/LiveProxies.dir/LiveProxies.c.o: In function `RequestBase':
LiveProxies.c:(.text+0x171c): undefined reference to `SSLv23_client_method'
LiveProxies.c:(.text+0x1724): undefined reference to `SSL_CTX_new'
CMakeFiles/LiveProxies.dir/ProxyRequest.c.o: In function `ProxyHandleData':
ProxyRequest.c:(.text+0x12fe): undefined reference to `SSL_new'
ProxyRequest.c:(.text+0x1322): undefined reference to `bufferevent_openssl_filter_new'
ProxyRequest.c:(.text+0x1342): undefined reference to `bufferevent_openssl_set_allow_dirty_shutdown'
CMakeFiles/LiveProxies.dir/Server.c.o: In function `HTTPRead':
Server.c:(.text+0x1162): undefined reference to `evbuffer_copyout_from'
CMakeFiles/LiveProxies.dir/Server.c.o: In function `ServerAccept':
Server.c:(.text+0x1350): undefined reference to `SSL_new'
Server.c:(.text+0x136d): undefined reference to `bufferevent_openssl_socket_new'
CMakeFiles/LiveProxies.dir/Server.c.o: In function `LevConnListenerBindCustom':
Server.c:(.text+0x1490): undefined reference to `evutil_make_listen_socket_reuseable_port'
Server.c:(.text+0x14a3): undefined reference to `evutil_make_tcp_listen_socket_deferred'
collect2: error: ld returned 1 exit status
make[2]: *** [LiveProxies] Ошибка 1
make[1]: *** [CMakeFiles/LiveProxies.dir/all] Ошибка 2
make: *** [all] Ошибка 2
TETYYS commented
Perform a clean operation make clean
and try to build again. If you haven't updated libevent to specified version in README.md, please do so.
TETYYS commented
Waiting for more feedback...