Bug#1018041: blhc: false positive NONVERBOSE BUILD while building with cmake

2022-08-24 Thread Eriberto Mota
Em qua., 24 de ago. de 2022 às 15:27, Samuel Thibault
 escreveu:
>
> Eriberto, le mer. 24 août 2022 15:25:02 -0300, a ecrit:
> > I have several packages using cmake and none of these have issues
> > with blhc. The "blhc ignore" was added to blhc to solve small bad
> > behaviours.
>
> Ok, let's live with that then :)

Thanks for your interaction. For more details about false positives,
please, check blhc(1).

Cheers,

Eriberto



Bug#1018041: blhc: false positive NONVERBOSE BUILD while building with cmake

2022-08-24 Thread Samuel Thibault
Eriberto, le mer. 24 août 2022 15:25:02 -0300, a ecrit:
> I have several packages using cmake and none of these have issues
> with blhc. The "blhc ignore" was added to blhc to solve small bad
> behaviours.

Ok, let's live with that then :)

Samuel



Bug#1018041: blhc: false positive NONVERBOSE BUILD while building with cmake

2022-08-24 Thread Eriberto
Em qua., 24 de ago. de 2022 às 15:19, Samuel Thibault
 escreveu:
>
> Hello,
>
> Eriberto Mota, le mer. 24 août 2022 14:20:26 -0300, a ecrit:
> > Em qua., 24 de ago. de 2022 às 12:33, Samuel Thibault
> >  escreveu:
> > >
> > > We can see
> > >
> > > 469:NONVERBOSE BUILD: [ 35%] Building C object 
> > > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
> > > 479:NONVERBOSE BUILD: [ 37%] Building C object 
> > > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgatherv.c.o
> > > 487:NONVERBOSE BUILD: [ 39%] Building C object 
> > > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allreduce.c.o
> > > etc.
> > >
> > > But there are the corresponding verbose lines just after them:
> > >
> > > https://salsa.debian.org/debian/eztrace/-/jobs/3143966/raw
> > >
> > > [ 35%] Building C object 
> > > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
> > > cd 
> > > /builds/debian/eztrace/debian/output/source_dir/build-mpich/src/modules/mpi
> > >  && /usr/bin/mpicc.mpich -Deztrace_mpi_EXPORTS 
> > > -I/builds/debian/eztrace/debian/output/source_dir/src/modules/mpi 
> > > -I/builds/debian/eztrace/debian/output/source_dir/src/core/include/eztrace-core
> > >  -I/builds/debian/eztrace/debian/output/source_dir/src/core/include 
> > > -I/builds/debian/eztrace/debian/output/source_dir/build-mpich/src/core/include
> > >  
> > > -I/builds/debian/eztrace/debian/output/source_dir/src/eztrace-lib/include 
> > > -g -O2 
> > > -ffile-prefix-map=/builds/debian/eztrace/debian/output/source_dir=. 
> > > -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> > > -D_FORTIFY_SOURCE=2 -I/usr/include -D_GNU_SOURCE -fPIC -Wall -Wextra 
> > > -Wpedantic -DUSE_MPI3 -DLD_PRELOAD_NAME=\"LD_PRELOAD\" 
> > > -DMPI_MODULE_NAME=mpich -Wno-error=incompatible-pointer-types 
> > > -Wno-error=pointer-arith -Wno-error=int-conversion 
> > > -Wno-gnu-zero-variadic-macro-arguments -D_GNU_SOURCE -MD -MT 
> > > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o 
> > > -MF CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o.d -o 
> > > CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o -c 
> > > /builds/debian/eztrace/debian/output/source_dir/src/modules/mpi/mpi_funcs/mpi_allgather.c
> >
> >
> > This issue was caused by a specific behavior of the cmake on this
> > source code. Please, check the attached patch to fix the problem,
> > forcing blhc to ignore the inadequate lines.
>
> That does work indeed, thanks!  But can't this specific behavior of
> cmake be caught by blhc?

There are infinite possibilities around possible false positives (or
not). A perfect blhc would need AI. So, for blhc, this is not a bug. I
have several packages using cmake and none of these have issues with
blhc. The "blhc ignore" was added to blhc to solve small bad
behaviours.

Cheers,

Eriberto



Bug#1018041: blhc: false positive NONVERBOSE BUILD while building with cmake

2022-08-24 Thread Samuel Thibault
Hello,

