AdaCore/gnatcoverage

Fail on Ubuntu 20.04

Closed this issue · 4 comments

I want to install gnatcoverage on Ubuntu 20.04 but I still failed on it. Could you give me a manual about it? I use GNAT-community in Ubuntu 20.04

Hello,

Could you describe what you have tried, and provide logs that show the failure?

Yes, I'll update logs later. I have another question about if gnatcoverage can generate MCDC report when I use googletest for unit test?Thanks

Hi I rollback to Ubuntu 18.04 and get the following logs:

bjuci@bjuci-ThinkPad-X270-W10DG:~/github/gnatcoverage/tools/gnatcov$ echo $prefix
/opt/GNAT/2020/
bjuci@bjuci-ThinkPad-X270-W10DG:~/github/gnatcoverage/tools/gnatcov$ sudo find / -name binutils
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/share/doc/binutils
/usr/share/lintian/overrides/binutils
/usr/share/bug/binutils
/opt/GNAT/2020/lib/binutils
/opt/GNAT/2020/lib/binutils/x86_64-pc-linux-gnu/binutils
/opt/GNAT/2020/libexec/spark/lib/binutils
/opt/GNAT/2020/libexec/spark/lib/binutils/x86_64-pc-linux-gnu/binutils
/home/bjuci/github/binutils-gdb/binutils
/snap/gnome-3-34-1804/36/usr/share/bug/binutils
/snap/gnome-3-34-1804/36/usr/share/lintian/overrides/binutils
bjuci@bjuci-ThinkPad-X270-W10DG:~/github/gnatcoverage/tools/gnatcov$  make bin adapters VALGRIND_PREFIX=$prefix \
>                                   BINUTILS_SRC_DIR=/opt/GNAT/2020/lib/binutils
gprbuild -Pgnatcov -p -j0 \
-XARCH=64 -XBUILD_MODE=dev \
-XBINUTILS_SRC_DIR="/opt/GNAT/2020/lib/binutils" \
-XBINUTILS_BUILD_DIR="/opt/GNAT/2020/lib/binutils" \
gnatcov 
Compile
   [Ada]          gnatcov.adb
   [C]            zlib_helpers.c
/home/bjuci/github/gnatcoverage/tools/gnatcov/zlib_helpers.c:23:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
gnatcov.adb:30:06: file "namet.ads" not found
gnatcov.adb:30:06: "Sc_Obligations (spec)" depends on "Namet (spec)"
gnatcov.adb:30:06: file "types.ads" not found
gnatcov.adb:30:06: "Gnatcov (body)" depends on "Ali_Files (spec)"
gnatcov.adb:30:06: "Ali_Files (spec)" depends on "Sc_Obligations (spec)"
gnatcov.adb:30:06: "Sc_Obligations (spec)" depends on "Types (spec)"
gnatcov.adb:61:06: file "snames.ads" not found

   compilation of gnatcov.adb failed
   compilation of zlib_helpers.c failed

gprbuild: *** compilation phase failed
Makefile:189: recipe for target 'obj64/dev/gnatcov' failed
make: *** [obj64/dev/gnatcov] Error 4

Hello,

Hi I rollback to Ubuntu 18.04 and get the following logs:

Thank you for the logs. Your report made us realize that our build instructions were not up to date: sorry for that! We updated them, so this should be ok now: see https://github.com/AdaCore/gnatcoverage/blob/master/tools/gnatcov/README.md. Please let us know if this still does not work.