git clone https://github.com/cloudwu/skynet.git
cd skynet
make linux
|
# git clone https://github.com/cloudwu/skynet.git
bash: git: command not found |
yum -y install curl curl-devel
wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-2.5.2.tar.gz
tar -zxf
git-2.5.2.tar.gz
cd
git-2.5.2
./configure --prefix=/usr
make
make install
|
# git clone https://github.com/cloudwu/skynet.git
Cloning into 'skynet'...
fatal: Unable to find remote helper for 'https' |
lua.c:81:31: error: readline/readline.h: No such file or directory
lua.c:82:30: error: readline/history.h: No such file or directory
lua.c: In function ‘pushline’:
lua.c:311: warning: implicit declaration of function ‘readline’
lua.c:311: warning: assignment makes pointer from integer without a cast
lua.c: In function ‘addreturn’:
lua.c:342: warning: implicit declaration of function ‘add_history’
make[3]: *** [lua.o] Error 1
make[3]: Leaving directory `/data/git-2.5.2/skynet/3rd/lua'
make[2]: *** [linux] Error 2
make[2]: Leaving directory `/data/git-2.5.2/skynet/3rd/lua'
make[1]: *** [3rd/lua/liblua.a] Error 2
make[1]: Leaving directory `/data/git-2.5.2/skynet'
make: *** [linux] Error 2
|
cc -std=gnu99 -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `PC'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `tgetflag'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `tgetent'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `UP'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `tputs'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `tgoto'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `tgetnum'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `BC'
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
make[3]: *** [lua] Error 1
make[3]: Leaving directory `/data/skynet/3rd/lua'
make[2]: *** [linux] Error 2
make[2]: Leaving directory `/data/skynet/3rd/lua'
make[1]: *** [3rd/lua/liblua.a] Error 2
make[1]: Leaving directory `/data/skynet'
make: *** [linux] Error 2
|
yum -y install ncurses-devel
wget ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
tar -zxf readline-6.2.tar.gz
cd readline-6.2
./configure --prefix=/usr
make SHLIB_LIBS=-lncurses
make install
ldconfig
|
3rd/lua/luaconf.h:560:2: error: #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
In file included from skynet-src/malloc_hook.c:5:
3rd/lua/lua.h:93: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lua_Integer’
3rd/lua/lua.h:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lua_Unsigned’
3rd/lua/lua.h:182: warning: type defaults to ‘int’ in declaration of ‘lua_Integer’
3rd/lua/lua.h:182: error: ‘lua_Integer’ declared as function returning a function
3rd/lua/lua.h:182: warning: parameter names (without types) in function declaration
3rd/lua/lua.h:226: error: expected declaration specifiers or ‘...’ before ‘lua_Integer’
3rd/lua/lua.h:244: error: expected declaration specifiers or ‘...’ before ‘lua_Integer’
3rd/lua/lua.h:246: error: expected declaration specifiers or ‘...’ before ‘lua_Integer’
3rd/lua/lua.h:261: error: expected declaration specifiers or ‘...’ before ‘lua_Integer’
3rd/lua/lua.h:263: error: expected declaration specifiers or ‘...’ before ‘lua_Integer’
skynet-src/malloc_hook.c: In function ‘update_xmalloc_stat_alloc’:
skynet-src/malloc_hook.c:55: warning: value computed is not used
skynet-src/malloc_hook.c: In function ‘update_xmalloc_stat_free’:
skynet-src/malloc_hook.c:65: warning: value computed is not used
skynet-src/malloc_hook.c: In function ‘dump_mem_lua’:
skynet-src/malloc_hook.c:237: error: too many arguments to function ‘lua_pushinteger’
skynet-src/malloc_hook.c:238: error: expected ‘)’ before ‘data’
skynet-src/malloc_hook.c:238: error: too many arguments to function ‘lua_rawseti’
In file included from skynet-src/skynet_log.c:1:
skynet-src/skynet_log.h:14:7: warning: no newline at end of file
make[1]: *** [skynet] Error 1
make[1]: Leaving directory `/data/skynet'
make: *** [linux] Error 2
|
/data/skynet/skynet-src/skynet_server.c:211: undefined reference to `__sync_sub_and_fetch_4'
/tmp/ccC4fGch.o: In function `cmd_logoff':
/data/skynet/skynet-src/skynet_server.c:589: undefined reference to `__sync_bool_compare_and_swap_4'
/tmp/ccC4fGch.o: In function `cmd_logon':
/data/skynet/skynet-src/skynet_server.c:568: undefined reference to `__sync_bool_compare_and_swap_4'
/tmp/ccaeanLP.o: In function `reserve_id':
/data/skynet/skynet-src/socket_server.c:241: undefined reference to `__sync_add_and_fetch_4'
/data/skynet/skynet-src/socket_server.c:247: undefined reference to `__sync_bool_compare_and_swap_2'
/data/skynet/skynet-src/socket_server.c:243: undefined reference to `__sync_and_and_fetch_4'
/tmp/ccs12kTV.o: In function `get_allocated_field':
/data/skynet/skynet-src/malloc_hook.c:36: undefined reference to `__sync_bool_compare_and_swap_4'
/data/skynet/skynet-src/malloc_hook.c:40: undefined reference to `__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status
make[1]: *** [skynet] Error 1
make[1]: Leaving directory `/data/skynet'
make: *** [linux] Error 2
|
wget http://mirrors.ustc.edu.cn/gnu/gcc/gcc-4.6.0/gcc-4.6.0.tar.gz
tar -zxf
gcc-4.6.0.tar.gz
cd gcc-4.6.0
./contrib/download_prerequisites
mkdir build
cd build
../configure --prefix=/usr -enable-checking=release -enable-languages=c,c++ -disable-multilib
make
make install
|
Resolving gcc.gnu.org... 209.132.180.131
Connecting to gcc.gnu.org|209.132.180.131|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD /pub/gcc/infrastructure ... done.
==> SIZE mpfr-2.4.2.tar.bz2 ... 1077886
==> PASV ... couldn't connect to 209.132.180.131 port 10179: Connection refused
|
wget http://ftp.gnu.org/gnu/gmp/gmp-4.2.2.tar.bz2
tar -jxf gmp-4.2.2.tar.bz2
cd gmp-4.2.2
./configure --prefix=/usr
make && make install
wget http://mpfr.loria.fr/mpfr-2.3.2/mpfr-2.3.2.tar.gz
tar -zxf mpfr-2.3.2.tar.gz
cd mpfr-2.3.2
./configure --prefix=/usr
make && make install
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz
tar -zxf
mpc-0.8.1.tar.gz
cd mpc-0.8.1
./configure --prefix=/usr
make && make install
|
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 `/data/skynet'
cd 3rd/jemalloc && ./autogen.sh --with-jemalloc-prefix=je_ --disable-valgrind
autoconf
./autogen.sh: line 5: autoconf: command not found
Error 0 in autoconf
make[1]: *** [3rd/jemalloc/Makefile] Error 1
make[1]: Leaving directory `/data/skynet'
make: *** [linux] Error 2
|
ln -sf libjemalloc.so.2 lib/libjemalloc.so
ln: creating symbolic link `lib/libjemalloc.so' to `libjemalloc.so.2': Operation not supported
make[3]: *** [lib/libjemalloc.so] Error 1
make[3]: Leaving directory `/mnt/hgfs/vm/skynet/3rd/jemalloc'
make[2]: *** [3rd/jemalloc/lib/libjemalloc_pic.a] Error 2
make[2]: Leaving directory `/mnt/hgfs/vm/skynet'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/mnt/hgfs/vm/skynet'
make: *** [default] Error 2
|