Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make on mac #43

Open
pangxin12345 opened this issue Jul 25, 2018 · 6 comments
Open

make on mac #43

pangxin12345 opened this issue Jul 25, 2018 · 6 comments

Comments

@pangxin12345
Copy link

"_lua_type", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.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]: *** [zlib.so] Error 1
make[1]: *** [CMakeFiles/cmod_zlib.dir/all] Error 2
make: *** [all] Error 2

@pangxin12345
Copy link
Author

[ 50%] Linking C shared module zlib.so
Undefined symbols for architecture x86_64:
"_luaL_argerror", referenced from:
_lz_checksum in lua_zlib.c.o
"_luaL_buffinit", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_checklstring", referenced from:
_lz_checksum in lua_zlib.c.o
"_luaL_checkoption", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_newmetatable", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
"_luaL_optinteger", referenced from:
_lz_deflate_new in lua_zlib.c.o
"_luaL_prepbuffer", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_pushresult", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_luaL_register", referenced from:
_luaopen_zlib in lua_zlib.c.o
"_lua_call", referenced from:
_lz_checksum in lua_zlib.c.o
"_lua_concat", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_error", referenced from:
_lz_assert in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_getfield", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
"_lua_gettop", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_isnumber", referenced from:
_lz_inflate_new in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_isstring", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_newuserdata", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_version in lua_zlib.c.o
"_lua_pushboolean", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_pushcclosure", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_checksum_new in lua_zlib.c.o
"_lua_pushfstring", referenced from:
_lz_assert in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushinteger", referenced from:
_luaopen_zlib in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushlightuserdata", referenced from:
_lz_checksum_new in lua_zlib.c.o
"_lua_pushlstring", referenced from:
_luaopen_zlib in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushnil", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_pushnumber", referenced from:
_lz_version in lua_zlib.c.o
_lz_checksum_new in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_pushstring", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_pushvalue", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_replace", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_setfield", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
"_lua_setmetatable", referenced from:
_lz_deflate_new in lua_zlib.c.o
_lz_inflate_new in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
"_lua_settable", referenced from:
_luaopen_zlib in lua_zlib.c.o
"_lua_settop", referenced from:
_lz_create_deflate_mt in lua_zlib.c.o
_lz_create_inflate_mt in lua_zlib.c.o
"_lua_tointeger", referenced from:
_lz_inflate_new in lua_zlib.c.o
"_lua_tolstring", referenced from:
_lz_filter_impl in lua_zlib.c.o
"_lua_tonumber", referenced from:
_lz_checksum in lua_zlib.c.o
"_lua_touserdata", referenced from:
_lz_deflate_delete in lua_zlib.c.o
_lz_inflate_delete in lua_zlib.c.o
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.o
"_lua_type", referenced from:
_lz_filter_impl in lua_zlib.c.o
_lz_checksum in lua_zlib.c.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]: *** [zlib.so] Error 1
make[1]: *** [CMakeFiles/cmod_zlib.dir/all] Error 2
make: *** [all] Error 2

@pangxin12345
Copy link
Author

macOS High Sierra version 10.13.5

Is it the problem of environmental variables?

/etc/profile
if [ -x /usr/libexec/path_helper ]; then
eval /usr/libexec/path_helper -s
fi

if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi

/etc/bashrc
if [ -z "$PS1" ]; then
return
fi

PS1='\h:\W \u$ '

Make bash check its window size after a process completes

shopt -s checkwinsize

[ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM"

@brimworks
Copy link
Owner

What commands are you running to create this problem? I'm on a mac and it works fine for me to run make macosx.

@jarviszeng-zjc
Copy link

jarviszeng-zjc commented Mar 6, 2022

I had the same problem, here is my commands:

cmake -DLUA_INCLUDE_DIR=~/openresty/luajit/include/luajit-2.1 -DLUA_LIBRARIES=~/openresty/luajit/lib -DUSE_LUAJIT=ON -DUSE_LUA=OFF
make

@zhangxiangfeng
Copy link

I had the same problem, here is my commands:

cmake -DLUA_INCLUDE_DIR=~/openresty/luajit/include/luajit-2.1 -DLUA_LIBRARIES=~/openresty/luajit/lib -DUSE_LUAJIT=ON -DUSE_LUA=OFF
make

me too!

@alerque
Copy link
Contributor

alerque commented May 18, 2022

Are you guys with issues on Mac using cmake directly able to build this with LuaRocks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants