[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parallel build sometimes resulting in "fatal error: config.h: No suc
Re: Parallel build sometimes resulting in "fatal error: config.h: No such file or directory"
Thu, 19 Oct 2017 21:54:36 +0200
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
This worked like a charm. While the full path is needed later (when
invoking help2man) it should not be used as prerequisite.
Thank you very much!
Am 16.10.2017 um 22:19 schrieb Nick Bowler:
> Hi Simon,
> On 10/16/17, Simon Sobisch <address@hidden> wrote:
>> Running without `make -j` always work but using parallel builds sometime
>> break with the mentioned error.
>> gcc -O2 -pipe -finline-functions -fsigned-char -Wall -Wwrite-strings
>> -Wmissing-prototypes -Wno-format-y2k -U_FORTIFY_SOURCE
>> -Wl,-z,relro,-z,now,-O1 /home/simon/gnucobol/cobc/../cobc/cobc.c -o
>> /home/simon/gnucobol/cobc/../cobc/cobc.c:26:10: fatal error: config.h:
>> No such file or directory
>> #include "config.h"
>> compilation terminated.
> I took a quick look at your project. The problem is likely this bit
> from cobc/Makefile.am:
> COBC = $(top_builddir)/cobc/cobc$(EXEEXT)
> cobc.1: [...] $(COBC)
> The problem is that this COBC macro does not match the Automake generated
> target name. When it gets pulled in as a prerequisite for cobc.1 and the
> file does not already exist, the built-in GNU make rule applies, which
> produces cobc from cobc.c.
> This is the wrong rule, so the compilation fails.
> The prerequisites in make rules typically should match the target names
> exactly. In this case, it should be:
> cobc.1: [...] cobc$(EXEEXT)
> Hope that helps,