Hi guys ... I can not build mosquitto auth plugin on my centos 7 server.
cd /usr/src/
git clone
https://github.com/eclipse/mosquitto.gitgit clone
https://github.com/jpmens/mosquitto-auth-plug.gitcd mosquitto-auth-plug/
cp
config.mk.in config.mkvim
config.mk:
###############
BACKEND_MYSQL ?= yes
.
# Specify the path to the Mosquitto sources here
# MOSQUITTO_SRC = /usr/local/Cellar/mosquitto/1.4.12
MOSQUITTO_SRC = /usr/src/mosquitto
# Specify the path the OpenSSL here
OPENSSLDIR = /usr/bin
###############
then :
make , yelds:
Selected backends: MySQL
Using mosquitto source dir: /usr/src/mosquitto
OpenSSL install dir: /usr/bin
If you changed the backend selection, you might need to 'make clean' first
CFLAGS: -I/usr/src/mosquitto/src/ -I/usr/src/mosquitto/lib/ -fPIC -Wall -Werror -DBE_MYSQL -I/usr/include/mysql -m64 -I/src -DDEBUG=1 -I/usr/bin/include
LDFLAGS: -L/usr/src/mosquitto/lib/
LDADD: -L/usr/lib64/mysql -lmysqlclient -lpthread -lm -lrt -ldl -L/usr/bin/lib -lcrypto -lmosquitto
cc -I/usr/src/mosquitto/src/ -I/usr/src/mosquitto/lib/ -fPIC -Wall -Werror -DBE_MYSQL `mysql_config --cflags` -I/src -DDEBUG=1 -I/usr/bin/include -c -o auth-plug.o auth-plug.c
auth-plug.c:502:5: error: conflicting types for ‘mosquitto_auth_unpwd_check’
int mosquitto_auth_unpwd_check(void *userdata, const struct mosquitto *client, const char *username, const char *password)
^
In file included from auth-plug.c:36:0:
/usr/src/mosquitto/src/mosquitto_plugin.h:254:5: note: previous declaration of ‘mosquitto_auth_unpwd_check’ was here
int mosquitto_auth_unpwd_check(void *user_data, struct mosquitto *client, const char *username, const char *password);
^
auth-plug.c:601:5: error: conflicting types for ‘mosquitto_auth_acl_check’
int mosquitto_auth_acl_check(void *userdata, int access, const struct mosquitto *client, const struct mosquitto_acl_msg *msg)
^
In file included from auth-plug.c:36:0:
/usr/src/mosquitto/src/mosquitto_plugin.h:237:5: note: previous declaration of ‘mosquitto_auth_acl_check’ was here
int mosquitto_auth_acl_check(void *user_data, int access, struct mosquitto *client, const struct mosquitto_acl_msg *msg);
^
auth-plug.c:752:5: error: conflicting types for ‘mosquitto_auth_psk_key_get’
int mosquitto_auth_psk_key_get(void *userdata, const struct mosquitto *client, const char *hint, const char *identity, char *key, int max_key_len)
^
In file included from auth-plug.c:36:0:
/usr/src/mosquitto/src/mosquitto_plugin.h:282:5: note: previous declaration of ‘mosquitto_auth_psk_key_get’ was here
int mosquitto_auth_psk_key_get(void *user_data, struct mosquitto *client, const char *hint, const char *identity, char *key, int max_key_len);
^
make: *** [auth-plug.o] Error 1
Question:
Do I need to build mosquitto also ? (It works out of the box using yum install mosquitto).
Is it easier to install in other distro ? debian perhaps ?.