完整错误如下:
make[1]: 进入目录“/home/quantum6/freeswitch/freeswitch-1.10.3” CC src/libfreeswitch_la-switch_core_cert.lo In file included from ./src/include/switch_ssl.h:39:0, from src/switch_core_cert.c:33: src/switch_core_cert.c: In function ‘switch_ssl_init_ssl_locks’: /home/quantum6/build_libs/include/openssl/crypto.h:235:57: error: statement with no effect [-Werror=unused-value] # define CRYPTO_THREADID_set_callback(threadid_func) (0) ^ src/switch_core_cert.c:72:3: note: in expansion of macro ‘CRYPTO_THREADID_set_callback’ CRYPTO_THREADID_set_callback(switch_ssl_ssl_thread_id); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Makefile:2269: recipe for target 'src/libfreeswitch_la-switch_core_cert.lo' failed make[1]: *** [src/libfreeswitch_la-switch_core_cert.lo] Error 1
解决办法,增加 -Wno-error=unused-value:
./configure \ --prefix=${BUILD_LIBS} \ --disable-core-libedit-support \ CFLAGS="-I${BUILD_LIBS}/include -Wno-error=unused-value" \ LDFLAGS=-L${BUILD_LIBS}/lib # 这个参数无效。 # --disable-werror