Apache 2.4.23对CRYPTO_malloc_init的未定义引用?

Kal*_*dhi 4 linux apache openssl

嗨,我正在尝试使用1.1.0c的openssl版本安装Apache 2.4.23,而执行make命令却出现以下错误,我搜索了许多网站,但看不到任何相关答案。我也附有错误。请您解决我的问题吗?

./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so  --with-ssl=/usr/local/openssl --enable-ssl=shared  --with-pcre=/usr/local/pcre/

make

ab.o: In function main': /usr/src/httpd-2.4.23/support/ab.c:2417:   undefined reference to `CRYPTO_malloc_init'
collect2: error: ld returned 1 exit status
Makefile:73: recipe for target 'ab' failed
make[2]: \*** [ab] Error 1
make[2]: Leaving directory '/usr/src/httpd-2.4.23/support' /usr/src/httpd-2.4.23/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: \*** [all-recursive] Error 1
make[1]: Leaving directory '/usr/src/httpd-2.4.23/support' /usr/src/httpd-2.4.23/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Run Code Online (Sandbox Code Playgroud)

提前致谢

jww*_*jww 5

Apache 2.4.23对CRYPTO_malloc_init的未定义引用?

提供了OpenSSL 1.0.2和更早版本CRYPTO_malloc_init

openssl-1.0.2h$ grep -R CRYPTO_malloc_init *
apps/apps.h:                        do { do_pipe_sig(); CRYPTO_malloc_init(); \
apps/apps.h:                        do { do_pipe_sig(); CRYPTO_malloc_init(); \
crypto/crypto.h:# define CRYPTO_malloc_init()    CRYPTO_set_mem_functions(\
crypto/dh/dhtest.c:    CRYPTO_malloc_init();
crypto/ecdh/ecdhtest.c:    CRYPTO_malloc_init();
...
Run Code Online (Sandbox Code Playgroud)

OpenSSL 1.1.0和更高版本似乎不提供CRYPTO_malloc_init

openssl-1.1.0b$ grep -R CRYPTO_malloc_init *
openssl-1.1.0b$
Run Code Online (Sandbox Code Playgroud)

另请参见Apache问题60061-OpenSSL 1.1.0支持

  • 好吧,我认为您有三个选择。首先是使用1.0.2。其次是在SVN中使用Apache技巧。第三是修改Apache 2.4源。在Apache赶上之前,我个人可能会使用(1)。我个人会避免(3),因为无法确定兔子洞的深度。但是您必须做对自己有用的事情。我不应该提出解决方案,因为对我有用的对您可能不起作用。 (2认同)