antirez / antirez/lua-cmsgpack

linker issues: undefined symbol: lua_tointeger

未关闭
#56 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
383
派生
122
PR 合并指标
30 天内没有已合并 PR

描述

```
> mkdir build; cd build
> cmake ..
-- The C compiler identification is GNU 4.8.4
-- Check for working C compiler: /home/ensonic/bin/cc
-- Check for working C compiler: /home/ensonic/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found Lua51: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.5")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ensonic/projects/vitruvius/lua-cmsgpack/build
> make
Scanning dependencies of target cmsgpack
[100%] Building C object CMakeFiles/cmsgpack.dir/lua_cmsgpack.c.o
Linking C shared module cmsgpack.so
[100%] Built target cmsgpack
> lua ../test.lua
lua: error loading module 'cmsgpack' from file './cmsgpack.so':
./cmsgpack.so: undefined symbol: lua_tointeger
stack traceback:
[C]: in ?
[C]: in function 'require'
../test.lua:5: in main chunk
[C]: in ?
> ldd ./cmsgpack.so
linux-vdso.so.1 => (0x00007ffeb3fe6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fde16985000)
/lib64/ld-linux-x86-64.so.2 (0x000055aa39fe4000)
> lua -v
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
```

Seems that the build is hardcoded to build against 5.1. Running under 5.1 works

```
lua5.1 ../test.lua
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。