码迷,mamicode.com
首页 > 系统相关 > 详细

mac编译openresty报Undefined symbols for architecture x86_64

时间:2016-05-17 01:08:23      阅读:1743      评论:0      收藏:0      [点我收藏+]

标签:mac openresty 编译

./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

标签:mac openresty 编译

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

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!