Eriberto Mota, le mer. 24 août 2022 14:20:26 -0300, a ecrit:
> Em qua., 24 de ago. de 2022 às 12:33, Samuel Thibault
>  escreveu:
> >
> > We can see
> >
> > 469:NONVERBOSE BUILD: [ 35%] Building C object 
> > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
> > 479:NONVERBOSE BUILD: [ 37%] Building C object 
> > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgatherv.c.o
> > 487:NONVERBOSE BUILD: [ 39%] Building C object 
> > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allreduce.c.o
> > etc.
> >
> > But there are the corresponding verbose lines just after them:
> >
> > https://salsa.debian.org/debian/eztrace/-/jobs/3143966/raw
> >
> > [ 35%] Building C object 
> > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
> > cd 
> > /builds/debian/eztrace/debian/output/source_dir/build-mpich/src/modules/mpi 
> > && /usr/bin/mpicc.mpich -Deztrace_mpi_EXPORTS 
> > -I/builds/debian/eztrace/debian/output/source_dir/src/modules/mpi 
> > -I/builds/debian/eztrace/debian/output/source_dir/src/core/include/eztrace-core
> >  -I/builds/debian/eztrace/debian/output/source_dir/src/core/include 
> > -I/builds/debian/eztrace/debian/output/source_dir/build-mpich/src/core/include
> >  -I/builds/debian/eztrace/debian/output/source_dir/src/eztrace-lib/include 
> > -g -O2 -ffile-prefix-map=/builds/debian/eztrace/debian/output/source_dir=. 
> > -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> > -D_FORTIFY_SOURCE=2 -I/usr/include -D_GNU_SOURCE -fPIC -Wall -Wextra 
> > -Wpedantic -DUSE_MPI3 -DLD_PRELOAD_NAME=\"LD_PRELOAD\" 
> > -DMPI_MODULE_NAME=mpich -Wno-error=incompatible-pointer-types 
> > -Wno-error=pointer-arith -Wno-error=int-conversion 
> > -Wno-gnu-zero-variadic-macro-arguments -D_GNU_SOURCE -MD -MT 
> > src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o -MF 
> > CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o.d -o 
> > CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o -c 
> > /builds/debian/eztrace/debian/output/source_dir/src/modules/mpi/mpi_funcs/mpi_allgather.c
> 
> 
> This issue was caused by a specific behavior of the cmake on this
> source code. Please, check the attached patch to fix the problem,
> forcing blhc to ignore the inadequate lines.

That does work indeed, thanks!  But can't this specific behavior of
cmake be caught by blhc?

Samuel



Bug#1018041: blhc: false positive NONVERBOSE BUILD while building with cmake

2022-08-24 Thread Eriberto Mota
Control: tags 1018041 patch

Hi Samuel,

Em qua., 24 de ago. de 2022 às 12:33, Samuel Thibault
 escreveu:
>
> We can see
>
> 469:NONVERBOSE BUILD: [ 35%] Building C object 
> src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
> 479:NONVERBOSE BUILD: [ 37%] Building C object 
> src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgatherv.c.o
> 487:NONVERBOSE BUILD: [ 39%] Building C object 
> src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allreduce.c.o
> etc.
>
> But there are the corresponding verbose lines just after them:
>
> https://salsa.debian.org/debian/eztrace/-/jobs/3143966/raw
>
> [ 35%] Building C object 
> src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
> cd 
> /builds/debian/eztrace/debian/output/source_dir/build-mpich/src/modules/mpi 
> && /usr/bin/mpicc.mpich -Deztrace_mpi_EXPORTS 
> -I/builds/debian/eztrace/debian/output/source_dir/src/modules/mpi 
> -I/builds/debian/eztrace/debian/output/source_dir/src/core/include/eztrace-core
>  -I/builds/debian/eztrace/debian/output/source_dir/src/core/include 
> -I/builds/debian/eztrace/debian/output/source_dir/build-mpich/src/core/include
>  -I/builds/debian/eztrace/debian/output/source_dir/src/eztrace-lib/include -g 
> -O2 -ffile-prefix-map=/builds/debian/eztrace/debian/output/source_dir=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> -D_FORTIFY_SOURCE=2 -I/usr/include -D_GNU_SOURCE -fPIC -Wall -Wextra 
> -Wpedantic -DUSE_MPI3 -DLD_PRELOAD_NAME=\"LD_PRELOAD\" 
> -DMPI_MODULE_NAME=mpich -Wno-error=incompatible-pointer-types 
> -Wno-error=pointer-arith -Wno-error=int-conversion 
> -Wno-gnu-zero-variadic-macro-arguments -D_GNU_SOURCE -MD -MT 
> src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o -MF 
> CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o.d -o 
> CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o -c 
> /builds/debian/eztrace/debian/output/source_dir/src/modules/mpi/mpi_funcs/mpi_allgather.c


This issue was caused by a specific behavior of the cmake on this
source code. Please, check the attached patch to fix the problem,
forcing blhc to ignore the inadequate lines.

Cheers,

Eriberto
--- debian/rules.ORIG	2022-08-24 14:07:41.889022406 -0300
+++ debian/rules	2022-08-24 14:08:36.415637889 -0300
@@ -32,6 +32,7 @@
 endif
 
 override_dh_auto_build:
+	@echo 'blhc: ignore-line-regexp: \[\ +[0-9]+%\]\ Building\ C\ object\ (src|test)/.+\.c\.o'
 	dh_auto_build -Bbuild-mpich
 ifeq ($(OPENMPI),yes)
 	dh_auto_build -Bbuild-openmpi


Bug#1018041: blhc: false positive NONVERBOSE BUILD while building with cmake

2022-08-24 Thread Samuel Thibault
Package: blhc
Version: 0.13-2
Severity: normal

Hello,

For instance on

https://salsa.debian.org/debian/eztrace/-/jobs/3143975/raw

