近期想学习Ngnix 代码,前些日子,对”自己下手狠一次“, 买了MAC 本。 

所以想在Mac 上编译,是必须的,不然对不起自己的内心。

不巧遇到了MD5算法编译的问题

src/core/ngx_crypt.c:82:5: error: 'MD5_Init' is deprecated: first deprecated in OS X 10.7
      [-Werror,-Wdeprecated-declarations]
    ngx_md5_init(&md5);
    ^
src/core/ngx_md5.h:30:25: note: expanded from macro 'ngx_md5_init'
#define ngx_md5_init    MD5_Init
                        ^
/usr/include/openssl/md5.h:113:5: note: 'MD5_Init' declared here
int MD5_Init(MD5_CTX *c) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;

MD5其他的函数   MD5_Update   MD5_Final  也在其中

 

进过google终于找到解决办法

./configure --prefix=/usr/local --with-http_ssl_module --with-cc-opt="-Wno-deprecated-declarations"

这样就可以Make 了

 

 

相关文章:

  • 2022-12-23
  • 2021-04-27
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-08-26
  • 2021-06-01
猜你喜欢
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-01-04
  • 2022-12-23
相关资源
相似解决方案