Bug#846766: race condition in the build process?

2016-12-07 Thread Arturo Borrero Gonzalez
On 6 December 2016 at 11:06, Adrian Bunk  wrote:
>
> 2. work around it by disabling parallel building:
> -   dh $@ --with systemd,autotools-dev
> +   dh $@ --with systemd,autotools-dev --no-parallel
>
>

Thanks Adrian,

I think I will take this simple approach by now.

best regards.



Bug#846766: race condition in the build process?

2016-12-06 Thread Adrian Bunk
On Mon, Dec 05, 2016 at 12:51:27PM +0100, Arturo Borrero Gonzalez wrote:
> Hi,
> 
> from the logs:
> 
> [...]
> read_config_lex.l:25:28: fatal error: read_config_yy.h: No such file
> or directory
>  #include "read_config_yy.h"
> ^
> compilation terminated.
> Makefile:662: recipe for target 'read_config_lex.o' failed
> make[3]: *** [read_config_lex.o] Error 1
> make[3]: *** Waiting for unfinished jobs
> updating read_config_yy.h
> [...]
> 
> Note how the read_config_yy.h file is generated *after* the build
> process tries to use it.
> 
> We have a race condition? I can't explain this.
>
> It seems to only happen in some arches but not all.
>...

This is a dependency problem exposed by parallel building
(which is enabled by default with debhelper compat level 10).

I can easily reproduce this with
  dpkg-buildpackage -J100

There are two ways to handle this bug:

1. fix src/Makefile.am by adding the proper dependencies to ensure
   that read_config_yy.h is not used before it is built

OR

2. work around it by disabling parallel building:
-   dh $@ --with systemd,autotools-dev
+   dh $@ --with systemd,autotools-dev --no-parallel


cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



Bug#846766: race condition in the build process?

2016-12-05 Thread Arturo Borrero Gonzalez
Hi,

from the logs:

[...]
read_config_lex.l:25:28: fatal error: read_config_yy.h: No such file
or directory
 #include "read_config_yy.h"
^
compilation terminated.
Makefile:662: recipe for target 'read_config_lex.o' failed
make[3]: *** [read_config_lex.o] Error 1
make[3]: *** Waiting for unfinished jobs
updating read_config_yy.h
[...]

Note how the read_config_yy.h file is generated *after* the build
process tries to use it.

We have a race condition? I can't explain this.

It seems to only happen in some arches but not all.

Reference:
 
https://buildd.debian.org/status/fetch.php?pkg=conntrack-tools=arm64=1%3A1.4.4%2Bsnapshot20161117-3=1480938247