Skip to content

Is php8.2 supported? #132

Open
Open

Description

@maclechan

/bin/sh /Users/maclechan/website/Mosquitto-PHP/libtool --tag=CC --mode=compile cc -I. -I/Users/maclechan/website/Mosquitto-PHP -I/Users/maclechan/website/Mosquitto-PHP/include -I/Users/maclechan/website/Mosquitto-PHP/main -I/Users/maclechan/website/Mosquitto-PHP -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/main -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/TSRM -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/Zend -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/ext -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /Users/maclechan/website/Mosquitto-PHP/mosquitto.c -o mosquitto.lo -MMD -MF mosquitto.dep -MT mosquitto.lo
mkdir .libs
cc -I. -I/Users/maclechan/website/Mosquitto-PHP -I/Users/maclechan/website/Mosquitto-PHP/include -I/Users/maclechan/website/Mosquitto-PHP/main -I/Users/maclechan/website/Mosquitto-PHP -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/main -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/TSRM -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/Zend -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/ext -I/opt/homebrew/Cellar/php@8.2/8.2.25/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /Users/maclechan/website/Mosquitto-PHP/mosquitto.c -MMD -MF mosquitto.dep -MT mosquitto.lo -fno-common -DPIC -o .libs/mosquitto.o
/Users/maclechan/website/Mosquitto-PHP/mosquitto.c:892:6: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
ret = strerror_r(err, buf, 256);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [mosquitto.lo] Error 1

macos

Activity

  1. ryco-dev commented on Nov 1, 2024

    @ryco-dev

    Are you using the php8 branch to build? In my Linux environment, I've successfully built it with PHP versions 8.1, 8.2, 8.3, and 8.4.

  2. mgdm commented on Nov 1, 2024

    @mgdm
    Owner

    I intend to move the copy the master branch to another one for older PHPs and merge that php8 branch, but I haven't quite got around to it yet. Then I'll remove anything that's different for PHP 5 and 7. Maybe I'll get into doing that this weekend.

  3. maclechan commented on Nov 4, 2024

    @maclechan
    Author

    Are you using the php8 branch to build? In my Linux environment, I've successfully built it with PHP versions 8.1, 8.2, 8.3, and 8.4.

    Yes. In my Macos(14.6) environment,I can't compile Mosquitto-php,and php verison is PHP 8.2.25.

  4. loxK commented on Oct 11, 2025

    @loxK

    Build fails on Ubuntu Jammy (php 8.1) :

    running: make
    /bin/bash /tmp/pear/temp/pear-build-rootPdHHl6/Mosquitto-0.4.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/Mosquitto -I/tmp/pear/temp/pear-build-rootPdHHl6/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-rootPdHHl6/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -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 /tmp/pear/temp/Mosquitto/mosquitto.c -o mosquitto.lo  -MMD -MF mosquitto.dep -MT mosquitto.lo
    libtool: compile:  cc -I. -I/tmp/pear/temp/Mosquitto -I/tmp/pear/temp/pear-build-rootPdHHl6/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-rootPdHHl6/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -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 /tmp/pear/temp/Mosquitto/mosquitto.c -MMD -MF mosquitto.dep -MT mosquitto.lo  -fPIC -DPIC -o .libs/mosquitto.o
    In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
    /tmp/pear/temp/Mosquitto/php_mosquitto.h:118:95: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
      118 | typedef int (*php_mosquitto_write_t)(mosquitto_message_object *mosquitto_object, zval *newval TSRMLS_DC);
          |                                                                                               ^~~~~~~~~
    /tmp/pear/temp/Mosquitto/php_mosquitto.h:124:9: error: unknown type name ‘php_mosquitto_write_t’
      124 |         php_mosquitto_write_t write_func;
          |         ^~~~~~~~~~~~~~~~~~~~~
    In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
    /tmp/pear/temp/Mosquitto/php_mosquitto.h:236:53: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
      236 | void php_mosquitto_handle_errno(int retval, int err TSRMLS_DC);
          |                                                     ^~~~~~~~~
    /tmp/pear/temp/Mosquitto/mosquitto.c:36:79: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
       36 | static inline mosquitto_client_object *mosquitto_client_object_get(zval *zobj TSRMLS_DC) {
          |                                                                               ^~~~~~~~~
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions