Installing PHP into Jupyter-notebook on your MAC (OSX)

Colin Bitterfield
Dec 2 · 29 min read
Logo by Anna Maria Paliasna Weaver

One of the best tools I use for debugging and helping me write python code is the Jupyter notebook. Recently, I found out that I can add the PHP kernel for debugging.

I really like my MacBook Pro and OSX. I use Eclipse (Oxygen) with Pydev for developing Python scripts. I use the Jupyter Notebook to debug code snippets when I don’t need to run the whole program. Recently I started a project developing a project PHP 7 and found out Jupyter Notebook supports a PHP kernel. I also learned a there are a few pitfalls along the process of installation. This article is intended to help a developer add PHP to their Jupyter Notebook. It is specifically around the issues with OSX and MAC Ports.

For a baseline, my OS is 10.14.6 with the latest MAC Ports installed. I installed MAC Ports fresh for this article so that all of the commands and actions are captured fresh. We need to start the installation by installing packages that require variants first. My project involves ImageMagic and FFMPEG so I will install the packages, Python, PHP, and Jupyter in that order along with any packages that require specific variants for OSX. As a side note, use Python 3.7. I tried 3.8 but MAC Ports uses 3.7 for Jupyter notebook.

Paths.d

To add MAC Ports to the command line make an entry in your /etc/paths.d directory

echo "/opt/local/bin;/opt/local/libexec" > /etc/paths.d/01-mac-ports

PORT INSTALL

sudo -H port -N install OpenBLAS +native
sudo -H port -N install plotutils +x11
sudo -H port -N install python37 +optimizations
sudo -H port -N install py-jupyter*
sudo -H port -N install py37-*
sudo -H port -N install php73-*
sudo -H port -N install zmq
# My environment uses the following ports. They are not required for PHP Jupyter; however, I am including them in this build as an example.sudo -H port -N install ffmpeg-devel +darwinssl +nonfree +x11
sudo -H port -N install ffmpegthumbnailer
sudo -H port -N install ImageMagick +x11 +wmf +graphviz +rsvg
sudo -H port -N install qt5
sudo -H port -N install graphviz tesseract py-pytesseract tesseract-eng wget

OpenBLAS requires the +native. If you install the py37-software without it, it will create an error message:

Error: Failed to build py37-cartopy: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-cartopy/py38-cartopy/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py37-cartopy failed
---> Some of the ports you installed have notes:
OpenBLAS has the following notes:
This version is built based on a base architecture for convenience,
which may not be optimized for your system. To build a version
customized for your machine, use the +native variant

python37: Results

python37 has the following notes:
To make this the default Python or Python 3 (i.e., the version run by the 'python' or 'python3' commands), run one or both of:
sudo port select --set python python37
sudo port select --set python3 python37

Run the provided port select commands

Python Jupyter: Results

py37-ipython has the following notes:
Please note that since version 4.0 IPython was refactored and splitted across several packages under new project named Jupyter.
To make this the default IPython or IPython3 (i.e., the version run by the 'ipython' or 'ipython3' commands), run one or both of:sudo port select --set ipython py37-ipython
sudo port select --set ipython3 py37-ipython
py37-pygments has the following notes:
To make the Python 3.7 version of Pygments the one that is run when you execute the commands without a version suffix, e.g. 'pygmentize',
run:
port select --set pygments py37-pygments
py37-sphinx has the following notes:
To make the Python 3.7 version of Sphinx the one that is run when you execute the commands without a version suffix, e.g. 'sphinx-build',
run:
port select --set sphinx py37-sphinx

Run the provided port select commands

Py37- Libraries results

