Attempting to compile mosquitto 1.4.14 from net/mosquitto fails on FreeBSD 11.1-RELEASE-p4: FAILED: src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o /usr/bin/cc -DCMAKE -DTIMESTAMP="\"2018-01-31 08:54:39+0000\"" -DVERSION=\"1.4.14\" -DWITH_BRIDGE -DWITH_BROKER -DWITH_EC -DWITH_MEMORY_TRACKING -DWITH_PERSISTENCE -DWITH_SOCKS -DWITH_SYS_TREE -DWITH_THREADING -DWITH_TLS -DWITH_TLS_PSK -DWITH_WEBSOCKETS -I/usr/local/include -I. -Isrc -Ilib -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -MD -MT src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o -MF src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o.d -o src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o -c lib/read_handle_shared.c In file included from lib/read_handle_shared.c:29: In file included from lib/util_mosq.h:25: In file included from src/mosquitto_broker.h:24: In file included from /usr/local/include/libwebsockets.h:153: In file included from /usr/local/include/uv.h:62: In file included from /usr/local/include/uv-unix.h:42: /usr/include/pthread.h:239:28: error: use of undeclared identifier '__mutex' __requires_unlocked(*__mutex); ^ /usr/include/pthread.h:242:28: error: use of undeclared identifier '__mutex' __requires_unlocked(*__mutex); ^ /usr/include/pthread.h:244:26: error: use of undeclared identifier '__mutex' __locks_exclusive(*__mutex); ^ /usr/include/pthread.h:251:18: error: use of undeclared identifier '__mutex' __unlocks(*__mutex); ^ 4 errors generated. This seems similar to 220827, but that was fixed some time ago. I'm also building with websocket support.
(In reply to Tim McCormick from comment #0) Tim, I can't reproduce on 10 i386, 11 amd64, 12 amd64, all systems that I normally build on. Please try again and see if it still breaks for you. Yuri
I have the same problem make install clean MAKE_JOBS_UNSAFE=yes ===> Building for mosquitto-1.4.14_1 [1/12] /usr/bin/cc -DCMAKE -DTIMESTAMP="\"2018-03-21 22:25:22+0200\"" -DVERSION=\"1.4.14\" -DWITH_BRIDGE -DWITH_BROKER -DWITH_EC -DWITH_MEMORY_TRACKING -DWITH_PERSISTENCE -DWITH_SOCKS -DWITH_SYS_TREE -DWITH_THREADING -DWITH_TLS -DWITH_TLS_PSK -DWITH_UUID -DWITH_WEBSOCKETS -I/usr/local/include -I. -Isrc -Ilib -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -MD -MT src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o -MF src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o.d -o src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o -c lib/read_handle_shared.c FAILED: src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o /usr/bin/cc -DCMAKE -DTIMESTAMP="\"2018-03-21 22:25:22+0200\"" -DVERSION=\"1.4.14\" -DWITH_BRIDGE -DWITH_BROKER -DWITH_EC -DWITH_MEMORY_TRACKING -DWITH_PERSISTENCE -DWITH_SOCKS -DWITH_SYS_TREE -DWITH_THREADING -DWITH_TLS -DWITH_TLS_PSK -DWITH_UUID -DWITH_WEBSOCKETS -I/usr/local/include -I. -Isrc -Ilib -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -MD -MT src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o -MF src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o.d -o src/CMakeFiles/mosquitto.dir/__/lib/read_handle_shared.c.o -c lib/read_handle_shared.c In file included from lib/read_handle_shared.c:29: In file included from lib/util_mosq.h:25: In file included from src/mosquitto_broker.h:24: In file included from /usr/local/include/libwebsockets.h:153: In file included from /usr/local/include/uv.h:62: In file included from /usr/local/include/uv-unix.h:42: /usr/include/pthread.h:239:28: error: use of undeclared identifier '__mutex' __requires_unlocked(*__mutex); ^ /usr/include/pthread.h:242:28: error: use of undeclared identifier '__mutex' __requires_unlocked(*__mutex); ^ /usr/include/pthread.h:244:26: error: use of undeclared identifier '__mutex' __locks_exclusive(*__mutex); ^ /usr/include/pthread.h:251:18: error: use of undeclared identifier '__mutex' __unlocks(*__mutex); ^ 4 errors generated. ninja: build stopped: subcommand failed. *** Error code 1 Stop. make[1]: stopped in /usr/ports/net/mosquitto *** Error code 1 Stop. make: stopped in /usr/ports/net/mosquitto I'm sure it is related with libwebsockets.
(In reply to Yuri Victorovich from comment #1) I was compiling with WS support (the first question when start compilation of mosquito). My config for libwebsockets was "all checkbox selected" - maybe this helps to reproduce. I'm pretty sure it's because of libwebsockets
Reopening.
There was a similar problem bug #220827.
If it is the same error (I don't know cause I also cannot reproduce the error) Try to change in the Makefile WS_CMAKE_ON= -DWITH_WEBSOCKETS=ON to WS_CMAKE_ON= -DWITH_WEBSOCKETS=ON -DWITH_THREADING=ON
Tested on 12-CURRENT,r338331 and i get no error with WS on
Close based on comment#7. Thanks, Nathan!
Last committer: lwhsu@FreeBSD.org Ident: $FreeBSD: head/net/mosquitto/Makefile 481153 2018-10-03 09:54:40Z lwhsu $ Log URL: http://beefy12.nyi.freebsd.org/data/head-amd64-default/p482633_s339515/logs/mosquitto-1.5.3.log Build URL: http://beefy12.nyi.freebsd.org/build.html?mastername=head-amd64-default&build=p482633_s339515 These changes introduces a build failure...
ignore, wrong bug report...