红联Linux门户
Linux帮助

Ubuntu下使用skynet笔记

发布时间:2016-12-12 09:45:38来源:linux网站作者:delphiwcdj
关于skynet的介绍可以参考下面两篇文章,Skynet设计综述[附1]和GettingStarted[附2],其中第二篇文章内容较新。根据skynet的Makefile可以看到其支持Linux/freebsd/macosx三种平台编译使用。本文记录在Linux Ubuntu下使用时遇到的一些问题。
 
1.在Linux下需要使用jemalloc,而编译jemalloc又需要autoconf
2.然后make linux,正常情况即可完成skynet的编译
 
下面是笔者在编译时遇到的问题,及解决方法。更多问题也可以参考skynet的FAQ
 
错误:
checking for expr... /usr/bin/expr
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
解决方法:
apt-get insatll m4
错误:
./autogen.sh: 5: ./autogen.sh: autoconf: not found
解决方法:
wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
错误:
lua.c:81:31: fatal error: readline/readline.h: No such file or directory
解决方法:
apt-get install libreadline-dev
 
为了方便了解skynet编译时具体做了哪些事情,可以使用make -n将编译过程打印出来。
1.首先编译skynet/3rd/jemalloc,得到.so和.a
ln -sf libjemalloc.so.2 lib/libjemalloc.so
ar crus lib/libjemalloc.a src/jemalloc.o src/arena.o …
 
2.然后编译skynet/3rd/lua
cd 3rd/lua && make CC=’cc -std=gnu99’ linux
ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
 
3.编译skynet
cc -g -O2 -Wall -I3rd/lua -o skynet skynet-src/skynet_main.c skynet-src/skynet_handle.c skynet-src/skynet_module.c skynet-src/skynet_mq.c skynet-src/skynet_server.c skynet-src/skynet_start.c skynet-src/skynet_timer.c skynet-src/skynet_error.c skynet-src/skynet_harbor.c skynet-src/skynet_env.c skynet-src/skynet_monitor.c skynet-src/skynet_socket.c skynet-src/socket_server.c skynet-src/malloc_hook.c skynet-src/skynet_daemon.c skynet-src/skynet_log.c 3rd/lua/liblua.a 3rd/jemalloc/lib/libjemalloc_pic.a -Iskynet-src -I3rd/jemalloc/include/jemalloc -Wl,-E -lpthread -lm -ldl -lrt
 
4.根据service-src下代码编译得到cservice目录下的so
cc -g -O2 -Wall -I3rd/lua -fPIC –shared service-src/service_snlua.c -o cservice/snlua.so -Iskynet-src
 
