php-zmq icon indicating copy to clipboard operation
php-zmq copied to clipboard

Fedora 30 build error

Open djnotes opened this issue 6 years ago • 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

djnotes avatar Oct 05 '19 14:10 djnotes

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

god1dog avatar Oct 21 '19 10:10 god1dog

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

jamzy118 avatar Nov 23 '19 18:11 jamzy118

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

andres101 avatar Feb 04 '20 06:02 andres101

Fixed the message, thanks @andres101

god1dog avatar Feb 04 '20 07:02 god1dog

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

WeTurkstra avatar Feb 04 '20 07:02 WeTurkstra

@god1dog Thank you!

koxelez avatar May 30 '20 23:05 koxelez

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.

dungahk avatar Jun 02 '20 21:06 dungahk

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

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

cmb69 avatar Aug 04 '21 15:08 cmb69

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

Rzhevsky87 avatar Dec 16 '21 21:12 Rzhevsky87