Trouble installing PECL module
Ryan Schmidt
ryandesign at macports.org
Wed Aug 28 20:31:02 PDT 2013
On Aug 28, 2013, at 22:24, Michael Newton wrote:
> I've installed PHP 5.4.19 using MacPorts, as well as the php54-sockets package, and installed PEAR manually (if there's a way to do this with MacPorts, please let me know!)
sudo port install php54-pear
I have not used it myself but I assume it works.
> I was able to download and compile the events module <http://pecl.php.net/package/event/1.7.5> without any errors, but when I try using it in a certain way, I get an error. Digging through the code (I know just enough to know that I'm in over my head) I found the problem is here in common.h <https://bitbucket.org/osmanov/pecl-event/src/74adb2980f6da7c70a00b801aa8e4865ac2f3acc/src/common.h#cl-37>:
>
> #if PHP_VERSION_ID >= 50301 && (HAVE_SOCKETS || defined(COMPILE_DL_SOCKETS))
> # include <ext/sockets/php_sockets.h>
> # define PHP_EVENT_SOCKETS_SUPPORT
> #endif
>
> HAVE_SOCKETS and COMPILE_DL_SOCKETS are both undefined. Is this a part of the standard PHP install that's missing?
>
> Forcing either of those flags to be defined causes other problems:
> /private/tmp/pear/install/event/src/util.c:30:2: error: unknown type name 'php_socket'; did you mean 'php_socket_t'?
> php_socket *php_sock;
> ^~~~~~~~~~
> php_socket_t
> /opt/local/include/php54/php/main/php_network.h:93:13: note: 'php_socket_t' declared here
> typedef int php_socket_t;
> ^
>
> Thanks for any pointers anyone can provide!
First I should create a port for this module so you don't have to install it outside of MacPorts.
Then, if it has the same problems, we can investigate why.
Could you tell me what PHP code you ran and what error you got?
More information about the macports-users
mailing list