mutex is not an element of mosquitto_msg_data (actions.c (158)) Windows Cmake Build Error
Opened this issue · 1 comments
Hi,
I am trying to build Mosquitto 2.0.20 on my device (Windows 10) via CMake and disabled WITH_THREADING to circumvent the POSIX framework. Nevertheless, the following error is printed (had to translate some parts):
Using Visual Studio from "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat"
** Visual Studio 2017 Developer Command Prompt v15.9.53
** Copyright (c) 2017 Microsoft Corporation
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Users\ccc\Downloads\mosquitto-2.0.20
-- The C compiler identification is MSVC 19.16.27049.0
-- The CXX compiler identification is MSVC 19.16.27049.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: C:/Users/ccc/Downloads/openssl-0.9.8k_X64/lib/libeay32.lib (found version "0.9.8k")
-- WITH_DLT = OFF
-- Optional dependency cJSON not found. Some features will be disabled.
-- Looking for getaddrinfo_a in anl
-- Looking for getaddrinfo_a in anl - not found
CMake Warning at man/CMakeLists.txt:44 (message):
xsltproc not found: manpages cannot be built
-- Configuring done (4.4s)
-- Generating done (0.4s)
CMake Warning:
Manually-specified variables were not used by the project:
OPENSSL_ROOT-DIR
-- Build files have been written to: C:/Users/ccc/Downloads/mosquitto-2.0.20
C:\Users\ccc\Downloads\mosquitto-2.0.20
[ 0%] Building C object lib/CMakeFiles/libmosquitto.dir/actions.c.obj
actions.c
C:\Users\ccc\Downloads\mosquitto-2.0.20\lib\actions.c(158): warning C4013: "pthread_mutex_lock" undefined; Acceptance: external with return value int
C:\Users\ccc\Downloads\mosquitto-2.0.20\lib\actions.c(158): error C2039: "mutex": Is not an element of "mosquitto_msg_data"
c:\users\ccc\downloads\mosquitto-2.0.20\lib\mosquitto_internal.h(187): note: See declaration of "mosquitto_msg_data"
C:\Users\ccc\Downloads\mosquitto-2.0.20\lib\actions.c(161): warning C4013: "pthread_mutex_unlock" undefined; Acceptance: external with return value int
C:\Users\ccc\Downloads\mosquitto-2.0.20\lib\actions.c(161): error C2039: "mutex":Is not an element of "mosquitto_msg_data"
c:\users\ccc\downloads\mosquitto-2.0.20\lib\mosquitto_internal.h(187): note: See declaration of "mosquitto_msg_data"
NMAKE : fatal error U1077: ""C:\Program Files (x86)\CMake\bin\cmake.exe"": Return-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"": Return-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"": Return-Code "0x2"
Stop.
I am having the same issue with -DWITH_THREADING=OFF