申威 麒麟环境上编译LuaJIT报错

编译器工具链 编译器工具链 2255 人阅读 | 9 人回复 | 2021-11-16

[root@localhost LuaJIT]# make
==== Building LuaJIT 2.1.0-beta3 ====
make -C src
make[1]: Entering directory '/usr/local/LuaJIT/src'
HOSTCC    host/minilua.o
HOSTLINK  host/minilua
DYNASM    host/buildvm_arch.h
HOSTCC    host/buildvm.o
HOSTCC    host/buildvm_asm.o
HOSTCC    host/buildvm_peobj.o
HOSTCC    host/buildvm_lib.o
HOSTCC    host/buildvm_fold.o
HOSTLINK  host/buildvm
BUILDVM   lj_vm.S
ASM       lj_vm.o
buildvm_x86.dasc: Assembler messages:
buildvm_x86.dasc:417: Error: syntax error
buildvm_x86.dasc:1843: Error: syntax error
buildvm_x86.dasc:1854: Error: syntax error
buildvm_x86.dasc:1865: Error: syntax error
buildvm_x86.dasc:1876: Error: syntax error
buildvm_x86.dasc:1887: Error: syntax error
buildvm_x86.dasc:1898: Error: syntax error
buildvm_x86.dasc:1909: Error: syntax error
buildvm_x86.dasc:1920: Error: syntax error
buildvm_x86.dasc:1931: Error: syntax error
buildvm_x86.dasc:1942: Error: syntax error
buildvm_x86.dasc:1953: Error: syntax error
buildvm_x86.dasc:1964: Error: syntax error
buildvm_x86.dasc:1976: Error: syntax error
buildvm_x86.dasc:1988: Error: syntax error
buildvm_x86.dasc:2000: Error: syntax error
buildvm_x86.dasc:2022: Error: syntax error
buildvm_x86.dasc:2035: Error: syntax error
make[1]: *** [Makefile:684: lj_vm.o] Error 1
make[1]: Leaving directory '/usr/local/LuaJIT/src'
make: *** [Makefile:113: default] Error 2
环境信息如下:
[root@localhost LuaJIT]# uname -a
Linux localhost.localdomain 4.19.90-25.0.v2101.ky10.sw_64 #1 SMP Wed Jun 16 18:08:09 CST 2021 sw_64 sw_64 sw_64 GNU/Linux
[root@localhost LuaJIT]# uname -r
4.19.90-25.0.v2101.ky10.sw_64
[root@localhost LuaJIT]# uname -s
Linux

[root@localhost LuaJIT]# cat /etc/kylin-release
kylin release 10 (Tercel)


请各位大佬帮忙看看,感谢。。


回复

使用道具 举报

回答|共 9 个

TecSupport

发表于 2021-11-16 16:26:06 | 显示全部楼层

麒麟环境仓库中已经包含了luajit的包了,不需要自己移植的。直接通过yum安装就可以了哈~
回复

使用道具 举报

guochun

发表于 2021-11-16 18:05:06 | 显示全部楼层

@TecSupport,您好。我用yum安装了luajit之后,然后从https://openresty.org/download/openresty-1.13.6.1.tar.gz下载并解压,make && make install的时候报错
Complete!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4474k  100 4474k    0     0  12.8M      0 --:--:-- --:--:-- --:--:-- 12.8M
platform: linux (linux)
cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20171103
cc: error: unrecognized command line option '-msse4.2'
WARNING: -msse4.2 not supported in cc.
gmake -j1 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/openresty/luajit
==== Building LuaJIT 2.1.0-beta3 ====
gmake -C src
gmake[1]: Entering directory '/tmp/openresty-1.13.6.1/build/LuaJIT-2.1-20171103/src'
lj_arch.h:59:2: error: #error "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
  ^~~~~
lj_arch.h:380:2: error: #error "No target architecture defined"
#error "No target architecture defined"
  ^~~~~
lj_arch.h:59:2: error: #error "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
  ^~~~~
lj_arch.h:380:2: error: #error "No target architecture defined"
#error "No target architecture defined"
  ^~~~~
lj_arch.h:59:2: error: #error "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
  ^~~~~
lj_arch.h:380:2: error: #error "No target architecture defined"
#error "No target architecture defined"
  ^~~~~
lj_arch.h:59:2: error: #error "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
  ^~~~~
lj_arch.h:380:2: error: #error "No target architecture defined"
#error "No target architecture defined"
  ^~~~~
lj_arch.h:59:2: error: #error "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
  ^~~~~
lj_arch.h:380:2: error: #error "No target architecture defined"
#error "No target architecture defined"
  ^~~~~
lj_arch.h:59:2: error: #error "No support for this architecture (yet)"
#error "No support for this architecture (yet)"
  ^~~~~
lj_arch.h:380:2: error: #error "No target architecture defined"
#error "No target architecture defined"
  ^~~~~
Makefile:268: *** Unsupported target architecture.  Stop.
gmake: *** [Makefile:113: default] Error 2
gmake[1]: Leaving directory '/tmp/openresty-1.13.6.1/build/LuaJIT-2.1-20171103/src'
ERROR: failed to run command: gmake -j1 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/openresty/luajit

回复

使用道具 举报

guochun

发表于 2021-11-16 18:47:52 | 显示全部楼层

正在适配中,求大神指导。
回复

使用道具 举报

guochun

发表于 2021-11-16 19:03:37 | 显示全部楼层

@TecSupport,您好。yum安装luajit之后,我从https://openresty.org/download/openresty-1.13.6.1.tar.gz下载包下来进行安装,这个时候报错。
adding module in ../srcache-nginx-module-0.31
+ ngx_http_srcache_filter_module was configured
adding module in ../ngx_lua-0.10.11
checking for LuaJIT library in /usr/lib and /usr/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl) ... not found
checking for LuaJIT library in /usr/lib and /usr/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env) ... not found
        ./configure: error: ngx_http_lua_module requires the Lua or LuaJIT library and LUAJIT_LIB is defined as /usr/lib and LUAJIT_INC (path for lua.h) /usr/include/luajit-2.1, but we cannot find LuaJIT there.
ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...
回复

使用道具 举报

xuhuisjtu

发表于 2021-11-17 08:57:24 | 显示全部楼层

请留下联系方式,或通过和麒麟的对接人获取支持
回复

使用道具 举报

xuhuisjtu

发表于 2021-11-17 08:58:07 | 显示全部楼层

请留下联系方式,或通过和麒麟的对接人获取支持
回复

使用道具 举报

xuhuisjtu

发表于 2021-11-17 08:58:51 | 显示全部楼层

可留下您的联系方式以便我们联系您,或者通过和麒麟的对接人获取支持
回复

使用道具 举报

xuhuisjtu

发表于 2021-11-17 08:59:55 | 显示全部楼层

可以留下您的联系方式,或者通过贵方和麒麟的对接人获取支持
回复

使用道具 举报

TecSupport

发表于 2021-11-17 14:48:37 | 显示全部楼层

guochun 发表于 2021-11-16 18:47
正在适配中,求大神指导。

这个是贴吧,大神会在闲时光帖答复,如果比较紧急,可以通过申威社区-助力申威-问题反馈,填写技术支持工单寻求支持。或者,找到操作系统发行版厂商支持
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则