Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile.in: build config.h before any object #192

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

trofi
Copy link

@trofi trofi commented Nov 6, 2022

Object files lack dependency on config.h symlink (and usually depend only on ldns/config.h). As a result build occasionally fails in make --shuffe mode:

$ make --shuffle
...
./libtool --tag=CC --quiet --mode=compile gcc -I. -I.  \
  -DHAVE_CONFIG_H -DLDNS_TRUST_ANCHOR_FILE="\"...-dns-root-data-2019-01-11/root.key\"" \
  -DOPENSSL_API_COMPAT=10100 -fno-strict-aliasing -Wunused-function -Wstrict-prototypes \
  -Wwrite-strings -W -Wall -g -O2 -I...-openssl-3.0.7-dev/include -c examples/ldns-rrsig.c \
  -o examples/ldns-rrsig.o
examples/ldns-rrsig.c:10:10: fatal error: config.h: No such file or directory
   10 | #include "config.h"
      |          ^~~~~~~~~~

The change moves config.h symlink creation in setup-builddir from a dependency on final binary to dependency on all individual objects.

While at it regenerated dependencies with make depend.

before the change make --shuffle build was failing in about 50% cases.
After the change: make --shuffle succeeded 80 times in a row.

Object files lack dependency on `config.h` symlink (and usually depend
only on `ldns/config.h`). As a result build occasionally fails in
`make --shuffe mode`:

    $ make --shuffle
    ...
    ./libtool --tag=CC --quiet --mode=compile gcc -I. -I.  \
      -DHAVE_CONFIG_H -DLDNS_TRUST_ANCHOR_FILE="\"...-dns-root-data-2019-01-11/root.key\"" \
      -DOPENSSL_API_COMPAT=10100 -fno-strict-aliasing -Wunused-function -Wstrict-prototypes \
      -Wwrite-strings -W -Wall -g -O2 -I...-openssl-3.0.7-dev/include -c examples/ldns-rrsig.c \
      -o examples/ldns-rrsig.o
    examples/ldns-rrsig.c:10:10: fatal error: config.h: No such file or directory
       10 | #include "config.h"
          |          ^~~~~~~~~~

The change moves `config.h` symlink creation in `setup-builddir` from
a dependency on final binary to dependency on all individual objects.

While at it regenerated dependencies with `make depend`.

before the change `make --shuffle` build was failing in about 50% cases.
After the change: `make --shuffle` succeeded 80 times in a row.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant