Skip to content

Instantly share code, notes, and snippets.

@mattparker
Last active December 3, 2023 05:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattparker/1f1e2ca54a60409f108e to your computer and use it in GitHub Desktop.
Save mattparker/1f1e2ca54a60409f108e to your computer and use it in GitHub Desktop.
trying to compile php with gcov
vagrant@php7dev:~/php-src$ ./configure --enable-gcov --prefix=/usr/local/php70-gcov

gives, eventually:

configure: error: To enable code coverage reporting you must have LTP installed

apt-get install ltp doesn't work. So then

vagrant@php7dev:~$ mkdir ~/ltp
vagrant@php7dev:~$ cd ~/ltp
vagrant@php7dev:~/ltp$ wget https://github.com/linux-test-project/ltp/archive/20150119.tar.gz
vagrant@php7dev:~/ltp$ tar -zxvf ./20150119.tar.gz 
vagrant@php7dev:~/ltp$ cd ltp-20150119/
vagrant@php7dev:~/ltp/ltp-20150119$ ./configure
vagrant@php7dev:~/ltp/ltp-20150119$ make all
vagrant@php7dev:~/ltp/ltp-20150119$ make install

Now that appears to do something (there's lots in /opt/ltp) but ./configure --enable-gcov --prefix=/usr/local/php70-gcov still says 'you must have LTP installed'.

?

@mattparker
Copy link
Author

Updated from config.log:

configure:21554: checking whether to include gcov symbols
configure:21568: result: yes
configure:21594: checking for lcov
configure:21624: result: no
configure:21631: checking for genhtml
configure:21661: result: no
configure:21702: error: To enable code coverage reporting you must have LTP installed

and then

LTP=''
LTP_GENHTML=''

in the list of variable.

@mattparker
Copy link
Author

notes to self now

apt-get install lcov

works, and satisfies the php-src$ ./configure --enable-gcov --prefix=/usr/local/php70-gcov command.

Now trying

php-src$ make all && make install

let's see what happens...

@pbrilius
Copy link

pbrilius commented Feb 8, 2021

Goot insight.

@eric-gitta-moore
Copy link

notes to self now现在给自己的笔记

apt-get install lcov

works, and satisfies the php-src$ ./configure --enable-gcov --prefix=/usr/local/php70-gcov command.有效,并满足 php-src$ ./configure --enable-gcov --prefix=/usr/local/php70-gcov 命令。

Now trying 现在正在尝试

php-src$ make all && make install

let's see what happens...让我们看看发生了什么...

works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment