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

编译tokudb出错 #12

Closed
skycgz opened this issue Oct 17, 2016 · 9 comments
Closed

编译tokudb出错 #12

skycgz opened this issue Oct 17, 2016 · 9 comments

Comments

@skycgz
Copy link

skycgz commented Oct 17, 2016

如题,相同环境下能编译percona和mariadb的tokudb
执行语句如下:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/alisql
-DMYSQL_DATADIR=/data/mysql/8306/data
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DWITH_MEMORY_STORAGE_ENGINE=1
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_TOKUDB_STORAGE_ENGINE=1
-DSYSCONFDIR=/data/mysql/8306
-DWITH_SSL=yes
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci

报错如下:

RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at scripts/CMakeLists.txt:287 (IF):
if given arguments:

"NOT" "lib" "STREQUAL" "general" "AND" "NOT" "LIBS" "MATCHES" "-lstdc++ "

Regular expression "-lstdc++ " cannot compile
Call Stack (most recent call first):
scripts/CMakeLists.txt:307 (EXTRACT_LINK_LIBRARIES)

-- Configuring incomplete, errors occurred!

cmake version: 2.8.12.2
gcc version: gcc (GCC) 5.2.1 20150902

@xpchild
Copy link
Contributor

xpchild commented Oct 17, 2016

当前的g++版本是多少? 建议升级下g++版本进行编译。

@skycgz
Copy link
Author

skycgz commented Oct 17, 2016

g++ version: g++ (GCC) 5.2.1 20150902

@xpchild
Copy link
Contributor

xpchild commented Oct 17, 2016

尝试在编译参数里关闭 -DWITH_EMBEDDED_SERVER=0 可以先绕过这个问题, 我们在review这个编译问题。

@Assefa1
Copy link

Assefa1 commented Oct 17, 2016

hallo from australia

fungo pushed a commit that referenced this issue Oct 18, 2016
Two problems fixed in this patch:
1. cmake regular expression can't compile for "stdc++";
2. when create libmysqld.a archived library, object files of
   storage/tokudb/ft-index/src/loader.cc and
   storage/tokudb/ft-index/ft/loader/loader.cc conflicts,
   the former is overwrited, and lead to link failure finally.
@fungo
Copy link
Collaborator

fungo commented Oct 18, 2016

主干代码已经 fix 编译问题。

Percona Server 和 MariaDB 没有问题,是因为 TokuDB 是通过编译成 so 插件使用的,而 AliSQL 是静态编译进 mysqld 的,也会静态编译到embeded library (libmysqld.a) 里。

BTW: 试了下把 PS 的 TokuDB 改成静态编译,也是会失败的 :-)

@skycgz
Copy link
Author

skycgz commented Oct 21, 2016

cmake是通过了,make在100%的时候报错,还是编译不过:

Linking C static library libmysqld.a
[100%] Building CXX object sql/CMakeFiles/sql.dir/event_scheduler.cc.o
[100%] Building CXX object sql/CMakeFiles/sql.dir/events.cc.o
[100%] Building CXX object sql/CMakeFiles/sql.dir/mysqld.cc.o
[100%] Building CXX object sql/CMakeFiles/sql.dir/sql_client.cc.o
...
collect2: error: ld returned 1 exit status
make[2]: *** [libmysqld/examples/mysqltest_embedded] Error 1
make[1]: *** [libmysqld/examples/CMakeFiles/mysqltest_embedded.dir/all] Error 2
Linking CXX executable mysql_client_test_embedded
...
/data/cc/AliSQL-master/storage/tokudb/hatoku_hton.cc:217: undefined reference to `increment_partitioned_counter'
collect2: error: ld returned 1 exit status
make[2]: *** [libmysqld/examples/mysql_client_test_embedded] Error 1
make[1]: *** [libmysqld/examples/CMakeFiles/mysql_client_test_embedded.dir/all] Error 2
[100%] Built target mysqld
[100%] Built target pfs_connect_attr-t
make: *** [all] Error 2

@fungo
Copy link
Collaborator

fungo commented Oct 21, 2016

能否提供下操作系统信息,我们测下看。

@skycgz
Copy link
Author

skycgz commented Oct 21, 2016

[root@10-10-14-251 ~]# uname -a

Linux 10-10-14-251 2.6.32-431.11.25.el6.ucloud.x86_64 #1 SMP Tue Jul 19 10:06:12 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@10-10-14-251 ~]# cat /etc/redhat-release

CentOS release 6.5 (Final)

[root@10-10-14-251 ~]# env

MANPATH=/opt/rh/devtoolset-4/root/usr/share/man:
HOSTNAME=10-10-14-251
TERM=vt100
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=10.10.119.24 52021 22
PERL5LIB=/opt/rh/devtoolset-4/root//usr/lib64/perl5/vendor_perl:/opt/rh/devtoolset-4/root/usr/lib/perl5:/opt/rh/devtoolset-4/root//usr/share/perl5/vendor_perl
JAVACONFDIRS=/opt/rh/devtoolset-4/root/etc/java:/etc/java
SSH_TTY=/dev/pts/0
PCP_DIR=/opt/rh/devtoolset-4/root
HISTFILESIZE=100000
USER=root
LD_LIBRARY_PATH=/opt/rh/devtoolset-4/root/usr/lib64:/opt/rh/devtoolset-4/root/usr/lib
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
CPP=/opt/rh/devtoolset-4/root/usr/bin/cpp
XDG_CONFIG_DIRS=/opt/rh/devtoolset-4/root/etc/xdg:/etc/xdg
MAIL=/var/spool/mail/root
PATH=/opt/rh/devtoolset-4/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
PWD=/root
LANG=en_US.UTF-8
CXX=/opt/rh/devtoolset-4/root/usr/bin/c++
HISTCONTROL=ignoredups
SHLVL=1
HOME=/root
GREP_OPTIONS=--color=auto
PYTHONPATH=/opt/rh/devtoolset-4/root/usr/lib64/python2.6/site-packages:/opt/rh/devtoolset-4/root/usr/lib/python2.6/site-packages
LOGNAME=root
XDG_DATA_DIRS=/opt/rh/devtoolset-4/root/usr/share:/usr/local/share:/usr/share
SSH_CONNECTION=10.10.119.24 52021 10.10.14.251 22
LESSOPEN=||/usr/bin/lesspipe.sh %s
INFOPATH=/opt/rh/devtoolset-4/root/usr/share/info
CC=/opt/rh/devtoolset-4/root/usr/bin/gcc
HISTTIMEFORMAT=%Y-%m-%d %H:%M:%S 
G_BROKEN_FILENAMES=1
_=/bin/env

@liqinwyyx
Copy link
Collaborator

@xpchild 启动后日志报unknown variable 'loose_...',只要是loose的参数都找不到

@xpchild xpchild closed this as completed Jul 24, 2017
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