Error: Failed to configure py37-biggles: plotutils must be installed with +x11.
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-biggles/py37-biggles/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py37-biggles failed
---> Some of the ports you installed have notes:
dbus has the following notes:
Startup items (named 'dbus-system, dbus-session') have been generated that will aid in starting dbus with launchd. They are disabled by
default. Execute the following command to start them, and to cause them to launch at startup:
sudo port load dbus
hdf5 has the following notes:
Mac users may need to set the environment variable "HDF5_USE_FILE_LOCKING" to the five-character string "FALSE" when accessing network
mounted files. This is an application run-time setting, not a configure or build setting. Otherwise errors such as "unable to open file"
or "HDF5 error" may be encountered.
libomp has the following notes:
To use this OpenMP library:
* For clang-3.8+, or clang-3.7 with +openmp variant:
add "-fopenmp" during compilation / linking.
* For clang-3.7 without +openmp variant, use:
"-I/opt/local/include/libomp -L/opt/local/lib/libomp -fopenmp"
py37-ansible has the following notes:
To make the Python 3.7 version of Ansible the one that is run when you execute the commands without a version suffix, e.g. 'ansible', run:
port select --set ansible py37-ansible
py37-appscript has the following notes:
This port is deprecated since the project is no longer maintained upstream. It is likely to be removed from MacPorts at some point in the
future. If you find this port useful and would like to see it continue, please consider posting to the macports-users mailing list. See
https://trac.macports.org/wiki/MailingLists for more details.
py37-automat has the following notes:
py37-automat requires py37-twisted and py37-graphviz to enable the visualize feature.
However, py37-twisted depends on py37-automat to run correctly.
Please install py37-twisted and py37-graphviz manually for full functionality.
py37-autopep8 has the following notes:
To make the Python 3.7 version of autopep8 the one that is run when you execute the commands without a version suffix, e.g. 'autopep8', run:
sudo port select --set autopep8 autopep8-37
py37-codestyle has the following notes:
To make the Python 3.7 version of pycodestyle the one that is run when you execute the commands without a version suffix, e.g.
'pycodestyle', run:
port select --set pycodestyle pycodestyle-py37
py37-cython has the following notes:
To make the Python 3.7 version of Cython the one that is run when you execute the commands without a version suffix, e.g. 'cython', run:
port select --set cython cython37
py37-matplotlib has the following notes:
The default backend is the interactive Mac OS X backend. Different backends can be specified using the ~/.matplotlib/matplotlibrc file. More
details regarding backends can be found in the matplotlib FAQ:
https://matplotlib.org/tutorials/introductory/usage.html#backends
py37-pyface has the following notes:
If multiple backends are installed, the toolkit backend may be set with environment variables ETS_TOOLKIT and QT_API, e.g., ETS_TOOLKIT=qt4,
QT_API=pyqt.
py37-pytest has the following notes:
To make the Python 3.7 version of pytest the one that is run when you execute the commands without a version suffix, e.g. 'pytest', run:
sudo port select --set pytest pytest37
py37-sip has the following notes:
py37-sip is available under a PSF license with one addition:
4. Licensee may not use SIP to generate Python bindings for any C or
C++ library for which bindings are already provided by Riverbank.
GPL-2 or GPL-3 licenses are also available. For details see
/opt/local/share/doc/py37-sip/LICENSE [-GPL2 -GPL3]
py37-tox has the following notes:
To make the Python 3.7 version of tox the one that is run when you execute the commands without a version suffix, e.g. 'tox', run:
port select --set tox tox37
py37-virtualenv has the following notes:
The executable is installed as '/opt/local/bin/virtualenv-3.7'. To symlink it to '/opt/local/bin/virtualenv', run:
sudo port select --set virtualenv virtualenv37
qt4-mac has the following notes:
Users experiencing graphics glitches on newer OS versions (10.13 and up) can experiment with different graphics drawing systems that can be
set in the Interface tab of the /Applications/MacPorts/Qt4/qtconfig.app utility. Raster mode is
the preferred mode but is not compatible with all non-standard widget styles.
Keep an eye on the Fonts setting before saving!
tcl has the following notes:
The Sqlite3 Tcl package is now being provided by the sqlite3-tcl port:
sudo port install sqlite3-tcl

Actions and Fixes

sudo -H port -N install plotutils +x11
sudo -H port -N install py37-biggles
sudo port load dbus
port select --set ansible py37-ansible
sudo port select --set autopep8 autopep8-37
port select --set pycodestyle pycodestyle-py37
port select --set cython cython37
sudo port select --set pytest pytest37
port select --set tox tox37
sudo port select --set virtualenv virtualenv37
sudo port install -N sqlite3-tcl
sudo port install -N py37-incremental
sudo port install -N py37-graphviz
sudo port install -N py37-twisted
sudo port install -N py37-automat

PHP73 Install results:

