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

mosquitto 2.0.20 fails to build on Linux without threads #3183

Open
jacmet opened this issue Dec 6, 2024 · 0 comments
Open

mosquitto 2.0.20 fails to build on Linux without threads #3183

jacmet opened this issue Dec 6, 2024 · 0 comments
Labels
Status: Available No one has claimed responsibility for resolving this issue.

Comments

@jacmet
Copy link
Contributor

jacmet commented Dec 6, 2024

As reported on the mailing list (https://www.eclipse.org/lists/mosquitto-dev/msg03003.html), the changes in 88b7bb3 unfortunately broke the builds on Linux on setups without threads, E.G.:

make ... WITH_THREADING=no WITH_TLS=yes WITH_CJSON=no WITH_SRV=no WITH_WEBSOCKETS=no
make[1]: Entering directory '/home/autobuild/autobuild/instance-7/output-1/build/mosquitto-2.0.20'
set -e; for d in lib client; do /usr/bin/make -C ${d}; done
make[2]: Entering directory '/home/autobuild/autobuild/instance-7/output-1/build/mosquitto-2.0.20/lib'
/home/autobuild/autobuild/instance-7/output-1/per-package/mosquitto/host/bin/riscv64-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I.. -I../include -I../../include -DWITH_TLS -DOPENSSL_API_COMPAT=0x10100000L -DWITH_TLS_PSK -DWITH_SOCKS -DWITH_UNIX_SOCKETS -I../deps -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Ofast -g0  -fPIC  -Wl,-elf2flt=-r -static -fPIC -c mosquitto.c -o mosquitto.o
/home/autobuild/autobuild/instance-7/output-1/per-package/mosquitto/host/bin/riscv64-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I.. -I../include -I../../include -DWITH_TLS -DOPENSSL_API_COMPAT=0x10100000L -DWITH_TLS_PSK -DWITH_SOCKS -DWITH_UNIX_SOCKETS -I../deps -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Ofast -g0  -fPIC  -Wl,-elf2flt=-r -static -fPIC -c actions.c -o actions.o
actions.c: In function 'mosquitto_publish_v5':
actions.c:158:51: error: 'struct mosquitto_msg_data' has no member named 'mutex'
  158 |                 pthread_mutex_lock(&mosq->msgs_out.mutex);
      |                                                   ^
actions.c:161:53: error: 'struct mosquitto_msg_data' has no member named 'mutex'
  161 |                 pthread_mutex_unlock(&mosq->msgs_out.mutex);
      |                                                     ^

I see you replaced most, but not all pthread_* calls by COMPAT_pthread_*? Was this done on purpose or just a mistake?

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Dec 6, 2024
arnout pushed a commit to buildroot/buildroot that referenced this issue Dec 7, 2024
…read builds

Fixes:
http://autobuild.buildroot.net/results/1998881e9ab9ff396e6fd47b0d7c1298ccb25266/
http://autobuild.buildroot.net/results/0cb8e2dcee51007ee09506fa143e52cefbde5335/

And many more.

A change in mosquitto 2.0.20 to fix builds on NetBSD broke WITH_THREADING=no
builds as it unconditionally calls pthread functions.  The issue has been
reported upstream for ~1 month, but so far no fix so revert the NetBSD
change for now instead to fix the build.

https://www.eclipse.org/lists/mosquitto-dev/msg03003.html
eclipse-mosquitto/mosquitto#3183

Signed-off-by: Peter Korsgaard <[email protected]>
@jacmet jacmet changed the title mosquitto 2.0.20 fails to build Linux without threads mosquitto 2.0.20 fails to build on Linux without threads Dec 7, 2024
arnout pushed a commit to buildroot/buildroot that referenced this issue Dec 8, 2024
…read builds

Fixes:
http://autobuild.buildroot.net/results/1998881e9ab9ff396e6fd47b0d7c1298ccb25266/
http://autobuild.buildroot.net/results/0cb8e2dcee51007ee09506fa143e52cefbde5335/

And many more.

A change in mosquitto 2.0.20 to fix builds on NetBSD broke WITH_THREADING=no
builds as it unconditionally calls pthread functions.  The issue has been
reported upstream for ~1 month, but so far no fix so revert the NetBSD
change for now instead to fix the build.

https://www.eclipse.org/lists/mosquitto-dev/msg03003.html
eclipse-mosquitto/mosquitto#3183

Signed-off-by: Peter Korsgaard <[email protected]>
(cherry picked from commit 0f88615)
Signed-off-by: Peter Korsgaard <[email protected]>
arnout pushed a commit to buildroot/buildroot that referenced this issue Dec 8, 2024
…read builds

Fixes:
http://autobuild.buildroot.net/results/1998881e9ab9ff396e6fd47b0d7c1298ccb25266/
http://autobuild.buildroot.net/results/0cb8e2dcee51007ee09506fa143e52cefbde5335/

And many more.

A change in mosquitto 2.0.20 to fix builds on NetBSD broke WITH_THREADING=no
builds as it unconditionally calls pthread functions.  The issue has been
reported upstream for ~1 month, but so far no fix so revert the NetBSD
change for now instead to fix the build.

https://www.eclipse.org/lists/mosquitto-dev/msg03003.html
eclipse-mosquitto/mosquitto#3183

Signed-off-by: Peter Korsgaard <[email protected]>
(cherry picked from commit 0f88615)
Signed-off-by: Peter Korsgaard <[email protected]>
j1nx pushed a commit to OpenVoiceOS/buildroot that referenced this issue Dec 16, 2024
…read builds

Fixes:
http://autobuild.buildroot.net/results/1998881e9ab9ff396e6fd47b0d7c1298ccb25266/
http://autobuild.buildroot.net/results/0cb8e2dcee51007ee09506fa143e52cefbde5335/

And many more.

A change in mosquitto 2.0.20 to fix builds on NetBSD broke WITH_THREADING=no
builds as it unconditionally calls pthread functions.  The issue has been
reported upstream for ~1 month, but so far no fix so revert the NetBSD
change for now instead to fix the build.

https://www.eclipse.org/lists/mosquitto-dev/msg03003.html
eclipse-mosquitto/mosquitto#3183

Signed-off-by: Peter Korsgaard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.
Projects
None yet
Development

No branches or pull requests

1 participant