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-PHP does not build on Ubuntu 22.04 for php8 #128

Open
Siggemada opened this issue Nov 3, 2022 · 1 comment
Open

Mosquitto-PHP does not build on Ubuntu 22.04 for php8 #128

Siggemada opened this issue Nov 3, 2022 · 1 comment

Comments

@Siggemada
Copy link

Siggemada commented Nov 3, 2022

Am I missing some dependency?

I did:

git checkout php8
git pull
phpize
./configure --with-mosquitto=/usr/include
make

And I am on ubuntu 22.04.1 freshly installed.

~/Mosquitto-PHP$ make /bin/bash /home/user/Mosquitto-PHP/libtool --mode=compile cc -I. -I/home/user/Mosquitto-PHP -I/home/user/Mosquitto-PHP/include -I/home/user/Mosquitto-PHP/main -I/home/user/Mosquitto-PHP -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /home/user/Mosquitto-PHP/mosquitto.c -o mosquitto.lo -MMD -MF mosquitto.dep -MT mosquitto.lo libtool: compile: cc -I. -I/home/user/Mosquitto-PHP -I/home/user/Mosquitto-PHP/include -I/home/user/Mosquitto-PHP/main -I/home/user/Mosquitto-PHP -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /home/user/Mosquitto-PHP/mosquitto.c -MMD -MF mosquitto.dep -MT mosquitto.lo -fPIC -DPIC -o .libs/mosquitto.o /home/user/Mosquitto-PHP/mosquitto.c: In function ‘zim_Mosquitto_Client_setTlsCertificates’: /home/user/Mosquitto-PHP/mosquitto.c:234:18: warning: passing argument 1 of ‘php_stat’ from incompatible pointer type [-Wincompatible-pointer-types] 234 | php_stat(ca_path, ca_path_len, FS_IS_DIR, &stat); | ^~~~~~~ | | | char * In file included from /home/user/Mosquitto-PHP/mosquitto.c:10: /usr/include/php/20210902/ext/standard/php_filestat.h:44:35: note: expected ‘zend_string *’ {aka ‘struct _zend_string *’} but argument is of type ‘char *’ 44 | PHPAPI void php_stat(zend_string *filename, int type, zval *return_value); | ~~~~~~~~~~~~~^~~~~~~~ /usr/include/php/20210902/ext/standard/php_filestat.h:60:20: warning: passing argument 3 of ‘php_stat’ makes pointer from integer without a cast [-Wint-conversion] 60 | #define FS_IS_DIR 13 | ^~ | | | int /home/user/Mosquitto-PHP/mosquitto.c:234:40: note: in expansion of macro ‘FS_IS_DIR’ 234 | php_stat(ca_path, ca_path_len, FS_IS_DIR, &stat); | ^~~~~~~~~ /usr/include/php/20210902/ext/standard/php_filestat.h:44:61: note: expected ‘zval *’ {aka ‘struct _zval_struct *’} but argument is of type ‘int’ 44 | PHPAPI void php_stat(zend_string *filename, int type, zval *return_value); | ~~~~~~^~~~~~~~~~~~ /home/user/Mosquitto-PHP/mosquitto.c:234:9: error: too many arguments to function ‘php_stat’ 234 | php_stat(ca_path, ca_path_len, FS_IS_DIR, &stat); | ^~~~~~~~ In file included from /home/user/Mosquitto-PHP/mosquitto.c:10: /usr/include/php/20210902/ext/standard/php_filestat.h:44:13: note: declared here 44 | PHPAPI void php_stat(zend_string *filename, int type, zval *return_value); | ^~~~~~~~ make: *** [Makefile:202: mosquitto.lo] Error 1

@Siggemada
Copy link
Author

Ok, wrong repro. I used: https://github.com/nismoryco/Mosquitto-PHP instead and that worked fine.

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

1 participant