Building openresty1.7.10.1 with luajit on windows using Cygwin, 在windows下用Cygwin下编译带Luajit的openresty
来源:互联网 发布:阿里云服务器学生优惠 编辑:程序博客网 时间:2024/04/25 06:39
(heeroz原创 )First install 32bit cygwin.
Install packet: openssl zlib-dev pcre gcc-core perl readline
openresty没有对Cygwin做兼容,我们需要自己来修改文件
Open bundle\lua-cjson and lua-rds-parser and lua-redis-parser three folder's Makefile for edit, Add those lines before “## ..... (Macports)”
bundle\lua-cjson的,lua-rds-parser的,lua-redis-parser的Makefile里,“## ***OSX (Macports)”上面加入:
ifeq ($(OS),Windows_NT) LDFLAGS2 += -L../luajit-root/usr/local/openresty/luajit -lcyglua51endif
change
$(CC) $(LDFLAGS) -o $@ $^
(cjson may be "$(CC) $(LDFLAGS) $(CJSON_LDFLAGS) -o $@ $(OBJS)")
to
$(CC) $(LDFLAGS) -o $@ $^ $(LDFLAGS2)
(cjson may be "$(CC) $(LDFLAGS) $(CJSON_LDFLAGS) -o $@ $(OBJS) $(LDFLAGS2)")
Then run:
./configure --without-select_module --with-luajitlet ./configure can found your luajit:mv ./build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 /usr/local/includecp ./build/LuaJIT-2.1-20150223/src/cyglua51.dll /lib/libluajit-5.1.a./configure --without-select_module --with-luajit (must do this again)
LuaJIT-2.1-20150223 my be wrong dir name, you need press tab after LuaJIT-2.1-
LuaJIT-2.1-20150223目录名不一定一样,你需要在LuaJIT-2.1-文字后直接按Tab换成正确的目录。
let make can link your luajit:cp ./build/LuaJIT-2.1-20150223/src/cyglua51.dll ./build/luajit-root/usr/local/openresty/luajitmake -j8make install DESTDIR=/usr2cp ./build/LuaJIT-2.1-20150223/src/cyglua51.dll /usr2/usr/local/openresty/nginx/sbin/
All will be ok. You can find openresty in /usr2/usr/local/ folder.
Also the ffi may be a problem, because under cygwin, -E can not be exported function symbols, i have discussed this issue with the author Agentzh, may be next version can solve this problem (Already fixed in 1.4.3.9).
另外Cygwin编译的使用jit的ffi可能有问题,因为cygwin下-E无法导出函数符号,春哥已生成补丁,预估以后版本可以解决(1.4.3.9已解决)。
我的主页:
http://www.fullautocapitalism.com/
- Building openresty1.7.10.1 with luajit on windows using Cygwin, 在windows下用Cygwin下编译带Luajit的openresty
- 【Lua】windows下使用Cygwin+NDK编译Android平台的LuaJIT库
- windows下使用luaJit编译Lua二进制文件
- 使用cygwin在windows下编译ndk
- cygwin编译windows下的haproxy笔记
- cygwin编译windows下可执行的exe
- CLDC Windows 下用cygwin 编译方法
- CygWin在windows下的安装步骤
- Windows下LuaJIT的编译和使用,将Lua脚本编译为bytecode
- 在Windows上用cygwin成功编译quick-cocos2d-x项目下的CoinFlip例子
- 在Windows下利用CYGWIN建立ARM交叉编译环境
- 在NDK下编译openssl动态库(平台:Windows cygwin)
- 在Windows下利用CYGWIN建立ARM交叉编译环境
- windows下安装cygwin
- windows下eclipse集成cygwin编译android_NDK
- windows下eclipse集成cygwin编译android_NDK
- windows下cygwin使用ndkr8编译ffmpeg
- windows下使用cygwin编译memcached1.4.15
- 关闭PHP错误提示的方法
- Android 导入项目 项目中文字乱码问题
- python中文按拼音排序
- smali文件语法参考
- ASP.NET 4.0: 请求验证模式变化导致ValidateRequest=false失效
- Building openresty1.7.10.1 with luajit on windows using Cygwin, 在windows下用Cygwin下编译带Luajit的openresty
- 截取字符串
- 数据库已死
- windos下执行sql文件mydql中的表名变成小写
- php中安全模式safe_mode配置教程
- ie6下透明图片的问题
- 打包 IPA
- Objective-C语言基础学习日志(四)
- linux中shell变量$#,$@,$0,$1,$2的含义解释