talkbox
talkbox copied to clipboard
技术渣新手求助 我在mac环境编译 遇到了这个问题 查了好久 实在不知道怎么搞了, 求云风大神指点
phynero@mac:~/project/skytest/talkbox > bash start.sh
---------- 开始 ---------- ---------- 处理protocbuf ---------- cd build && ar rc libpbc.a ../build/o/context.o ../build/o/varint.o ../build/o/array.o ../build/o/pattern.o ../build/o/register.o ../build/o/proto.o ../build/o/map.o ../build/o/alloc.o ../build/o/rmessage.o ../build/o/wmessage.o ../build/o/bootstrap.o ../build/o/stringpool.o ../build/o/decode.o cd build && gcc -O2 -fPIC -I.. -L. -o addressbook ../test/addressbook.c -lpbc cd build && gcc -O2 -fPIC -I.. -L. -o pattern ../test/pattern.c -lpbc cd build && gcc -O2 -fPIC -I.. -L. -o pbc ../test/pbc.c -lpbc cd build && gcc -O2 -fPIC -I.. -L. -o float ../test/float.c -lpbc cd build && gcc -O2 -fPIC -I.. -L. -o map ../test/map.c -lpbc cd build && gcc -O2 -fPIC -I.. -L. -o test ../test/test.c -lpbc ../test/test.c:48:2: warning: implicit declaration of function '_pbcM_memory' is invalid in C99 [-Wimplicit-function-declaration] _pbcM_memory(); ^ 1 warning generated. cd build && gcc -O2 -fPIC -I.. -L. -o decode ../test/decode.c -lpbc gcc -O2 -fPIC -Wall --shared -o protobuf.so -I../.. -I/usr/local/include -L/usr/local/bin -L../../build pbc-lua.c -lpbc -I../../../../skynet/3rd/lua/ Undefined symbols for architecture x86_64: "_luaL_buffinit", referenced from: __pattern_pack in pbc-lua-845a8a.o "_luaL_checkinteger", referenced from: __rmessage_new in pbc-lua-845a8a.o __rmessage_integer in pbc-lua-845a8a.o __rmessage_int32 in pbc-lua-845a8a.o __rmessage_int64 in pbc-lua-845a8a.o __rmessage_int52 in pbc-lua-845a8a.o __rmessage_uint52 in pbc-lua-845a8a.o __rmessage_real in pbc-lua-845a8a.o ... "_luaL_checklstring", referenced from: __env_register in pbc-lua-845a8a.o __env_type in pbc-lua-845a8a.o __rmessage_new in pbc-lua-845a8a.o __rmessage_integer in pbc-lua-845a8a.o __rmessage_int32 in pbc-lua-845a8a.o __rmessage_int64 in pbc-lua-845a8a.o __rmessage_int52 in pbc-lua-845a8a.o ... "_luaL_checknumber", referenced from: __wmessage_real in pbc-lua-845a8a.o __wmessage_int52 in pbc-lua-845a8a.o __wmessage_uint52 in pbc-lua-845a8a.o __pattern_pack in pbc-lua-845a8a.o "_luaL_checktype", referenced from: __decode in pbc-lua-845a8a.o "luaL_checkversion", referenced from: _luaopen_protobuf_c in pbc-lua-845a8a.o "_luaL_error", referenced from: __env_register in pbc-lua-845a8a.o __env_type in pbc-lua-845a8a.o __rmessage_new in pbc-lua-845a8a.o __rmessage_delete in pbc-lua-845a8a.o __rmessage_integer in pbc-lua-845a8a.o __rmessage_int32 in pbc-lua-845a8a.o __rmessage_int64 in pbc-lua-845a8a.o ... "_luaL_prepbuffsize", referenced from: __pattern_pack in pbc-lua-845a8a.o "_luaL_pushresult", referenced from: __pattern_pack in pbc-lua-845a8a.o "_luaL_setfuncs", referenced from: _luaopen_protobuf_c in pbc-lua-845a8a.o "_lua_callk", referenced from: _push_value in pbc-lua-845a8a.o "_lua_checkstack", referenced from: __pattern_unpack in pbc-lua-845a8a.o "_lua_createtable", referenced from: _luaopen_protobuf_c in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o __decode in pbc-lua-845a8a.o __gc in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.o "_lua_insert", referenced from: _decode_cb in pbc-lua-845a8a.o "_lua_isstring", referenced from: __rmessage_new in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o "_lua_isuserdata", referenced from: __pattern_unpack in pbc-lua-845a8a.o "_lua_newuserdata", referenced from: __gc in pbc-lua-845a8a.o "_lua_pushboolean", referenced from: __env_type in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o __decode in pbc-lua-845a8a.o _push_value in pbc-lua-845a8a.o "_lua_pushcclosure", referenced from: __gc in pbc-lua-845a8a.o "_lua_pushinteger", referenced from: __env_type in pbc-lua-845a8a.o __rmessage_integer in pbc-lua-845a8a.o __rmessage_size in pbc-lua-845a8a.o __wmessage_buffer in pbc-lua-845a8a.o __pattern_size in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o _push_value in pbc-lua-845a8a.o ... "_lua_pushlightuserdata", referenced from: __env_new in pbc-lua-845a8a.o __rmessage_new in pbc-lua-845a8a.o __rmessage_int32 in pbc-lua-845a8a.o __rmessage_message in pbc-lua-845a8a.o __wmessage_new in pbc-lua-845a8a.o __wmessage_message in pbc-lua-845a8a.o __wmessage_buffer in pbc-lua-845a8a.o ... "_lua_pushlstring", referenced from: __rmessage_int64 in pbc-lua-845a8a.o __rmessage_string in pbc-lua-845a8a.o __wmessage_buffer_string in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o _push_value in pbc-lua-845a8a.o "_lua_pushnumber", referenced from: __rmessage_int52 in pbc-lua-845a8a.o __rmessage_uint52 in pbc-lua-845a8a.o __rmessage_real in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o _push_value in pbc-lua-845a8a.o "_lua_pushstring", referenced from: __env_type in pbc-lua-845a8a.o __last_error in pbc-lua-845a8a.o _push_value in pbc-lua-845a8a.o "_lua_pushvalue", referenced from: __decode in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.o _push_value in pbc-lua-845a8a.o "_lua_rawgeti", referenced from: __pattern_pack in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.o "_lua_rawlen", referenced from: __pattern_pack in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.o "_lua_rawseti", referenced from: __pattern_unpack in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.o "_lua_setfield", referenced from: __gc in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.o "_lua_setmetatable", referenced from: __gc in pbc-lua-845a8a.o "_lua_settop", referenced from: __env_type in pbc-lua-845a8a.o __pattern_pack in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.o "_lua_toboolean", referenced from: __pattern_pack in pbc-lua-845a8a.o "_lua_tointegerx", referenced from: __rmessage_string in pbc-lua-845a8a.o __rmessage_message in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o __pattern_pack in pbc-lua-845a8a.o "_lua_tolstring", referenced from: __rmessage_new in pbc-lua-845a8a.o __wmessage_int64 in pbc-lua-845a8a.o __pattern_unpack in pbc-lua-845a8a.o __pattern_pack in pbc-lua-845a8a.o "_lua_touserdata", referenced from: __env_register in pbc-lua-845a8a.o __env_type in pbc-lua-845a8a.o __rmessage_new in pbc-lua-845a8a.o __rmessage_delete in pbc-lua-845a8a.o __rmessage_integer in pbc-lua-845a8a.o __rmessage_int32 in pbc-lua-845a8a.o __rmessage_int64 in pbc-lua-845a8a.o ... "_lua_type", referenced from: __env_type in pbc-lua-845a8a.o __wmessage_int32 in pbc-lua-845a8a.o __wmessage_int64 in pbc-lua-845a8a.o __pattern_pack in pbc-lua-845a8a.o __decode in pbc-lua-845a8a.o _decode_cb in pbc-lua-845a8a.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: *** [all] Error 1 ./res/talkbox.proto: No such file or directory ---------- 处理协议 ---------- start.sh: line 70: cd: ./3rd/p/: No such file or directory ---------- 进入skynet目录 ----------
start.sh: line 74: cd: ./skynet/: No such file or directory
---------- 编译 ----------
make: *** No rule to make target `linux'. Stop.
---------- 拷贝协议so模块 ---------- cp: directory ./lualib does not exist cp: directory ./luaclib does not exist
---------- 执行 ---------
你妹啊,启动程序没有,./skynet
protobuf编译失败 对这个单独编译看看
echo " >>---------- 处理protocbuf ----------"
mv ./3rd/pbc/Makefile ./3rd/pbc/Makefile.bak
mv ./3rd/pbc/binding/lua/Makefile ./3rd/pbc/binding/lua/Makefile.bak
cp ./3rd/pbcMakefile ./3rd/pbc/Makefile
cp ./3rd/pbcluaMakefile ./3rd/pbc/binding/lua/Makefile
cd ./3rd/pbc/ && make && cd ./binding/lua/ && make && cd ../../../../
# 生成协议
我自己编译了protobuf2.5 生成的protoc软甩到了user/bin 然后把上面的部分注释掉 直接执行下面那句 然后还是有问题 protoc -o ./res/talkbox.pb ./res/talkbox.proto
============================================= phynero@mac:~/project/skytest/talkbox > bash clean.sh Would remove 3rd/log/ Would remove 3rd/tmp/ Would remove res/talkbox.pb phynero@mac:~/project/skytest/talkbox > bash start.sh
---------- 开始 ---------- ---------- 处理protocbuf ---------- ---------- 处理协议 ---------- Undefined symbols for architecture x86_64: "_luaL_checkinteger", referenced from: __pack in lua-p-59cfc6.o "_luaL_checklstring", referenced from: __pack in lua-p-59cfc6.o __unpack in lua-p-59cfc6.o "_luaL_error", referenced from: __pack in lua-p-59cfc6.o "_luaL_setfuncs", referenced from: _luaopen_p_core in lua-p-59cfc6.o "_lua_createtable", referenced from: _luaopen_p_core in lua-p-59cfc6.o __add in lua-p-59cfc6.o __unpack in lua-p-59cfc6.o "_lua_pushinteger", referenced from: __unpack in lua-p-59cfc6.o "_lua_pushlstring", referenced from: __pack in lua-p-59cfc6.o "_lua_pushnumber", referenced from: __add in lua-p-59cfc6.o "_lua_pushstring", referenced from: __add in lua-p-59cfc6.o __unpack in lua-p-59cfc6.o "_lua_rawseti", referenced from: __add in lua-p-59cfc6.o "_lua_settable", referenced from: __add in lua-p-59cfc6.o __unpack in lua-p-59cfc6.o "_lua_tonumberx", referenced from: __add in lua-p-59cfc6.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ---------- 进入skynet目录 ---------- =================================================== 不知道怎么搞 求大神赐教
把lua-p.c和lua文件夹单拿到vps上去编译通过了
完全不是那么回事 不过已经在centos上跑通了 暂时在centos上学习了 mac不考虑了
哥,我想知道client和server之间消息包的格式
你的这个不支持枚举 lua loader error : ./lualib/proto_lua/ProtocType_pb.lua:6: attempt to call field 'EnumDescriptor' (a nil value)