/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
...Done.
Running configuration tests...
The ICU library support cannot be enabled.
Turn on verbose messaging (-v) to /home/pi/phantomjs/src/qt/qtbase/configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to /home/pi/phantomjs/src/qt/qtbase/configure to continue.
ERROR: Failed to build PhantomJS! Configuration of Qt Base failed.

python ./build.py --jobs 1
/usr/include/dirent.h:183:12: note: declared here
extern int readdir_r (DIR *__restrict __dirp,
^~~~~~~~~
...Done.
Running configuration tests...
The ICU library support cannot be enabled.
Turn on verbose messaging (-v) to /home/pi/phantomjs/src/qt/qtbase/configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to /home/pi/phantomjs/src/qt/qtbase/configure to continue.
ERROR: Failed to build PhantomJS! Configuration of Qt Base failed.

python ./build.py --jobs 1
Creating qmake...
...Done.
Running configuration tests...
OpenSSL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to /home/pi/phantomjs/src/qt/qtbase/configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to /home/pi/phantomjs/src/qt/qtbase/configure to continue.
ERROR: Failed to build PhantomJS! Configuration of Qt Base failed.

OPENSSL_API_COMPAT
Various functions get deprecated as other interfaces get added, but are still available in a default build.
The include files support setting the OPENSSL_API_COMPAT define that will hide functions that are deprecated in the selected version.
To select the 1.1.0 version use -DOPENSSL_API_COMPAT=0x10100000L.

Downloads
openssl-compat.tar.gz
- openssl-compat.tar.gz includes sources files openssl-compat.h and openssl-compat.c.
The files provide the OpenSSL 1.1.0 compatibility layer for OpenSSL 1.0.2 and below users.
OpenSSL 1.0.2 users should add openssl-compat.h and openssl-compat.c to their project, and then access data members through the functions.