首页 > 系统服务 > 详细

mac编译openresty报Undefined symbols for architecture x86_64

时间:2016-05-17 01:06:29      阅读:562      评论:0      收藏:0      [点我收藏+]
./configure --prefix=/usr/local/openresty --with-luajit --with-http_sub_module --add-module=../ngx_http_substitutions_filter_module-0.6.4

make时报错如下

	-Wl,-rpath,/usr/local/openresty/luajit/lib -L/Applications/ngx_openresty-1.4.3.6/build/luajit-root/usr/local/openresty/luajit/lib -lluajit-5.1 -lm -pagezero_size 10000 -image_base 100000000 -lpcre -lssl -lcrypto -lz
Undefined symbols for architecture x86_64:
  "_pcre_free_study", referenced from:
      _ngx_http_lua_regex_free_study_data in ngx_http_lua_regex.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [objs/nginx] Error 1
make[1]: *** [build] Error 2
make: *** [all] Error 2


解决方法:

# mdfind pcre | grep usr/local

找到 pcre 所在目录 /usr/local/Cellar/pcre/8.38/



修改参数:

# ./configure --prefix=/usr/local/openresty --with-luajit --with-http_sub_module --add-module=../ngx_http_substitutions_filter_module-0.6.4 --with-cc-opt="-I/usr/local/Cellar/pcre/8.38/include" --with-ld-opt="-L/usr/local/Cellar/pcre/8.38/lib"

再次make成功

mac编译openresty报Undefined symbols for architecture x86_64

原文:http://87453343.blog.51cto.com/8606892/1774045

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!