Error: MacPorts was not able to download the necessary distfiles for oracle-instantclient.
Error: Please visit this URL:
Error:
Error: http://www.oracle.com/technetwork/database/features/instant-client/
Error:
Error: and download these files manually:
Error:
Error: instantclient-basic-macos.x64-11.2.0.4.0.zip
Error: instantclient-sdk-macos.x64-11.2.0.4.0.zip
Error:
Error: and place them in this directory:
Error:
Error: /opt/local/var/macports/distfiles/oracle-instantclient
Error: Failed to fetch oracle-instantclient: missing distfiles
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_oracle-instantclient/oracle-instantclient/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port php73-oracle failed
---> Some of the ports you installed have notes:
php73 has the following notes:
To customize php73, copy /opt/local/etc/php73/php.ini-development (if this is a development server) or
/opt/local/etc/php73/php.ini-production (if this is a production server) to /opt/local/etc/php73/php.ini and then make changes.
php73-apache2handler has the following notes:
If this is your first install, you need to enable php73-apache2handler in your web server.
To enable php73-apache2handler, run:
cd /opt/local/lib/apache2/modules
sudo /opt/local/bin/apxs -a -e -n php7 mod_php73.so
php73-cgi has the following notes:
If this is your first install, you need to enable php73-cgi in your web server.
php73-fpm has the following notes:
If this is your first install, you need to enable php73-fpm in your web server.
To use php73-fpm, copy /opt/local/etc/php73/php-fpm.conf.default to /opt/local/etc/php73/php-fpm.conf and make changes if desired.
A startup item has been generated that will aid in starting php73-fpm with launchd. It is disabled by default. Execute the following command
to start it, and to cause it to launch at startup:
sudo port load php73-fpm
php73-mysql has the following notes:
To use mysqlnd with a local MySQL server, edit /opt/local/etc/php73/php.ini and set mysql.default_socket, mysqli.default_socket and
pdo_mysql.default_socket to the path to your MySQL server's socket file.
For mysql5, use /opt/local/var/run/mysql5/mysqld.sock
For mysql51, use /opt/local/var/run/mysql51/mysqld.sock
For mysql55, use /opt/local/var/run/mysql55/mysqld.sock
For mysql56, use /opt/local/var/run/mysql56/mysqld.sock
For mariadb, use /opt/local/var/run/mariadb/mysqld.sock
For percona, use /opt/local/var/run/percona/mysqld.sock

Actions and Fixes

No action:  php73-oracle -- Unless you need Oracle connectivity# For my installation the only action taken
cp /opt/local/etc/php72/php.ini-production \ /opt/local/etc/php72/php.ini
# Activate the new version of PHP 7.3
sudo port select --set php php73

Optional Installs

Install any optional ports that you need from MAC Ports

Notes

The first time I tried to install PHP for Jupyter Notebook, I found three different unknown dependencies:

  1. The requirement to Install Composer
  2. The requirement to install ext-zmq for php
  3. The requirement to change the PATH to pull PHP from /opt/local/bin before /usr/bin

Remove gmagick for PHP due to conflict

sudo port -N uninstall php73-gmagick

Enable pear / pecl

bash-3.2# php /opt/local/lib/php/pear/install-pear-nozlib.pharWarning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///opt/local/lib/php/pear/install-pear-nozlib.phar/PEAR/PackageFile/v2/Validator.php on line 1933
[PEAR] Archive_Tar - installed: 1.4.3
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.4.2
[PEAR] PEAR - installed: 1.10.5
Wrote PEAR system config file at: /opt/local/etc/pear.conf
You may want to add: /opt/local/lib/php73/pear to your php.ini include_path

Black Magic Occurs now

As with any good OpenSource development project, the Wizard must be consulted and googled for an appropriate number of hours before the solution is allowed to manifest itself from the Wizard. This knowledge took about 7 hours to glean from posts. Without the ZMQ php module, Jupyter-Notebook won’t work.

Wizard Knowledge:

  1. Change your path so that the PHP version /opt/local/bin/php is first on the search path. No magic port command will fix this one.
  2. Download the GitHub version of the module manually. The PECL channel doesn’t work.
  3. Compile the module with the build command and then run phpize:

Download zmq for PHP from GitHub Version

$ cd /usr/local/src
$ sudo wget https://github.com/alexat/php-zmq/archive/master.zip
$ unzip master.zip

Magic Reciepe to follow

# Make sure you have the correct PHP version
# bash-3.2# which php
# /opt/local/bin/php
# bash-3.2#
$ sudo phpize -clean
$ sudo phpize
$ sudo pecl build
$ sudo ./configure
$ sudo make
$ sudo make test
$ make install

The end result is this message:

bash-3.2# make install
Installing shared extensions: /opt/local/lib/php73/extensions/no-debug-non-zts-20180731/

The complete set of messages and commands is included at the end for reference.

PHP.ini file for zmq needs to be created

Create the php-zmq.ini file.

# You can find the location for the ini file by 
# type php -ini | grep ini
# /opt/local/var/db/php73
# Localtion for module in case you need to have the full path
# /opt/local/lib/php73/extensions/no-debug-non-zts-20180731
$ sudo echo "extension=zmq.so" > /opt/local/var/db/php73/zmq.ini

Verify the extension is loadable:

bash-3.2# php -m  | grep zmq
zmq

DOWNLOAD PHP Composer installer and install it

# Get Compose
curl -sS https://getcomposer.org/installer | php
"Composer (version 1.9.1) successfully installed to: /Users/username/Downloads/composer.phar"# Copy Composer to /usr/local/bin
sudo cp /Users/username/Downloads/composer.phar /usr/local/bin/

DOWNLOAD PHP Kernel installer

# Create a location for the installer or download to ~/Downloads
cd ~/Downloads
wget https://litipk.github.io/Jupyter-PHP-Installer/dist/jupyter-php-installer.phar
# Run the command using our version of PHP
# A little more magic here. If you run the program as a binary.
# It will put the kernel in the wrong place
bash-3.2# /opt/local/bin/php jupyter-php-installer.phar install
The Jupyter-PHP kernel has been successfully installed.

Test your installation

I create an alias to put the proper PHP binary on the path first and change to a working directory.

alias jupyter-notebook="cd ~/Documents/Jupyter-Notebook/; export PATH=/opt/local/bin:$PATH; jupyter-notebook-3.7"

Magic

$ jupyter-notebook
[I 00:12:28.587 NotebookApp] JupyterLab extension loaded from /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/jupyterlab
[I 00:12:28.587 NotebookApp] JupyterLab application directory is /opt/local/Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab
[I 00:12:28.592 NotebookApp] Serving notebooks from local directory: /Users/username/Documents/Jupyter-Notebook
[I 00:12:28.592 NotebookApp] The Jupyter Notebook is running at:
[I 00:12:28.592 NotebookApp] http://localhost:8888/?token=2a55ff53d05b6efded136bc2817379da787dab67674b814c
[I 00:12:28.592 NotebookApp] or http://127.0.0.1:8888/?token=2a55ff53d05b6efded136bc2817379da787dab67674b814c
[I 00:12:28.593 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 00:12:28.597 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/username/Library/Jupyter/runtime/nbserver-1685-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=2a55ff53d05b6efded136bc2817379da787dab67674b814c
or http://127.0.0.1:8888/?token=2a55ff53d05b6efded136bc2817379da787dab67674b814c
Jupyter Notebook up and running with PHP

I have tested this with connections to a DOCKER MySQL and a local MySQL server using PDO and MySQLi


References:

bash-3.2# pecl buildWarning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in PEAR/PackageFile/v2/Validator.php on line 1933Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /opt/local/lib/php73/pear/PEAR/PackageFile/v2/Validator.php on line 1933
running: phpize
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
Please provide the prefix of libzmq installation [autodetect] : ^C
bash-3.2# env | grep php
PWD=/tmp/php-zmq-master
bash-3.2# clear
bash-3.2# which php
/opt/local/bin/php
bash-3.2# phpize -clean
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
bash-3.2# phpize
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
bash-3.2# pecl build
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in PEAR/PackageFile/v2/Validator.php on line 1933Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /opt/local/lib/php73/pear/PEAR/PackageFile/v2/Validator.php on line 1933
running: phpize
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
Please provide the prefix of libzmq installation [autodetect] :
building in /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3
running: /private/tmp/php-zmq-master/configure --with-php-config=/opt/local/bin/php-config --with-zmq
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking target system type... x86_64-apple-darwin18.7.0
checking for PHP prefix... /opt/local
checking for PHP includes... -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include
checking for PHP extension directory... /opt/local/lib/php73/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /opt/local/include/php73/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable 0MQ support... yes, shared
checking whether to enable CZMQ support... no
checking for pkg-config... /opt/local/bin/pkg-config
checking libzmq installation... found version 4.3.2, under /opt/local
checking for zmq_socket_monitor in -lzmq... yes
checking for zmq_proxy_steerable in -lzmq... yes
checking for zmq_z85_decode in -lzmq... yes
checking for zmq_curve_keypair in -lzmq... yes
checking for zmq_ctx_get in -lzmq... yes
checking for zmq_unbind in -lzmq... yes
checking for zmq_disconnect in -lzmq... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdint.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking mach/mach_time.h usability... yes
checking mach/mach_time.h presence... yes
checking for mach/mach_time.h... yes
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking for gettimeofday... yes
checking for mach_absolute_time... yes
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /opt/local/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /opt/local/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin18.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq.c -o zmq.lo
mkdir .libs
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq.c -fno-common -DPIC -o .libs/zmq.o
/private/tmp/php-zmq-master/zmq.c:210:50: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
plist_key = strpprintf(0, "zmq_context=[%ld]", io_threads);
~~~ ^~~~~~~~~~
%lld
/private/tmp/php-zmq-master/zmq.c:526:53: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
return strpprintf(0, "zmq_socket:[%ld]-[%s]-[%d]", type, persistent_id->val, use_shared_ctx);
~~~ ^~~~
%lld
2 warnings generated.
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_helpers.c -o zmq_helpers.lo
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_helpers.c -fno-common -DPIC -o .libs/zmq_helpers.o
/private/tmp/php-zmq-master/zmq_helpers.c:66:63: warning: format specifies type 'char *' but the argument has type 'zend_string *' (aka 'struct _zend_string *') [-Wformat]
spprintf (&buffer, 0, "%s::%s", fci->object->ce->name->val, fci_cache->function_handler->common.function_name);
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_pollset.c -o zmq_pollset.lo
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_pollset.c -fno-common -DPIC -o .libs/zmq_pollset.o
/private/tmp/php-zmq-master/zmq_pollset.c:172:33: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
return strpprintf(0, "r:%ld", Z_RES_P(entry)->handle);
~~~ ^~~~~~~~~~~~~~~~~~~~~~
%d
/opt/local/include/php73/php/Zend/zend_types.h:685:28: note: expanded from macro 'Z_RES_P'
#define Z_RES_P(zval_p) Z_RES(*zval_p)
^
/opt/local/include/php73/php/Zend/zend_types.h:684:25: note: expanded from macro 'Z_RES'
#define Z_RES(zval) (zval).value.res
^
1 warning generated.
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_device.c -o zmq_device.lo
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_device.c -fno-common -DPIC -o .libs/zmq_device.o
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_sockopt.c -o zmq_sockopt.lo
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_sockopt.c -fno-common -DPIC -o .libs/zmq_sockopt.o
/private/tmp/php-zmq-master/zmq_sockopt.c:1230:129: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", key);
~~~ ^~~
%lld
/private/tmp/php-zmq-master/zmq_sockopt.c:2979:129: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", key);
~~~ ^~~
%lld
2 warnings generated.
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_fd_stream.c -o zmq_fd_stream.lo
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_fd_stream.c -fno-common -DPIC -o .libs/zmq_fd_stream.o
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_clock.c -o zmq_clock.lo
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_clock.c -fno-common -DPIC -o .libs/zmq_clock.o
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=compile cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_shared_ctx.c -o zmq_shared_ctx.lo
cc -I. -I/private/tmp/php-zmq-master -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/php-zmq-master/zmq_shared_ctx.c -fno-common -DPIC -o .libs/zmq_shared_ctx.o
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=link cc -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/include -I/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/main -I/private/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -o zmq.la -export-dynamic -avoid-version -prefer-pic -module -rpath /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/modules zmq.lo zmq_helpers.lo zmq_pollset.lo zmq_device.lo zmq_sockopt.lo zmq_fd_stream.lo zmq_clock.lo zmq_shared_ctx.lo -Wl,-rpath,/opt/local/lib -L/opt/local/lib -lzmq
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/zmq.so -bundle .libs/zmq.o .libs/zmq_helpers.o .libs/zmq_pollset.o .libs/zmq_device.o .libs/zmq_sockopt.o .libs/zmq_fd_stream.o .libs/zmq_clock.o .libs/zmq_shared_ctx.o -L/opt/local/lib -lzmq -Wl,-rpath -Wl,/opt/local/lib
dsymutil .libs/zmq.so || :
creating zmq.la
(cd .libs && rm -f zmq.la && ln -s ../zmq.la zmq.la)
/bin/sh /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/libtool --mode=install cp ./zmq.la /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/modules
cp ./.libs/zmq.so /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/modules/zmq.so
cp ./.libs/zmq.lai /private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/modules/zmq.la
----------------------------------------------------------------------
Libraries have been installed in:
/private/tmp/pear/temp/pear-build-roottUbznD/zmq-1.1.3/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3" install
Installing shared extensions: /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt/local/lib/php73/extensions/no-debug-non-zts-20180731/
running: find "/private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3" | xargs ls -dils
10527436 0 drwxr-xr-x 3 root wheel 96 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3
10527975 0 drwxr-xr-x 3 root wheel 96 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt
10527976 0 drwxr-xr-x 3 root wheel 96 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt/local
10527977 0 drwxr-xr-x 3 root wheel 96 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt/local/lib
10527978 0 drwxr-xr-x 3 root wheel 96 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt/local/lib/php73
10527979 0 drwxr-xr-x 3 root wheel 96 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt/local/lib/php73/extensions
10527980 0 drwxr-xr-x 3 root wheel 96 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt/local/lib/php73/extensions/no-debug-non-zts-20180731
10527981 192 -rwxr-xr-x 1 root wheel 94596 Dec 1 23:57 /private/tmp/pear/temp/pear-build-roottUbznD/install-zmq-1.1.3/opt/local/lib/php73/extensions/no-debug-non-zts-20180731/zmq.so
bash-3.2# ls
.travis.yml api.php config.w32 mkinstalldirs php_zmq_private.h zmq_device.c
ChangeLog autom4te.cache configure options run-tests.php zmq_fd_stream.c
LICENSE build configure.ac package.xml run-tests.sh zmq_helpers.c
Makefile.global config.guess examples php-zmq.spec tests zmq_object_access.c
README.md config.h.in install-sh php5 travis zmq_pollset.c
acinclude.m4 config.m4 ltmain.sh php_zmq.h zmq.c zmq_shared_ctx.c
aclocal.m4 config.sub missing php_zmq_pollset.h zmq_clock.c zmq_sockopt.c
bash-3.2# make
make: *** No targets specified and no makefile found. Stop.
bash-3.2# configure
bash: configure: command not found
bash-3.2# ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking target system type... x86_64-apple-darwin18.7.0
checking for PHP prefix... /opt/local
checking for PHP includes... -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include
checking for PHP extension directory... /opt/local/lib/php73/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /opt/local/include/php73/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable 0MQ support... yes, shared
checking whether to enable CZMQ support... no
checking for pkg-config... /opt/local/bin/pkg-config
checking libzmq installation... found version 4.3.2, under /opt/local
checking for zmq_socket_monitor in -lzmq... yes
checking for zmq_proxy_steerable in -lzmq... yes
checking for zmq_z85_decode in -lzmq... yes
checking for zmq_curve_keypair in -lzmq... yes
checking for zmq_ctx_get in -lzmq... yes
checking for zmq_unbind in -lzmq... yes
checking for zmq_disconnect in -lzmq... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdint.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking mach/mach_time.h usability... yes
checking mach/mach_time.h presence... yes
checking for mach/mach_time.h... yes
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking for gettimeofday... yes
checking for mach_absolute_time... yes
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /opt/local/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /opt/local/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin18.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
bash-3.2# make
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq.c -o zmq.lo
mkdir .libs
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq.c -fno-common -DPIC -o .libs/zmq.o
/tmp/php-zmq-master/zmq.c:210:50: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
plist_key = strpprintf(0, "zmq_context=[%ld]", io_threads);
~~~ ^~~~~~~~~~
%lld
/tmp/php-zmq-master/zmq.c:526:53: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
return strpprintf(0, "zmq_socket:[%ld]-[%s]-[%d]", type, persistent_id->val, use_shared_ctx);
~~~ ^~~~
%lld
2 warnings generated.
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_helpers.c -o zmq_helpers.lo
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_helpers.c -fno-common -DPIC -o .libs/zmq_helpers.o
/tmp/php-zmq-master/zmq_helpers.c:66:63: warning: format specifies type 'char *' but the argument has type 'zend_string *'
(aka 'struct _zend_string *') [-Wformat]
spprintf (&buffer, 0, "%s::%s", fci->object->ce->name->val, fci_cache->function_handler->common.function_name);
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_pollset.c -o zmq_pollset.lo
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_pollset.c -fno-common -DPIC -o .libs/zmq_pollset.o
/tmp/php-zmq-master/zmq_pollset.c:172:33: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
return strpprintf(0, "r:%ld", Z_RES_P(entry)->handle);
~~~ ^~~~~~~~~~~~~~~~~~~~~~
%d
/opt/local/include/php73/php/Zend/zend_types.h:685:28: note: expanded from macro 'Z_RES_P'
#define Z_RES_P(zval_p) Z_RES(*zval_p)
^
/opt/local/include/php73/php/Zend/zend_types.h:684:25: note: expanded from macro 'Z_RES'
#define Z_RES(zval) (zval).value.res
^
1 warning generated.
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_device.c -o zmq_device.lo
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_device.c -fno-common -DPIC -o .libs/zmq_device.o
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_sockopt.c -o zmq_sockopt.lo
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_sockopt.c -fno-common -DPIC -o .libs/zmq_sockopt.o
/tmp/php-zmq-master/zmq_sockopt.c:1230:129: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", key);
~~~ ^~~
%lld
/tmp/php-zmq-master/zmq_sockopt.c:2979:129: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]
zend_throw_exception_ex(php_zmq_socket_exception_sc_entry_get (), PHP_ZMQ_INTERNAL_ERROR, "Unknown option key %ld", key);
~~~ ^~~
%lld
2 warnings generated.
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_fd_stream.c -o zmq_fd_stream.lo
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_fd_stream.c -fno-common -DPIC -o .libs/zmq_fd_stream.o
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_clock.c -o zmq_clock.lo
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_clock.c -fno-common -DPIC -o .libs/zmq_clock.o
/bin/sh /tmp/php-zmq-master/libtool --mode=compile cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_shared_ctx.c -o zmq_shared_ctx.lo
cc -I. -I/tmp/php-zmq-master -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/php-zmq-master/zmq_shared_ctx.c -fno-common -DPIC -o .libs/zmq_shared_ctx.o
/bin/sh /tmp/php-zmq-master/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/php-zmq-master/include -I/tmp/php-zmq-master/main -I/tmp/php-zmq-master -I/opt/local/include/php73/php -I/opt/local/include/php73/php/main -I/opt/local/include/php73/php/TSRM -I/opt/local/include/php73/php/Zend -I/opt/local/include/php73/php/ext -I/opt/local/include/php73/php/ext/date/lib -I/opt/local/include -I/opt/local/include -DHAVE_CONFIG_H -g -O2 -o zmq.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/php-zmq-master/modules zmq.lo zmq_helpers.lo zmq_pollset.lo zmq_device.lo zmq_sockopt.lo zmq_fd_stream.lo zmq_clock.lo zmq_shared_ctx.lo -Wl,-rpath,/opt/local/lib -L/opt/local/lib -lzmq
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/zmq.so -bundle .libs/zmq.o .libs/zmq_helpers.o .libs/zmq_pollset.o .libs/zmq_device.o .libs/zmq_sockopt.o .libs/zmq_fd_stream.o .libs/zmq_clock.o .libs/zmq_shared_ctx.o -L/opt/local/lib -lzmq -Wl,-rpath -Wl,/opt/local/lib
dsymutil .libs/zmq.so || :
creating zmq.la
(cd .libs && rm -f zmq.la && ln -s ../zmq.la zmq.la)
/bin/sh /tmp/php-zmq-master/libtool --mode=install cp ./zmq.la /tmp/php-zmq-master/modules
cp ./.libs/zmq.so /tmp/php-zmq-master/modules/zmq.so
cp ./.libs/zmq.lai /tmp/php-zmq-master/modules/zmq.la
----------------------------------------------------------------------
Libraries have been installed in:
/tmp/php-zmq-master/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
bash-3.2# make tst
make: *** No rule to make target `tst'. Stop.
bash-3.2# make test
Build complete.
Don't forget to run 'make test'.
=====================================================================
PHP : /opt/local/bin/php73
PHP_SAPI : cli
PHP_VERSION : 7.3.12
ZEND_VERSION: 3.3.12
PHP_OS : Darwin - Darwin Colin-C02WC05RHTDF 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
INI actual : /private/tmp/php-zmq-master/tmp-php.ini
More .INIs :
CWD : /private/tmp/php-zmq-master
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2019-12-02 07:59:12
=====================================================================
PASS Test send / recv [tests/001-send.phpt]
PASS Test send / recv binary [tests/002-test-binary.phpt]
PASS Test getting persistent id [tests/003-getpersistentid.phpt]
PASS Test getting endpoints [tests/004-getendpoints.phpt]
PASS Test forcing connect [tests/005-forceconnectarg.phpt]
PASS Test getsockopt / setsockopt [tests/006-sockopt.phpt]
PASS Test adding / removing items [tests/007-addremovepoll.phpt]
PASS Test constructing a socket [tests/008-twowaystoconstruct.phpt]
PASS Test ispersistent on context and socket [tests/009-ispersistent.phpt]
PASS Test invalid args for ZMQPoll [tests/010-pollsetinvalidargs.phpt]
PASS Test exceptions [tests/011-exceptions.phpt]
PASS Test remove invalid id from ZMQPoll [tests/012-pollsetremoveinvalid.phpt]
PASS Test clearing and reusing ZMQPoll [tests/013-pollclearandreuse.phpt]
PASS Test setSockOpt param type [tests/014-setsockoptparam.phpt]
PASS Test basic callback usage [tests/015-callback.phpt]
PASS Test invalid args for callback [tests/016-callbackinvalidargs.phpt]
PASS Test that callback is only called on new socket [tests/017-callbackonlyonnewsocket.phpt]
PASS Test callback arguments on persistent and non-persistent socket [tests/018-callbackpersistent.phpt]
SKIP Test callback edge-cases [tests/019-callbackinvalidsignature.phpt] reason: PHP 7.1 and higher fallback to passing argument by value even when forced to reference
PASS Test throwing exception from callback [tests/020-exceptionincallback.phpt]
PASS Test warning in callback [tests/021-callbackwarning.phpt]
PASS Test that high-watermark works [tests/022-highwatermark.phpt]
PASS Test that failing callback does not add socket to plist [tests/023-failedcallback.phpt]
PASS Test retrieving version [tests/024-versionconstant.phpt]
PASS Test send / recv for multipart messages [tests/025-sendrecvmulti.phpt]
PASS Test returning socket type [tests/026-sockettype.phpt]
PASS Test setting and getting values [tests/027-getset.phpt]
PASS Test send / recv with XPUB and XSUB sockets [tests/028-xpub.phpt]
PASS Test send / recv with an XREQ and XREP device [tests/029-xrepxreqdevice.phpt]
SKIP Test send / recv with a manually created XREQ and XREP device [tests/030-xrepmanualqueue.phpt] reason: Only for in libzmq 3.3.0
PASS Test last endpoint [tests/031-lastendpoint.phpt]
PASS Test context options [tests/032-contextopt.phpt]
PASS Test disconnect [tests/033-disconnect.phpt]
PASS Test unbind [tests/034-unbind.phpt]
PASS Test device capture [tests/035-capture.phpt]
PASS Test device callbacks [tests/036-device.phpt]
PASS Test device deprecated args [tests/037-device-deprecated.phpt]
SKIP Test a ZMQCert can be constructed. [tests/038-cert-construct.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test two ZMQCerts can be tested for equality. [tests/039-cert-equals.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQCert can be cloned. [tests/040-cert-clone.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQCert can get and set metadata. [tests/041-cert-meta.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQCert can be saved. [tests/042-cert-save.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQCert can be loaded. [tests/043-cert-load.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQAuth can be constructed. [tests/044-auth-construct.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQAuth can whitelist or blacklist an IP address. [tests/045-auth-allow-deny.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQCert can be applied to a ZMQSocket. [tests/046-cert-apply.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
SKIP Test a ZMQAuth can be configured. [tests/047-auth-configure.phpt] reason: This test requires php-zmq to be compiled with --with-czmq (only CZMQ 2.x supported)
PASS Test pollset items [tests/048-pollsetitems.phpt]
PASS Test events [tests/049-events.phpt]
PASS Test shared context [tests/050-sharedcontext.phpt]
PASS Test socket count variations [tests/051-socketcount.phpt]
SKIP Test pthreads integration [tests/052-pthreads.phpt] reason: Requires pthreads extension
PASS Test z85 [tests/053-z85.phpt]
PASS Test curve keypair [tests/054-curvekeypair.phpt]
PASS Test for GitHub issue 156 (https://github.com/mkoppanen/php-zmq/issues/156) [tests/bug_gh_156.phpt]
PASS Test for Github issue #165 [tests/bug_gh_165.phpt]
PASS Test for Github issue #43 [tests/bug_gh_43.phpt]
PASS Test for Github issue #49 [tests/bug_gh_49.phpt]
PASS Test for Github issue #50 [tests/bug_gh_50.phpt]
SKIP Test for Github issue #59 [tests/bug_gh_59.phpt]
SKIP Test for Github issue #59 [tests/bug_gh_59_2.phpt]
SKIP Test setting socket options [tests/libzmq2-sockopt.phpt] reason: This test is for PHP7 and libzmq version 2.x
SKIP Test setting socket options [tests/libzmq3-sockopt.phpt] reason: This test is for PHP7 and libzmq version 3.x
PASS Test setting socket options [tests/libzmq4-sockopt.phpt]
=====================================================================
TIME END 2019-12-02 07:59:17
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 0
Exts tested : 27
---------------------------------------------------------------------
Number of tests : 64 47
Tests skipped : 17 ( 26.6%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 47 ( 73.4%) (100.0%)
---------------------------------------------------------------------
Time taken : 5 seconds
=====================================================================
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it. You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]: n
bash-3.2# make install
Installing shared extensions: /opt/local/lib/php73/extensions/no-debug-non-zts-20180731/
Colin Bitterfield

Written by

I am a dynamic Senior Infrastructure Security Engineer with a diverse range of skills in multiple industries and a wide range of it skills.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade