Atlas icon indicating copy to clipboard operation
Atlas copied to clipboard

Debian Stretch 编译失败

Open cevin opened this issue 7 years ago • 6 comments

mv -f .deps/sql_tokenizer_gen-sql-tokenizer-gen.Tpo .deps/sql_tokenizer_gen-sql-tokenizer-gen.Po
/bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2   -o sql-tokenizer-gen sql_tokenizer_gen-sql-tokenizer-tokens.o sql_tokenizer_gen-sql-tokenizer-gen.o -lglib-2.0 
libtool: link: gcc -g -O2 -o sql-tokenizer-gen sql_tokenizer_gen-sql-tokenizer-tokens.o sql_tokenizer_gen-sql-tokenizer-gen.o  -lglib-2.0
./sql-tokenizer-gen > ../lib/sql-tokenizer-keywords.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/mysql  -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../lib/   -g -O2 -MT libsql_tokenizer_la-sql-tokenizer-keywords.lo -MD -MP -MF .deps/libsql_tokenizer_la-sql-tokenizer-keywords.Tpo -c -o libsql_tokenizer_la-sql-tokenizer-keywords.lo `test -f '../lib/sql-tokenizer-keywords.c' || echo './'`../lib/sql-tokenizer-keywords.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/mysql -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../lib/ -g -O2 -MT libsql_tokenizer_la-sql-tokenizer-keywords.lo -MD -MP -MF .deps/libsql_tokenizer_la-sql-tokenizer-keywords.Tpo -c ../lib/sql-tokenizer-keywords.c  -fPIC -DPIC -o .libs/libsql_tokenizer_la-sql-tokenizer-keywords.o
mv -f .deps/libsql_tokenizer_la-sql-tokenizer-keywords.Tpo .deps/libsql_tokenizer_la-sql-tokenizer-keywords.Plo
\
test -f sql-tokenizer.c || \
/bin/bash ../ylwrap `test -f '../lib/sql-tokenizer.l' || echo './'`../lib/sql-tokenizer.l .c sql-tokenizer.c -- /bin/bash /mnt/download/Atlas-sharding-1.0.1/missing --run flex  
Makefile:1257: recipe for target 'sql-tokenizer.c' failed
make[3]: *** [sql-tokenizer.c] Error 1
make[3]: Leaving directory '/mnt/download/Atlas-sharding-1.0.1/src'
Makefile:575: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/mnt/download/Atlas-sharding-1.0.1/src'
Makefile:388: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/mnt/download/Atlas-sharding-1.0.1'
Makefile:291: recipe for target 'all' failed
make: *** [all] Error 2

cevin avatar Sep 01 '17 12:09 cevin

你这个是sharding版,我安装Atlas-2.2.1.tar.gz时也出现类似的报错,我的解决方法如下: yum install openssl-devel ./configure ..... # 就是安装openssl-devel后重新编译安装,居然好了。。。 make && make install

64488 avatar Nov 06 '18 11:11 64488

@64488 不行哦,我这边也是安装相同的包,也是有安装openssl-devel 包,但是还是不行的,应该跟这个openssl没有关系的,你的mysql是哪个版本呀,我这边是5.7.30,跟这个有没有关系呀

lianchengtong avatar Jun 18 '20 14:06 lianchengtong

@64488 不行哦,我这边也是安装相同的包,也是有安装openssl-devel 包,但是还是不行的,应该跟这个openssl没有关系的,你的mysql是哪个版本呀,我这边是5.7.30,跟这个有没有关系呀

