Skip to content

Commit

Permalink
common/meson.build: fix required headers missing failure
Browse files Browse the repository at this point in the history
It fails occasionally with missing generated header files:

| ../git/common/asn1.c:42:10: fatal error: openssl.asn.h: No such file or directory
|    42 | #include "openssl.asn.h"
|       |          ^~~~~~~~~~~~~~~
| compilation terminated.

According to meson manual page:

https://mesonbuild.com/Wrap-best-practices-and-tips.html#declare-generated-headers-explicitly

'asn_h_dep' should be a dependency of static_library target 'libp11_asn1'
to make sure that required header files generated before compile
common/asn1.c.

Signed-off-by: Kai Kang <[email protected]>
  • Loading branch information
kkang-wr authored and ueno committed Jan 22, 2024
1 parent 90bc380 commit 7756404
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ if with_asn1
'p11-asn1', libp11_asn1_sources,
gnu_symbol_visibility: 'hidden',
include_directories: configinc,
dependencies: asn_h_dep,
)

libp11_asn1_dep = declare_dependency(
Expand Down

0 comments on commit 7756404

Please sign in to comment.