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

THe Program doesn't compile #15

Open
mntolia opened this issue Aug 30, 2018 · 1 comment
Open

THe Program doesn't compile #15

mntolia opened this issue Aug 30, 2018 · 1 comment

Comments

@mntolia
Copy link

mntolia commented Aug 30, 2018

Hi,
I tried installing this plugin but the program doesn't compile. It throws this error:

make MOSQUITTO_SRC=/home/maxwell/Desktop/project/mosquitto
cc -std=gnu99 -fPIC -I../lib -I../src `python2.7-config --includes` -Wall -Wextra -O2 -I/home/maxwell/Desktop/project/mosquitto/src/ -I/home/maxwell/Desktop/project/mosquitto/lib/ -c -o auth_plugin_pyauth.o auth_plugin_pyauth.c
auth_plugin_pyauth.c: In function ‘pyauth_mosquitto_log_printf’:
auth_plugin_pyauth.c:80:5: warning: implicit declaration of function ‘mosquitto_log_printf’ [-Wimplicit-function-declaration]
     mosquitto_log_printf(loglevel, "%s", fmt);
     ^
auth_plugin_pyauth.c: At top level:
auth_plugin_pyauth.c:161:5: error: conflicting types for ‘mosquitto_auth_plugin_init’
 int mosquitto_auth_plugin_init(void **user_data, struct mosquitto_auth_opt *aut
     ^
In file included from auth_plugin_pyauth.c:8:0:
/home/maxwell/Desktop/project/mosquitto/src/mosquitto_plugin.h:118:5: note: previous declaration of ‘mosquitto_auth_plugin_init’ was here
 int mosquitto_auth_plugin_init(void **user_data, struct mosquitto_opt *opts, in
     ^
auth_plugin_pyauth.c:217:5: error: conflicting types for ‘mosquitto_auth_plugin_cleanup’
 int mosquitto_auth_plugin_cleanup(void *user_data, struct mosquitto_auth_opt *a
     ^
In file included from auth_plugin_pyauth.c:8:0:
/home/maxwell/Desktop/project/mosquitto/src/mosquitto_plugin.h:140:5: note: previous declaration of ‘mosquitto_auth_plugin_cleanup’ was here
 int mosquitto_auth_plugin_cleanup(void *user_data, struct mosquitto_opt *opts, 
     ^
auth_plugin_pyauth.c:242:5: error: conflicting types for ‘mosquitto_auth_security_init’
 int mosquitto_auth_security_init(void *user_data, struct mosquitto_auth_opt *au
     ^
In file included from auth_plugin_pyauth.c:8:0:
/home/maxwell/Desktop/project/mosquitto/src/mosquitto_plugin.h:168:5: note: previous declaration of ‘mosquitto_auth_security_init’ was here
 int mosquitto_auth_security_init(void *user_data, struct mosquitto_opt *opts, i
     ^
auth_plugin_pyauth.c:274:5: error: conflicting types for ‘mosquitto_auth_security_cleanup’
 int mosquitto_auth_security_cleanup(void *user_data, struct mosquitto_auth_opt 
     ^
In file included from auth_plugin_pyauth.c:8:0:
/home/maxwell/Desktop/project/mosquitto/src/mosquitto_plugin.h:196:5: note: previous declaration of ‘mosquitto_auth_security_cleanup’ was here
 int mosquitto_auth_security_cleanup(void *user_data, struct mosquitto_opt *opts
     ^
auth_plugin_pyauth.c:295:5: error: conflicting types for ‘mosquitto_auth_acl_check’
 int mosquitto_auth_acl_check(void *user_data, const char *clientid, const char 
     ^
In file included from auth_plugin_pyauth.c:8:0:
/home/maxwell/Desktop/project/mosquitto/src/mosquitto_plugin.h:223:5: note: previous declaration of ‘mosquitto_auth_acl_check’ was here
 int mosquitto_auth_acl_check(void *user_data, int access, const struct mosquitt
     ^
auth_plugin_pyauth.c:313:5: error: conflicting types for ‘mosquitto_auth_unpwd_check’
 int mosquitto_auth_unpwd_check(void *user_data, const char *username, const cha
     ^
In file included from auth_plugin_pyauth.c:8:0:
/home/maxwell/Desktop/project/mosquitto/src/mosquitto_plugin.h:237:5: note: previous declaration of ‘mosquitto_auth_unpwd_check’ was here
 int mosquitto_auth_unpwd_check(void *user_data, const struct mosquitto *client,
     ^

I am guessing that the abstract functions in mosquitto_plugin.h have different paramters compared to the ones you used.

Thanks for the making the plugin!

@mbachry
Copy link
Owner

mbachry commented Sep 1, 2018

Hi! Thanks for bug report. Looks like mosquitto version 1.5 has new plugin C API. I pushed a change which migrates pyauth plugin to the new API (and makes 1.5.1 minimal required version). Try again with current master branch and let me know if it helped.

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

2 participants