mbox series

[v7,00/15] build improvements

Message ID 20200918095001.18935-1-johannes@sipsolutions.net
Headers show
Series build improvements | expand

Message

Johannes Berg Sept. 18, 2020, 9:49 a.m. UTC
v7:
 - After fixing the include directive in v6, patch 13 was
   wrong of course, fix that ...

Sorry!

johannes

Comments

Jouni Malinen Oct. 10, 2020, 1:55 p.m. UTC | #1
On Fri, Sep 18, 2020 at 11:49:46AM +0200, Johannes Berg wrote:
>  - After fixing the include directive in v6, patch 13 was
>    wrong of course, fix that ...

Thanks, applied patches other than 11/15 and 13/15:

    build: Use the new build system for fuzz tests

This seems to break building of some of the fuzzing tools. For example,
tests/fuzzing/ap-mgmt:

hostap/tests/fuzzing/ap-mgmt$ make 
cc: error: ../../../src/crypto/libcrypto.a: No such file or directory
cc: error: ../../../src/tls/libtls.a: No such file or directory
make: *** [Makefile:38: ap-mgmt] Error 1

It looks like ELIBS gets some of the build rules confused. These
libcrypto.a and libtls.a show up three times on the linker command line
and the last instance of each points to this old location. Replacing
that with the new location fixes this, but I'm not completely sure how
this was supposed to work properly, so I did not try to fix this in the
build files. These were needed on the command line at least twice to get
some mixed references included into the binary, but I do not recall
where that third instance is coming from.


      build: Put archive files into build/ folder too

This depends on the 11/15, so I had to drop this as well for now.
Johannes Berg Oct. 11, 2020, 7:58 a.m. UTC | #2
Hi Jouni,

> Thanks, applied patches 

Great, thanks :)

> other than 11/15 and 13/15:
> 
>     build: Use the new build system for fuzz tests
> 
> This seems to break building of some of the fuzzing tools. For example,
> tests/fuzzing/ap-mgmt:
> 
> hostap/tests/fuzzing/ap-mgmt$ make 
> cc: error: ../../../src/crypto/libcrypto.a: No such file or directory
> cc: error: ../../../src/tls/libtls.a: No such file or directory
> make: *** [Makefile:38: ap-mgmt] Error 1

Hmm. Yes, I see this, and I probably forgot to do "git clean" while
testing.

However, are you sure it's due to _this_ patch? I see this only in
combination with patch 15 ("build: put archive files into build/ folder
too"), and it makes sense, because evidently in ap-mgmt (only) I forgot

+_OBJS_VAR := ELIBS
+include ../../../src/objs.mk
+

I'll resend the two patches, but please do check if you see breakage due
to "build: Use the new build system for fuzz tests" because I don't, and
I haven't changed it.

johannes
Jouni Malinen Oct. 11, 2020, 8:14 a.m. UTC | #3
On Sun, Oct 11, 2020 at 09:58:08AM +0200, Johannes Berg wrote:
> > hostap/tests/fuzzing/ap-mgmt$ make 
> > cc: error: ../../../src/crypto/libcrypto.a: No such file or directory
> > cc: error: ../../../src/tls/libtls.a: No such file or directory
> > make: *** [Makefile:38: ap-mgmt] Error 1

> However, are you sure it's due to _this_ patch? I see this only in
> combination with patch 15 ("build: put archive files into build/ folder
> too"), and it makes sense, because evidently in ap-mgmt (only) I forgot
> 
> +_OBJS_VAR := ELIBS
> +include ../../../src/objs.mk
> +
> 
> I'll resend the two patches, but please do check if you see breakage due
> to "build: Use the new build system for fuzz tests" because I don't, and
> I haven't changed it.

I might not had tested this just with "build: Use the new build system
for fuzz tests". Things were getting a bit messy when "make clean" did
not remove things that were moved in an earlier patch and manual cleanup
was needed so I probably optimized things and did that only with the
full set of patches applied and just dropped this one based on the
commit message and what was failing in the build. Anyway, yes, this
alone without moving the archive files seems to work with the previous
patchset.