We can see

469:NONVERBOSE BUILD: [ 35%] Building C object 
src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
479:NONVERBOSE BUILD: [ 37%] Building C object 
src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgatherv.c.o
487:NONVERBOSE BUILD: [ 39%] Building C object 
src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allreduce.c.o
etc.

But there are the corresponding verbose lines just after them:

https://salsa.debian.org/debian/eztrace/-/jobs/3143966/raw

[ 35%] Building C object 
src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o
cd /builds/debian/eztrace/debian/output/source_dir/build-mpich/src/modules/mpi 
&& /usr/bin/mpicc.mpich -Deztrace_mpi_EXPORTS 
-I/builds/debian/eztrace/debian/output/source_dir/src/modules/mpi 
-I/builds/debian/eztrace/debian/output/source_dir/src/core/include/eztrace-core 
-I/builds/debian/eztrace/debian/output/source_dir/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/build-mpich/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/src/eztrace-lib/include -g 
-O2 -ffile-prefix-map=/builds/debian/eztrace/debian/output/source_dir=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -I/usr/include -D_GNU_SOURCE -fPIC -Wall -Wextra -Wpedantic 
-DUSE_MPI3 -DLD_PRELOAD_NAME=\"LD_PRELOAD\" -DMPI_MODULE_NAME=mpich 
-Wno-error=incompatible-pointer-types -Wno-error=pointer-arith 
-Wno-error=int-conversion -Wno-gnu-zero-variadic-macro-arguments -D_GNU_SOURCE 
-MD -MT src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o 
-MF CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o.d -o 
CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgather.c.o -c 
/builds/debian/eztrace/debian/output/source_dir/src/modules/mpi/mpi_funcs/mpi_allgather.c
[...]
[ 37%] Building C object 
src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgatherv.c.o
[ 37%] Building C object src/modules/omp/CMakeFiles/eztrace-openmp.dir/gomp.c.o
cd /builds/debian/eztrace/debian/output/source_dir/build-mpich/src/modules/omp 
&& /usr/lib/ccache/cc -Deztrace_openmp_EXPORTS 
-I/builds/debian/eztrace/debian/output/source_dir/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/build-mpich/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/src/instrumentation/include 
-I/builds/debian/eztrace/debian/output/source_dir/src/eztrace-lib/include -g 
-O2 -ffile-prefix-map=/builds/debian/eztrace/debian/output/source_dir=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -I/usr/include -D_GNU_SOURCE -fPIC -Wall -Wextra -Wpedantic 
-DOPENMP_FOUND -fopenmp -Wno-gnu-zero-variadic-macro-arguments -D_GNU_SOURCE 
-MD -MT src/modules/omp/CMakeFiles/eztrace-openmp.dir/gomp.c.o -MF 
CMakeFiles/eztrace-openmp.dir/gomp.c.o.d -o 
CMakeFiles/eztrace-openmp.dir/gomp.c.o -c 
/builds/debian/eztrace/debian/output/source_dir/src/modules/omp/gomp.c
cd /builds/debian/eztrace/debian/output/source_dir/build-mpich/src/modules/mpi 
&& /usr/bin/mpicc.mpich -Deztrace_mpi_EXPORTS 
-I/builds/debian/eztrace/debian/output/source_dir/src/modules/mpi 
-I/builds/debian/eztrace/debian/output/source_dir/src/core/include/eztrace-core 
-I/builds/debian/eztrace/debian/output/source_dir/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/build-mpich/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/src/eztrace-lib/include -g 
-O2 -ffile-prefix-map=/builds/debian/eztrace/debian/output/source_dir=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -I/usr/include -D_GNU_SOURCE -fPIC -Wall -Wextra -Wpedantic 
-DUSE_MPI3 -DLD_PRELOAD_NAME=\"LD_PRELOAD\" -DMPI_MODULE_NAME=mpich 
-Wno-error=incompatible-pointer-types -Wno-error=pointer-arith 
-Wno-error=int-conversion -Wno-gnu-zero-variadic-macro-arguments -D_GNU_SOURCE 
-MD -MT src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allgatherv.c.o 
-MF CMakeFiles
[...]
[ 39%] Building C object 
src/modules/mpi/CMakeFiles/eztrace-mpi.dir/mpi_funcs/mpi_allreduce.c.o
cd /builds/debian/eztrace/debian/output/source_dir/build-mpich/src/modules/mpi 
&& /usr/bin/mpicc.mpich -Deztrace_mpi_EXPORTS 
-I/builds/debian/eztrace/debian/output/source_dir/src/modules/mpi 
-I/builds/debian/eztrace/debian/output/source_dir/src/core/include/eztrace-core 
-I/builds/debian/eztrace/debian/output/source_dir/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/build-mpich/src/core/include 
-I/builds/debian/eztrace/debian/output/source_dir/src/eztrace-lib/include -g 
-O2 -ffile-prefix-map=/builds/debian/eztrace/debian/output/source_dir=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -I/usr/include -D_GNU_SOURCE -fPIC -Wall -Wextra -Wpedantic 
-DUSE_MPI3 -DLD_PRELOAD_N