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

make 报错 #33

Open
xsunnydong opened this issue Sep 12, 2018 · 6 comments
Open

make 报错 #33

xsunnydong opened this issue Sep 12, 2018 · 6 comments

Comments

@xsunnydong
Copy link

[ 83%] Building CXX object bin/CMakeFiles/mysql-sniffer.dir/sniff-config.cpp.o
/root/mysql-sniffer/src/sniff-config.cpp: 在函数‘int parse_cmdline_option(int, char**)’中:
/root/mysql-sniffer/src/sniff-config.cpp:183:9: 警告:variable ‘opt_len’ set but not used [-Wunused-but-set-variable]
int opt_len;
^
[100%] Building CXX object bin/CMakeFiles/mysql-sniffer.dir/sniff-log.cpp.o
Linking CXX executable mysql-sniffer
/usr/bin/ld: /root/mysql-sniffer/lib/libgthread-2.0.a(gthread-impl.o): undefined reference to symbol 'pthread_setspecific@@GLIBC_2.2.5'
//usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: 错误:ld 返回 1
make[2]: *** [bin/mysql-sniffer] 错误 1
make[1]: *** [bin/CMakeFiles/mysql-sniffer.dir/all] 错误 2
make: *** [all] 错误 2
##########################################################################
系统环境:CentOS7
glib2-devel-2.54.2-2.el7.x86_64 libpcap-devel-1.5.3-11.el7.x86_64 libnet-devel-1.1.6-7.el7.x86_64

@yuynagforhacker
Copy link

同问。。我也遇到了同样的错误,是centos7不支持吗?

@bollwarm
Copy link

issues/30

@sky-sunny
Copy link

同样

@man-laughing
Copy link

同样的问题,系统环境如下:
CentOS Linux release 7.3.1611 (Core)
3.10.0-514.21.1.el7.x86_64
glib2-devel-2.56.1-2.el7.x86_64
libpcap-1.5.3-11.el7.x86_64
libpcap-devel-1.5.3-11.el7.x86_64
libnet-devel-1.1.6-7.el7.x86_64

@welyss
Copy link

welyss commented Jul 22, 2020

我也是,按readme操作漏了个依赖好像,
yum install gcc-c++
安装完再清proj目录,再跑cmake就好了

@xuyz
Copy link

xuyz commented Mar 15, 2022

proj/bin/CMakeFiles/mysql-sniffer.dir/link.txt 文件最后加上-lpthread, 重新make就可以了
参考 : https://www.cnblogs.com/MakeInstall/p/10868983.html

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

7 participants