Hi All! I need ssl support in swoole, and therefore i downloaded last version (2.1.1) and configured it with params ./configure --enable-sockets --enable-openssl --with-php-config=/usr/bin/php-config7.2
error occured when i runned ./make.sh
I expected successfully built swoole application with ssl option
After ./make.sh I got two errors:
In file included from /home/pavel/work/swoole-src-2.1.1/swoole_coroutine.c:17:0:
/home/pavel/work/swoole-src-2.1.1/php_swoole.h:136:2: error: #error "Enable sockets support, require sockets extension."
#error "Enable sockets support, require sockets extension."
^
/home/pavel/work/swoole-src-2.1.1/php_swoole.h:142:2: error: #error "Enable http2 support, require nghttp2 library."
#error "Enable http2 support, require nghttp2 library."
I tried to install php7.2-sockets manually, but installer notified, that instead php7.2-sockets it will use php7.2-common and there is nothing to install.
With second error I have no idea too: I installed nghttp2 with command apt install nghttp2 but still got an error.
What I am doing wrong? And what I need to do to solve this problems?
php --ri swoole)?v2.1.1
php 7.2 on Ubuntu 16.04;
kernel: Linux nataly-nb.lo 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
OpenSSL 1.1.0g 2 Nov 2017
Please try --with-openssl-dir:
./configure --enable-openssl -with-openssl-dir=/usr/lib/ -with-php-config=/usr/bin/php-config7.2
Thanks to emdfreeman. But this solution doesn't helps...
UPD
I tried to build swoole with the same config on Centos system and it works!!!
So... My first fault was the i runned ./make.sh instead of make.
The second I don't know why, but on ubuntu i have to hack file php_swoole.h to build swoole with ssl support.
Like written in https://github.com/swoole/swoole-src/issues/1403 and https://github.com/youzan/zan/issues/7 I added #define HAVE_SOCKETS 1 right after #ifdef SW_SOCKETS string and then swoole was compilled successful.
I think, this is not good, but the only fast solution for this problem.
for the nghttp2 do:
apt install libnghttp2-dev
im definitely not sure about the sockets thing case im getting the error for that too. Im not sure why this hasnt been attempted to be patched
Most helpful comment
for the nghttp2 do:
apt install libnghttp2-devim definitely not sure about the sockets thing case im getting the error for that too. Im not sure why this hasnt been attempted to be patched