Skip to content

building with php7.4 error /zmq.c:238:20: error: lvalue required as left operand of assignment #1

@danielecr

Description

@danielecr

the error was reported in zeromq/php-zmq#200

using

        && git clone git://github.com/zeromq/php-zmq.git \
	&& cd php-zmq \
	&& phpize \
	&& ./configure \
	&& make \
	&& make install \

to replace `pecl install zmq-beta', as suggested, does not fix the problem.

compilation log:

/tmp/pear/temp/zmq/zmq.c:238:20: error: lvalue required as left operand of assignment
  238 |   GC_REFCOUNT(&le) = 1;
      |                    ^
/tmp/pear/temp/zmq/zmq.c: In function 'php_zmq_socket_plist_key':
/tmp/pear/temp/zmq/zmq.c:526:38: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'zend_long' {aka 'int'} [-Wformat=]
  526 |  return strpprintf(0, "zmq_socket:[%ld]-[%s]-[%d]", type, persistent_id->val, use_shared_ctx);
      |                                    ~~^              ~~~~
      |                                      |              |
      |                                      long int       zend_long {aka int}
      |                                    %d
/tmp/pear/temp/zmq/zmq.c: In function 'php_zmq_socket_store':
/tmp/pear/temp/zmq/zmq.c:538:19: error: lvalue required as left operand of assignment
  538 |  GC_REFCOUNT(&le) = 1;
      |                   ^
make: *** [Makefile:192: zmq.lo] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions