zeromq/php-zmq

Fedora 30 build error

djnotes opened this issue · 9 comments

Trying to install zmq with sudo pecl install zmq-beta on Fedora, I face the following error:

/var/tmp/zmq/zmq.c: In function ‘php_zmq_context_get’:
/var/tmp/zmq/zmq.c:238:20: error: lvalue required as left operand of assignment
  238 |   GC_REFCOUNT(&le) = 1;
      |                    ^
/var/tmp/zmq/zmq.c: In function ‘php_zmq_socket_store’:
/var/tmp/zmq/zmq.c:538:19: error: lvalue required as left operand of assignment
  538 |  GC_REFCOUNT(&le) = 1;
      |                   ^
make: *** [Makefile:194: zmq.lo] Error 1
ERROR: `make' failed

Similar error on docker image:

FROM php:7.3.10-fpm
RUN apt-get install --yes libzmq3-dev
RUN pecl install zmq-beta
RUN docker-php-ext-enable zmq

had to install zmq from master branch #200

FROM php:7.3.10-fpm
RUN apt-get install --yes git libzmq3-dev
RUN git clone git://github.com/mkoppanen/php-zmq.git \
 && cd php-zmq \
 && phpize && ./configure \
 && make \
 && make install \
 && cd .. \
 && rm -fr php-zmq 
RUN docker-php-ext-enable zmq

Same error appears on Arch Linux when trying to install php-zmq from AUR https://aur.archlinux.org/packages/php-zmq/

If anyone tries to use the config from god1dog above, remove the \ at the end of 2nd last line.

Fixed the message, thanks @andres101

Thank you guys so much! @god1dog @andres101 Was searching al morning to install zmq on my php docker image and this worked great!

@god1dog Thank you!

I believe this is related to PHP 7.3, I was upgrading my stack from 7.2 to 7.3 and it failed with that error message.

cmb69 commented

I believe this is related to PHP 7.3, […]

Right. The fix has already been committed (e0db82c), but a new release is pending, what is tracked by PR #203.

Thank you so much! @god1dog @andres101 ! This help for me. Build basic on php:7.4.26-apache.