Skip to contentSkip to conversation

libs/light: Fix build, fix missing _libxl_types_json.h

PATCH In review Anthony PERARD 3 participants 3 messages Oct 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libs/light: Fix build, fix missing _libxl_types_json.h

Make may not have copied "_libxl_types_json.h" into $(XEN_INCLUDE) before starting to build the different objects.

Make sure that the generated headers are copied into $(XEN_INCLUDE) before using them. This is achieved by telling make about which headers are needed to use "libxl_internal.h" which use "libxl_json.h" which uses "_libxl_types_json.h". "libxl_internal.h" also uses "libxl.h" so add it to the list.

This also prevent gcc from using a potentially installed headers from a previous version of Xen.

---

This is part of in review patch "libs/light: Rework targets prerequisites", but that much smaller patch should be enough to fix potential build issues.

This patch fix for example make _libxl_types.o, when libxl generated headers aren't generated yet, and tools/light is clean.

For 4.17:
build fix.

---
 tools/libs/light/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/libs/light/Makefile +1 -0
index d681269229..374be1cfab 100644
@@ -209,6 +209,7 @@ _libxl_save_msgs_helper.h _libxl_save_msgs_callout.h: \
 
 $(XEN_INCLUDE)/libxl.h: $(XEN_INCLUDE)/_libxl_types.h
 $(XEN_INCLUDE)/libxl_json.h: $(XEN_INCLUDE)/_libxl_types_json.h
+libxl_internal.h: $(XEN_INCLUDE)/libxl.h $(XEN_INCLUDE)/libxl_json.h
 libxl_internal.h: _libxl_types_internal.h _libxl_types_private.h _libxl_types_internal_private.h
 libxl_internal_json.h: _libxl_types_internal_json.h
 
Signature · 1 line
Anthony PERARD
#1 lore raw

Hi Anthony,

Quoted 14 lines

-----Original Message-----
From: Anthony PERARD <[email protected]>
Subject: [XEN PATCH for-4.17] libs/light: Fix build, fix missing _libxl_types_json.h

Make may not have copied "_libxl_types_json.h" into $(XEN_INCLUDE) before starting to build the different objects.

Make sure that the generated headers are copied into $(XEN_INCLUDE) before using them. This is achieved by telling make about which headers are needed to use "libxl_internal.h" which use "libxl_json.h" which uses "_libxl_types_json.h". "libxl_internal.h" also uses "libxl.h" so add it to the list.

Quoted 4 lines

This also prevent gcc from using a potentially installed headers from a previous version of Xen.

Kind regards,
Henry

Reviewed-by on v1 1/1
#2 lore raw
In reply to Anthony PERARD
Quoted 9 lines · Anthony PERARD

Make may not have copied "_libxl_types_json.h" into $(XEN_INCLUDE) before starting to build the different objects.

Make sure that the generated headers are copied into $(XEN_INCLUDE) before using them. This is achieved by telling make about which headers are needed to use "libxl_internal.h" which use "libxl_json.h" which uses "_libxl_types_json.h". "libxl_internal.h" also uses "libxl.h" so add it to the list.

Quoted 4 lines

This also prevent gcc from using a potentially installed headers from a previous version of Xen.