5.根据lualib-src下代码编译得到luaclib目录下的so
cc -g -O2 -Wall -I3rd/lua -fPIC –shared lualib-src/lua-skynet.c lualib-src/lua-seri.c -o luaclib/skynet.so -Iskynet-src -Iservice-src -Ilualib-src
# make -n linux
make all PLAT=linux SKYNET_LIBS="-lpthread -lm -ldl -lrt" SHARED="-fPIC --shared" EXPORT="-Wl,-E" MALLOC_STATICLIB="3rd/jemalloc/lib/libjemalloc_pic.a" SKYNET_DEFINES=""
make[1]: Entering directory `/root/skynet/src/skynet'
cd 3rd/jemalloc && make CC=cc 
make[2]: Entering directory `/root/skynet/src/skynet/3rd/jemalloc'
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.pic.o src/jemalloc.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/jemalloc.pic.o -o src/jemalloc.pic.d src/jemalloc.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.pic.o src/arena.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/arena.pic.o -o src/arena.pic.d src/arena.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/atomic.pic.o src/atomic.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/atomic.pic.o -o src/atomic.pic.d src/atomic.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.pic.o src/base.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/base.pic.o -o src/base.pic.d src/base.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.pic.o src/bitmap.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/bitmap.pic.o -o src/bitmap.pic.d src/bitmap.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk.pic.o src/chunk.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/chunk.pic.o -o src/chunk.pic.d src/chunk.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_dss.pic.o src/chunk_dss.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/chunk_dss.pic.o -o src/chunk_dss.pic.d src/chunk_dss.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_mmap.pic.o src/chunk_mmap.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/chunk_mmap.pic.o -o src/chunk_mmap.pic.d src/chunk_mmap.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.pic.o src/ckh.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/ckh.pic.o -o src/ckh.pic.d src/ckh.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.pic.o src/ctl.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/ctl.pic.o -o src/ctl.pic.d src/ctl.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.pic.o src/extent.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/extent.pic.o -o src/extent.pic.d src/extent.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.pic.o src/hash.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/hash.pic.o -o src/hash.pic.d src/hash.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/huge.pic.o src/huge.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/huge.pic.o -o src/huge.pic.d src/huge.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mb.pic.o src/mb.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/mb.pic.o -o src/mb.pic.d src/mb.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.pic.o src/mutex.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/mutex.pic.o -o src/mutex.pic.d src/mutex.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/nstime.pic.o src/nstime.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/nstime.pic.o -o src/nstime.pic.d src/nstime.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/pages.pic.o src/pages.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/pages.pic.o -o src/pages.pic.d src/pages.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prng.pic.o src/prng.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/prng.pic.o -o src/prng.pic.d src/prng.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.pic.o src/prof.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/prof.pic.o -o src/prof.pic.d src/prof.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/quarantine.pic.o src/quarantine.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/quarantine.pic.o -o src/quarantine.pic.d src/quarantine.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.pic.o src/rtree.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/rtree.pic.o -o src/rtree.pic.d src/rtree.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.pic.o src/stats.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/stats.pic.o -o src/stats.pic.d src/stats.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.pic.o src/tcache.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/tcache.pic.o -o src/tcache.pic.d src/tcache.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ticker.pic.o src/ticker.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/ticker.pic.o -o src/ticker.pic.d src/ticker.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.pic.o src/tsd.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/tsd.pic.o -o src/tsd.pic.d src/tsd.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/util.pic.o src/util.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/util.pic.o -o src/util.pic.d src/util.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -fPIC -DPIC -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/witness.pic.o src/witness.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/witness.pic.o -o src/witness.pic.d src/witness.c
mkdir -p lib
cc -shared -Wl,-soname,libjemalloc.so.2  -o lib/libjemalloc.so.2 src/jemalloc.pic.o src/arena.pic.o src/atomic.pic.o src/base.pic.o src/bitmap.pic.o src/chunk.pic.o src/chunk_dss.pic.o src/chunk_mmap.pic.o src/ckh.pic.o src/ctl.pic.o src/extent.pic.o src/hash.pic.o src/huge.pic.o src/mb.pic.o src/mutex.pic.o src/nstime.pic.o src/pages.pic.o src/prng.pic.o src/prof.pic.o src/quarantine.pic.o src/rtree.pic.o src/stats.pic.o src/tcache.pic.o src/ticker.pic.o src/tsd.pic.o src/util.pic.o src/witness.pic.o  -lpthread 
mkdir -p lib
ln -sf libjemalloc.so.2 lib/libjemalloc.so
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/jemalloc.o src/jemalloc.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/jemalloc.o -o src/jemalloc.d src/jemalloc.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/arena.o src/arena.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/arena.o -o src/arena.d src/arena.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/atomic.o src/atomic.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/atomic.o -o src/atomic.d src/atomic.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/base.o src/base.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/base.o -o src/base.d src/base.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/bitmap.o src/bitmap.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/bitmap.o -o src/bitmap.d src/bitmap.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk.o src/chunk.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/chunk.o -o src/chunk.d src/chunk.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_dss.o src/chunk_dss.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/chunk_dss.o -o src/chunk_dss.d src/chunk_dss.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/chunk_mmap.o src/chunk_mmap.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/chunk_mmap.o -o src/chunk_mmap.d src/chunk_mmap.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ckh.o src/ckh.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/ckh.o -o src/ckh.d src/ckh.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ctl.o src/ctl.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/ctl.o -o src/ctl.d src/ctl.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/extent.o src/extent.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/extent.o -o src/extent.d src/extent.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/hash.o src/hash.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/hash.o -o src/hash.d src/hash.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/huge.o src/huge.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/huge.o -o src/huge.d src/huge.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mb.o src/mb.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/mb.o -o src/mb.d src/mb.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/mutex.o src/mutex.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/mutex.o -o src/mutex.d src/mutex.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/nstime.o src/nstime.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/nstime.o -o src/nstime.d src/nstime.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/pages.o src/pages.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/pages.o -o src/pages.d src/pages.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prng.o src/prng.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/prng.o -o src/prng.d src/prng.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/prof.o src/prof.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/prof.o -o src/prof.d src/prof.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/quarantine.o src/quarantine.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/quarantine.o -o src/quarantine.d src/quarantine.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/rtree.o src/rtree.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/rtree.o -o src/rtree.d src/rtree.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/stats.o src/stats.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/stats.o -o src/stats.d src/stats.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tcache.o src/tcache.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/tcache.o -o src/tcache.d src/tcache.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/ticker.o src/ticker.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/ticker.o -o src/ticker.d src/ticker.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/tsd.o -o src/tsd.d src/tsd.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/util.o src/util.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/util.o -o src/util.d src/util.c
mkdir -p src
cc -std=gnu99 -Wall -Werror=declaration-after-statement -Wsign-compare -pipe -g3 -fvisibility=hidden -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/witness.o src/witness.c
cc -MM -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -MT src/witness.o -o src/witness.d src/witness.c
mkdir -p lib
ar crus lib/libjemalloc.a src/jemalloc.o src/arena.o src/atomic.o src/base.o src/bitmap.o src/chunk.o src/chunk_dss.o src/chunk_mmap.o src/ckh.o src/ctl.o src/extent.o src/hash.o src/huge.o src/mb.o src/mutex.o src/nstime.o src/pages.o src/prng.o src/prof.o src/quarantine.o src/rtree.o src/stats.o src/tcache.o src/ticker.o src/tsd.o src/util.o src/witness.o
mkdir -p lib
ar crus lib/libjemalloc_pic.a src/jemalloc.pic.o src/arena.pic.o src/atomic.pic.o src/base.pic.o src/bitmap.pic.o src/chunk.pic.o src/chunk_dss.pic.o src/chunk_mmap.pic.o src/ckh.pic.o src/ctl.pic.o src/extent.pic.o src/hash.pic.o src/huge.pic.o src/mb.pic.o src/mutex.pic.o src/nstime.pic.o src/pages.pic.o src/prng.pic.o src/prof.pic.o src/quarantine.pic.o src/rtree.pic.o src/stats.pic.o src/tcache.pic.o src/ticker.pic.o src/tsd.pic.o src/util.pic.o src/witness.pic.o
make[2]: Leaving directory `/root/skynet/src/skynet/3rd/jemalloc'
cd 3rd/lua && make CC='cc -std=gnu99' linux
make[2]: Entering directory `/root/skynet/src/skynet/3rd/lua'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[3]: Entering directory `/root/skynet/src/skynet/3rd/lua'
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lapi.o lapi.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lcode.o lcode.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lctype.o lctype.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o ldebug.o ldebug.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o ldo.o ldo.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o ldump.o ldump.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lfunc.o lfunc.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lgc.o lgc.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o llex.o llex.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lmem.o lmem.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lobject.o lobject.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lopcodes.o lopcodes.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lparser.o lparser.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lstate.o lstate.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lstring.o lstring.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o ltable.o ltable.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o ltm.o ltm.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lundump.o lundump.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lvm.o lvm.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lzio.o lzio.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lauxlib.o lauxlib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lbaselib.o lbaselib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lbitlib.o lbitlib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lcorolib.o lcorolib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o ldblib.o ldblib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o liolib.o liolib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lmathlib.o lmathlib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o loslib.o loslib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lstrlib.o lstrlib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o ltablib.o ltablib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lutf8lib.o lutf8lib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o loadlib.o loadlib.c
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o linit.o linit.c
ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o 
ranlib liblua.a
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o lua.o lua.c
cc -std=gnu99 -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline 
cc -std=gnu99 -O2 -Wall -Wextra -DLUA_USE_LINUX -I../../skynet-src   -c -o luac.o luac.c
cc -std=gnu99 -o luac   luac.o liblua.a -lm -Wl,-E -ldl -lreadline 
make[3]: Leaving directory `/root/skynet/src/skynet/3rd/lua'
make[2]: Leaving directory `/root/skynet/src/skynet/3rd/lua'
cc -g -O2 -Wall -I3rd/lua  -o skynet skynet-src/skynet_main.c skynet-src/skynet_handle.c skynet-src/skynet_module.c skynet-src/skynet_mq.c skynet-src/skynet_server.c skynet-src/skynet_start.c skynet-src/skynet_timer.c skynet-src/skynet_error.c skynet-src/skynet_harbor.c skynet-src/skynet_env.c skynet-src/skynet_monitor.c skynet-src/skynet_socket.c skynet-src/socket_server.c skynet-src/malloc_hook.c skynet-src/skynet_daemon.c skynet-src/skynet_log.c 3rd/lua/liblua.a 3rd/jemalloc/lib/libjemalloc_pic.a -Iskynet-src -I3rd/jemalloc/include/jemalloc  -Wl,-E -lpthread -lm -ldl -lrt 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared service-src/service_snlua.c -o cservice/snlua.so -Iskynet-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared service-src/service_logger.c -o cservice/logger.so -Iskynet-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared service-src/service_gate.c -o cservice/gate.so -Iskynet-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared service-src/service_harbor.c -o cservice/harbor.so -Iskynet-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-skynet.c lualib-src/lua-seri.c -o luaclib/skynet.so -Iskynet-src -Iservice-src -Ilualib-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-socket.c -o luaclib/socketdriver.so -Iskynet-src -Iservice-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Iskynet-src lualib-src/lua-bson.c -o luaclib/bson.so -Iskynet-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-mongo.c -o luaclib/mongo.so -Iskynet-src
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -I3rd/lua-md5 3rd/lua-md5/md5.c 3rd/lua-md5/md5lib.c 3rd/lua-md5/compat-5.2.c -o luaclib/md5.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-netpack.c -Iskynet-src -o luaclib/netpack.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-clientsocket.c -o luaclib/clientsocket.so -lpthread
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Iskynet-src lualib-src/lua-memory.c -o luaclib/memory.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-profile.c -o luaclib/profile.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Iskynet-src lualib-src/lua-multicast.c -o luaclib/multicast.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Iskynet-src lualib-src/lua-cluster.c -o luaclib/cluster.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-crypt.c lualib-src/lsha1.c -o luaclib/crypt.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Iskynet-src lualib-src/lua-sharedata.c -o luaclib/sharedata.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Iskynet-src lualib-src/lua-stm.c -o luaclib/stm.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Ilualib-src/sproto lualib-src/sproto/sproto.c lualib-src/sproto/lsproto.c -o luaclib/sproto.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -I3rd/lpeg 3rd/lpeg/lpcap.c 3rd/lpeg/lpcode.c 3rd/lpeg/lpprint.c 3rd/lpeg/lptree.c 3rd/lpeg/lpvm.c -o luaclib/lpeg.so 
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared lualib-src/lua-mysqlaux.c -o luaclib/mysqlaux.so  
cc -g -O2 -Wall -I3rd/lua  -fPIC --shared -Iskynet-src lualib-src/lua-debugchannel.c -o luaclib/debugchannel.so 
make[1]: Leaving directory `/root/skynet/src/skynet'
 
附[1]:
Ubuntu下使用skynet笔记
 
附[2]:
Ubuntu下使用skynet笔记
 
本文永久更新地址:http://www.linuxdiyf.com/linux/26823.html