forked from goodspb/pdlib
-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
matiasdelellis edited this page Apr 13, 2020
·
2 revisions
Ideally, you will want to use precompiled packages and we prepared PDLib PHP extension for some systems. See the Packages documentation. If you are not lucky you should compile it as described below.
- Dlib 19.13+
- PHP 7.0+
- C++11
- libx11-dev (on Ubuntu:
sudo apt-get install libx11-dev
)
- BLAS library
If no BLAS library found - dlib's built in BLAS will be used. However, if you install an optimized BLAS such as OpenBLAS or the Intel MKL your code will run faster. On Ubuntu you can install OpenBLAS by executing:sudo apt-get install libopenblas-dev liblapack-dev
Install Dlib as shared library
git clone https://github.com/davisking/dlib.git
cd dlib/dlib
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
sudo make install
git clone https://github.com/goodspb/pdlib.git
cd pdlib
phpize
./configure --enable-debug
make
sudo make install
vim youpath/php.ini
Append the content below into php.ini
[pdlib]
extension="pdlib.so"
For tests, you will need to have bz2 extension installed. On Ubuntu, it boils to:
sudo apt-get install php-bz2
After you successfully compiled everything, just run:
make test