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

Makefile:194: recipe for target 'zmq.lo' failed #200

Closed
in3rsha opened this issue Apr 15, 2019 · 5 comments
Closed

Makefile:194: recipe for target 'zmq.lo' failed #200

in3rsha opened this issue Apr 15, 2019 · 5 comments

Comments

@in3rsha
Copy link

in3rsha commented Apr 15, 2019

I'm trying to install php-zmq. I am using PHP 7.3.3 on Ubuntu 18.04.

These are the steps I have taken so far:

wget https://github.com/zeromq/libzmq/releases/download/v4.3.1/zeromq-4.3.1.tar.gz
tar -xzvf zeromq-4.3.1.tar.gz
cd zeromq-4.3.1
./configure
make
sudo make install

sudo apt install php7.3-dev php-pear
sudo pecl install zmq-beta

When I run the sudo pecl install zmq-beta command, I get the following error:

configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootwTpUig/zmq-1.1.3/libtool --mode=compile cc  -I. -I/tmp/pear/temp/zmq -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootwTpUig/zmq-1.1.3/include -I/tmp/pear/temp/pear-build-rootwTpUig/zmq-1.1.3/main -I/tmp/pear/temp/zmq -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/zmq/zmq.c -o zmq.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/zmq -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootwTpUig/zmq-1.1.3/include -I/tmp/pear/temp/pear-build-rootwTpUig/zmq-1.1.3/main -I/tmp/pear/temp/zmq -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/zmq/zmq.c  -fPIC -DPIC -o .libs/zmq.o
/tmp/pear/temp/zmq/zmq.c: In function ‘php_zmq_context_get’:
/tmp/pear/temp/zmq/zmq.c:238:20: error: lvalue required as left operand of assignment
   GC_REFCOUNT(&le) = 1;
                    ^
/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
  GC_REFCOUNT(&le) = 1;
                   ^
Makefile:194: recipe for target 'zmq.lo' failed
make: *** [zmq.lo] Error 1
ERROR: `make' failed

Is this because php-zmq is not compatible with PHP 7.3, or am I doing something else wrong?

@qury
Copy link

qury commented Apr 20, 2019

if you pull the master branch, that will build under php 7.3

@ksealey
Copy link

ksealey commented Apr 7, 2020

As mentioned, building from repo did the trick. The following works for me on ubuntu 18.04 running php 7.4.

apt-get install libzmq3-dev \
&& git clone git://github.com/mkoppanen/php-zmq.git \
&& cd php-zmq \
&& phpize \
&& ./configure \
&& make \
&& make install

@therealsujitk
Copy link

therealsujitk commented Sep 10, 2020

What should I do?

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/lib/php/20190902/
cp: cannot create regular file '/usr/lib/php/20190902/#INST@35038#': Permission denied
make: *** [Makefile:89: install-modules] Error 1

This is that end part of the output when I run sudo make && make install

@Lavaei
Copy link

Lavaei commented Oct 26, 2020

@therealsujitk I think you should use sudo make && sudo make install instead of sudo make && make install

@harpreetsb
Copy link

Using php8 on plesk
after running
#200 (comment)
and then
/opt/plesk/php/8.0/bin/pecl install zmq-beta
gives me same error

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

6 participants