[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
broken build environment - explanation and fix
|
From: |
Bruno Haible |
|
Subject: |
broken build environment - explanation and fix |
|
Date: |
Sun, 19 Feb 2023 01:01:14 +0100 |
Hi,
Today, I was stuck for a while with a broken build environment: Even after
doing "make distclean", then bootstrap, then a fresh build, the build stopped
with this error:
make[3]: Entering directory '/media/develdata/devel/POKE/poke/libpoke'
/bin/bash ../libtool --tag=CC --mode=compile gcc -ftrapv -DHAVE_CONFIG_H -I.
-I../poke -I../gl-libpoke -I../gl-libpoke -I../common -DPKL_DEBUG
-DPKGINFODIR=\"/media/develdata/devel/inst-x86_64-64/share/info\"
-DLOCALEDIR=\"/media/develdata/devel/inst-x86_64-64/share/locale\"
-fvisibility=hidden -DBUILDING_LIBPOKE -DJITTER_DISPATCH_NO_THREADING=1 -I
/media/develdata/devel/POKE/poke/jitter -I
/media/develdata/devel/POKE/poke/jitter -I
/media/develdata/devel/POKE/poke/jitter/machine/x86_64 -I
/media/develdata/devel/inst-x86_64-64/include
-I/media/develdata/devel/inst-x86_64-64/include -Wall -Wall
-I/arch/x86_64-linux-gnu/gnu-inst-gc/8.0.6/include -g -O2 -MT
libpoke_la-pvm-program.lo -MD -MP -MF .deps/libpoke_la-pvm-program.Tpo -c -o
libpoke_la-pvm-program.lo `test -f 'pvm-program.c' || echo './'`pvm-program.c
libtool: compile: gcc -ftrapv -DHAVE_CONFIG_H -I. -I../poke -I../gl-libpoke
-I../gl-libpoke -I../common -DPKL_DEBUG
-DPKGINFODIR=\"/media/develdata/devel/inst-x86_64-64/share/info\"
-DLOCALEDIR=\"/media/develdata/devel/inst-x86_64-64/share/locale\"
-fvisibility=hidden -DBUILDING_LIBPOKE -DJITTER_DISPATCH_NO_THREADING=1 -I
/media/develdata/devel/POKE/poke/jitter -I
/media/develdata/devel/POKE/poke/jitter -I
/media/develdata/devel/POKE/poke/jitter/machine/x86_64 -I
/media/develdata/devel/inst-x86_64-64/include
-I/media/develdata/devel/inst-x86_64-64/include -Wall -Wall
-I/arch/x86_64-linux-gnu/gnu-inst-gc/8.0.6/include -g -O2 -MT
libpoke_la-pvm-program.lo -MD -MP -MF .deps/libpoke_la-pvm-program.Tpo -c
pvm-program.c -fPIC -DPIC -o .libs/libpoke_la-pvm-program.o
pvm-program.c: In function 'pvm_program_parse_from_string':
pvm-program.c:366:7: error: void value not ignored as it ought to be
366 | err = pvm_parse_mutable_routine_from_string (str, program->routine);
| ^
pvm-program.c:369:41: error: invalid use of undefined type 'struct
pvm_routine_parse_error'
369 | char *invalid_token = xstrdup (err->error_token_text);
| ^~
pvm-program.c:370:7: warning: implicit declaration of function
'pvm_routine_parse_error_destroy'; did you mean
'jitter_routine_parse_error_destroy'? [-Wimplicit-function-declaration]
370 | pvm_routine_parse_error_destroy (err);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| jitter_routine_parse_error_destroy
make[3]: *** [Makefile:3017: libpoke_la-pvm-program.lo] Error 1
A "make maintainer-clean" step then fixed the issue. Why? The three files
libpoke/pvm-vm.h, libpoke/pvm-vm1.c, libpoke/pvm-vm2.c were out of date.
The Makefile did not rebuild these files, because their time stamps were
in the right order:
pvm.jitter <= pvm-vm.h <= pvm-vm1.c <= pvm-vm2.c
$ ls -l --full-time pvm.jitter pvm-vm.h pvm-vm1.c pvm-vm2.c
-rw-rw-r-- 1 bruno bruno 188225 2023-02-18 17:42:16.742881188 +0100 pvm.jitter
-rw-rw-r-- 1 bruno bruno 708623 2023-02-18 17:57:33.705849628 +0100 pvm-vm1.c
-rw-rw-r-- 1 bruno bruno 4920902 2023-02-18 17:57:33.745849492 +0100 pvm-vm2.c
-rw-rw-r-- 1 bruno bruno 166074 2023-02-18 17:57:33.705849628 +0100 pvm-vm.h
What was the problem then? I had
1. done a "git pull" in poke,
2. done a "git checkout master && git pull" in jitter,
3. done a build (bootstrap --no-git && configure && make), which failed but
generated libpoke/pvm-vm.h, libpoke/pvm-vm1.c, libpoke/pvm-vm2.c.
4. done a build with the correct jitter version this time
(make distclean, then bootstrap && configure && make)
but in step 4 the broken libpoke/pvm-vm.h, libpoke/pvm-vm1.c, libpoke/pvm-vm2.c
persisted there.
I see two possible fixes:
A) erase libpoke/pvm-vm.h, libpoke/pvm-vm1.c, libpoke/pvm-vm2.c already
during "make distclean", not "make maintainer-clean".
B) add a dependency, to make sure that these files get rebuilt when jitter
is rebuilt.
(B) seems more correct to me, so here's a proposed fix in that direction.
0001-build-Regenerate-pvm-vm.h-pvm-vm1.c-pvm-vm2.c-when-j.patch
Description: Text Data
- broken build environment - explanation and fix,
Bruno Haible <=