编译Atlas失败,肯定跟MySQL的版本没有关系呀!我当时测试的版本是MySQL5.6 为了解决依赖关系,我的安装过程大概如下: yum install jemalloc # 据说atlas依赖这个包,在epel库中有该安装包 yum install gcc pkgconfig glib2-devel openssl-devel libffi-devel lua-devel libevent libevent-devel flex # 解决依赖关系,这些包在安装光盘就有 wget https://github.com/Qihoo360/Atlas/archive/2.2.1.tar.gz # 下载普通版(非跨主机分表版)(发布于2015年4月) tar xf Atlas-2.2.1.tar.gz -C /usr/local/ ln -s /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so; ldconfig # 解决"/usr/bin/ld: cannot find -lcrypto"的报错 cd /usr/local/Atlas-2.2.1/ ./configure --with-mysql=/usr/bin/mysql_config --prefix=/usr/local/mysql-proxy LDFLAGS="-lcrypto" make && echo OK............... && make install && echo OKOKOKOK # 安装过程中有一些告警,反正也看不懂,不管了.

64488 avatar Jun 19 '20 03:06 64488

@64488 ,应该不对呀,所有的操作步骤都没有问题,怎么提示 lua-scope.c:44:29: error: unknown type name ‘lua_State’ static int proxy_lua_panic (lua_State *L); ^ lua-scope.c: In function ‘lua_scope_new’: lua-scope.c:67:2: warning: ‘g_mutex_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:277) [-Wdeprecated-declarations] sc->mutex = g_mutex_new(); /remove lock/ ^ lua-scope.c: In function ‘lua_scope_free’: lua-scope.c:91:2: warning: ‘g_mutex_free’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:279) [-Wdeprecated-declarations] g_mutex_free(sc->mutex); /remove lock/ ^ make[3]: *** [libmysql_chassis_la-lua-scope.lo] Error 1 make[3]: Leaving directory /usr/local/atlas/src' make[2]: *** [all] Error 2 make[2]: Leaving directory /usr/local/atlas/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/atlas' make: *** [all] Error 2 这个是在make && make install 才出现的,已经生成了Makefile文件啦

lianchengtong avatar Jun 19 '20 03:06 lianchengtong

@64488

报错是sql-tokenizer.c 怎么会和ssl有问题。而且debian下ssl包是libssl-dev也是装过的

cevin avatar Jun 19 '20 04:06 cevin

我是在CentOS中安装的,不是Debian。

下面说的纯属猜测(而且我也不知道解决方案哦~):

信息中存在下面两行:

‘g_mutex_new’ is deprecated ‘g_mutex_free’ is deprecated 是不是Atlas使用了过老的system call???

毕竟Atlas是那么多年前的产品了,内核也升级过那么多次,也许老版本的Atlas已经不兼容新版本的内核???

陈浩泉 13925464488


------------------ 原始邮件 ------------------

发件人: lianchengtong [email protected]

发送时间: 2020-06-19 11:58:30

收件人:Qihoo360/Atlas [email protected]

抄送:陈浩泉 [email protected],Mention [email protected]

主题: Re: [Qihoo360/Atlas] Debian Stretch 编译失败 (#157)

@64488 ,应该不对呀,所有的操作步骤都没有问题,怎么提示 lua-scope.c:44:29: error: unknown type name ‘lua_State’ static int proxy_lua_panic (lua_State *L) ^ lua-scope.c: In function ‘lua_scope_new’: lua-scope.c:67:2: warning: ‘g_mutex_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:277) [-Wdeprecated-declarations] sc->mutex = g_mutex_new() /remove lock/ ^ lua-scope.c: In function ‘lua_scope_free’: lua-scope.c:91:2: warning: ‘g_mutex_free’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:279) [-Wdeprecated-declarations] g_mutex_free(sc->mutex) /remove lock/ ^ make[3]: *** [libmysql_chassis_la-lua-scope.lo] Error 1 make[3]: Leaving directory /usr/local/atlas/src' make[2]: *** [all] Error 2 make[2]: Leaving directory /usr/local/atlas/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/atlas' make: *** [all] Error 2 这个是在make && make install 才出现的,已经生成了Makefile文件啦

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

64488 avatar Jun 19 '20 07:06 64488