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

对‘pthread_atfork’未定义的引用 #43

Open
Swean opened this issue Sep 28, 2020 · 2 comments
Open

对‘pthread_atfork’未定义的引用 #43

Swean opened this issue Sep 28, 2020 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested

Comments

@Swean
Copy link

Swean commented Sep 28, 2020

开启了ssl、HTTP2后执行/usr/local/tars/cpp/script/cmake_tars_server.sh [App] [Server] [Servant],会有下面报错:

[ 25%] Built target tars-HelloServer
[ 50%] Linking CXX executable ../bin/HelloServer
/usr/local/tars/cpp/thirdparty/lib/libcrypto.a(threads_pthread.o):在函数‘fork_once_func’中:
threads_pthread.c:(.text+0x16):对‘pthread_atfork’未定义的引用
collect2: 错误:ld 返回 1
make[2]: *** [bin/HelloServer] 错误 1
make[1]: *** [src/CMakeFiles/HelloServer.dir/all] 错误 2
make: *** [all] 错误 2

@Swean
Copy link
Author

Swean commented Sep 28, 2020

修改文件link.txt,注意-lssl -lcrypto要写在-ldl -lpthread前面。再执行make编译

@tarscloudbot
Copy link
Contributor

感谢您对TARS社区的关注~有空的话是否方便提个pr一起共建?

@ETZhangSX ETZhangSX added bug Something isn't working good first issue Good for newcomers question Further information is requested labels Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants