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

v1.6.11 failed to build with undefined reference to `pthread_setname_np' #1792

Open
fmvin opened this issue Aug 17, 2020 · 3 comments
Open

Comments

@fmvin
Copy link

fmvin commented Aug 17, 2020

Looks like closing the issue #1777 by commit bd27935 mosquitto_loop_start() now sets a thread name breaks down a building of v1.6.11 on my target platform.

cc -L../lib pub_client.o pub_shared.o client_shared.o client_props.o -o mosquitto_pub ../lib/libmosquitto.so.1
../lib/libmosquitto.so.1: undefined reference to `pthread_setname_np'

Target platform:
Old fashioned RedHat

2.6.32-642.15.1.el6.i686 #0 SMP Thu Sep 1 00:00:40 MSK 2016 i686 i686 i386 GNU/Linux
ldd (GNU libc) 2.5

Build command:

make WITH_SRV=no WITH_UUID=no WITH_TLS=no WITH_DOCS=no

v1.6.10 builds OK.

@ralight
Copy link
Contributor

ralight commented Aug 17, 2020

pthread_setname_np() was first introduced in glibc 2.12. I believe RHEL 6 includes glibc 2.12, so it should be just fine. Does that match what you have?

@fmvin
Copy link
Author

fmvin commented Aug 20, 2020

Unfortunately, we use a much older distro than RHEL 6. For our distro we cannot upgrade kernel (2.6.32) or glibc (2.5). Please consider to add some conditional compilation or something else that excludes a dependence of pthread_setname_np().

@fabiodepin
Copy link

Hello,
Solved, awaiting approval :
memcached/memcached#1022

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

3 participants