From: | walker <failaway(at)qq(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: make coverage-html would fail within build directory separate from source tree |
Date: | 2021-03-05 01:55:53 |
Message-ID: | tencent_EAC30E73099C7FA7678B14CA380268D50507@qq.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks for your reminder, Tom.
Before I understand VPATH well, I always thought "outside the source tree" means the build tree is not under source tree.
Here because of VPATH build, which means build tree should be a subdirectory of source tree. according to this rule, I retry this scenario with old version of lcov(1.10).
tar -zxf source_dir.tar.gz
cd source_dir
mkdir build_dir && cd build_dir
../configure --enable-coverage
make
make check
make coverage-html
And "make coverage-html" works fine, no any error, or warning, output is like this:
/bin/lcov --gcov-tool /bin/gcov -q --no-external -c -i -d . -d source_dir/build_dir/../ -o lcov_base.info
/bin/lcov --gcov-tool /bin/gcov -q --no-external -c -d . -d source_dir/build_dir/../ -o lcov_test.info
rm -rf coverage
/bin/genhtml -q --legend -o coverage --title='PostgreSQL 13.2' --num-spaces=4 lcov_base.info lcov_test.info
touch coverage-html-stamp
thanks
walker
------------------ Original ------------------
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>;
Date: Thu, Mar 4, 2021 11:21 PM
To: "Alvaro Herrera"<alvherre(at)alvh(dot)no-ip(dot)org>;
Cc: "walker"<failaway(at)qq(dot)com>;"pgsql-hackers"<pgsql-hackers(at)lists(dot)postgresql(dot)org>;
Subject: Re: make coverage-html would fail within build directory separate from source tree
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Hmm, my build dir is not inside the source dir -- is yours?
I recall that the gcc build instructions strongly warn against that
sort of setup. Maybe we should too?
Actually, our build instructions already say this specifically:
You can also run configure in a directory outside the source tree, and
then build there, if you want to keep the build directory separate
from the original source files. This procedure is called a VPATH
build ...
Maybe "outside the source tree" needs to be emphasized a bit more.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | kuroda.hayato@fujitsu.com | 2021-03-05 01:56:38 | RE: Refactor ECPGconnect and allow IPv6 connection |
Previous Message | miyake_kouta | 2021-03-05 01:51:04 | [PATCH] pgbench: improve \sleep meta command |