Closed linghuazaii closed 2 years ago
sample/le-proxy.o: In function `main': le-proxy.c:(.text+0x7f2): undefined reference to `TLS_method' ./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_read' ./.libs/libevent_openssl.so: undefined reference to `BIO_set_shutdown' ./.libs/libevent_openssl.so: undefined reference to `BIO_get_data' ./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_write' ./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_ctrl' ./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_create' ./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_puts' ./.libs/libevent_openssl.so: undefined reference to `BIO_get_shutdown' ./.libs/libevent_openssl.so: undefined reference to `BIO_meth_new' ./.libs/libevent_openssl.so: undefined reference to `BIO_set_init' ./.libs/libevent_openssl.so: undefined reference to `BIO_get_init' ./.libs/libevent_openssl.so: undefined reference to `BIO_meth_set_destroy' ./.libs/libevent_openssl.so: undefined reference to `BIO_set_data' collect2: error: ld returned 1 exit status make[4]: *** [sample/le-proxy] Error 1 make[3]: *** [all] Error 2 make[2]: *** [common/libevent-prefix/src/libevent-stamp/libevent-build] Error 2 make[1]: *** [common/CMakeFiles/libevent.dir/all] Error 2 make: *** [all] Error 2 [ 1%] Performing build step for 'libevent'
此问题出现于libevent编译过程中,可在master的linux.common.cmake中,找到LIBEVENT的CONFIGURE_COMMAND,加入--disable-openssl。 另外,若在linux平台运行,则推荐使用sdk_3.1分支。该分支已经解决以上问题。