dtc: also check <yaml.h> for libyaml
PATCH 1/1 dtc: also check <yaml.h> for libyaml
yamltree.c includes <yaml.h>, If /usr/include/yaml.h does not exist, it fails to build.
--- scripts/dtc/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
scripts/dtc/Makefile +4 -0
@@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \ endif HOST_EXTRACFLAGS += -DNO_YAML else +ifeq ($(wildcard /usr/include/yaml.h),) +HOST_EXTRACFLAGS += -DNO_YAML +else dtc-objs += yamltree.o HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs) endif +endif # Generated files need one more search path to include headers in source tree HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src)
Signature · 1 line
1.9.1
Rob Herring
maintainerQuoted 3 lines · Jiping Ma
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.
Does this patch fix your issue?:
https://lore.kernel.org/linux-devicetree/[email protected]/
Quoted 26 lines
Signed-off-by Jiping Ma <[email protected]>--- scripts/dtc/Makefile | 4 ++++ 1 file changed, 4 insertions(+)scripts/dtc/Makefile +4
-1@@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \ endif HOST_EXTRACFLAGS += -DNO_YAML else +ifeq ($(wildcard /usr/include/yaml.h),) +HOST_EXTRACFLAGS += -DNO_YAML +else dtc-objs += yamltree.o HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs) endif +endif # Generated files need one more search path to include headers in source tree HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) --1.9.1
Quoted 6 lines · Rob Herring
Quoted 2 lines · Jiping Ma
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.Does this patch fix your issue?:
No, it did not fix the issue.
$ pkg-config --cflags yaml-0.1
$ pkg-config yaml-0.1 --libs -L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64 -lyaml
Quoted 28 lines
Quoted 28 lines
Signed-off-by Jiping Ma <[email protected]>--- scripts/dtc/Makefile | 4 ++++ 1 file changed, 4 insertions(+)scripts/dtc/Makefile +4
-1@@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \ endif HOST_EXTRACFLAGS += -DNO_YAML else +ifeq ($(wildcard /usr/include/yaml.h),) +HOST_EXTRACFLAGS += -DNO_YAML +else dtc-objs += yamltree.o HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs) endif +endif # Generated files need one more search path to include headers in source tree HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) --1.9.1
Quoted 5 lines · Jiping Ma
Quoted 1 line · Rob Herring
On Mon, Jun 8, 2020 at 2:42 AM Jiping Ma <[email protected]> wrote:
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.Does this patch fix your issue?:
No, it did not fix the issue.
$ pkg-config --cflags yaml-0.1
Then, this is a problem on your system.
Quoted 27 lines
$ pkg-config yaml-0.1 --libs(quoted diff) +0
-2-L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64 -lyamlQuoted 24 lines
Quoted 24 lines
Signed-off-by Jiping Ma <[email protected]>--- scripts/dtc/Makefile | 4 ++++ 1 file changed, 4 insertions(+)scripts/dtc/Makefile +4
-0@@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \ endif HOST_EXTRACFLAGS += -DNO_YAML else +ifeq ($(wildcard /usr/include/yaml.h),) +HOST_EXTRACFLAGS += -DNO_YAML +else dtc-objs += yamltree.o HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs) endif +endif
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
scripts/dtc/Makefile +0
-1# Generated files need one more search path to include headers in source tree HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) --1.9.1
--
Best Regards
Masahiro Yamada
Quoted 15 lines · Jiping Ma
Quoted 6 lines · Rob Herring
Quoted 2 lines · Jiping Ma
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.Does this patch fix your issue?:
No, it did not fix the issue.
$ pkg-config --cflags yaml-0.1$ pkg-config yaml-0.1 --libs
Review
Quoted 2 lines
(quoted diff) +0
-2-L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64 -lyaml
If I install libyaml to a non-standard location (/home/masahiro/foo), my pkg-config shows as follows:
masahiro@oscar:~$ pkg-config --cflags yaml-0.1 -I/home/masahiro/foo/include masahiro@oscar:~$ pkg-config --libs yaml-0.1 -L/home/masahiro/foo/lib -lyaml
Quoted 29 lines
Quoted 28 lines
Quoted 28 lines
Signed-off-by Jiping Ma <[email protected]>--- scripts/dtc/Makefile | 4 ++++ 1 file changed, 4 insertions(+)scripts/dtc/Makefile +4
-1@@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \ endif HOST_EXTRACFLAGS += -DNO_YAML else +ifeq ($(wildcard /usr/include/yaml.h),) +HOST_EXTRACFLAGS += -DNO_YAML +else dtc-objs += yamltree.o HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs) endif +endif # Generated files need one more search path to include headers in source tree HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) --1.9.1
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 9 lines · Masahiro Yamada
Quoted 8 lines · Jiping Ma
Quoted 5 lines · Rob Herring
Quoted 2 lines · Jiping Ma
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.Does this patch fix your issue?:
Quoted 8 lines
Review
Quoted 8 lines
No, it did not fix the issue.
$ pkg-config --cflags yaml-0.1$ pkg-config yaml-0.1 --libs(quoted diff) +0
-2-L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64 -lyaml
This issue happened in Yocto, After completing the SDK build and installing it, use a new shell to source the environment and try to build the helper scripts. export SDKTARGETSYSROOT=/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux
export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib64/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfig
Quoted 47 lines
If I install libyaml to a non-standard location (
/home/masahiro/foo), my pkg-config shows as follows:masahiro@oscar:~$ pkg-config --cflags yaml-0.1 -I/home/masahiro/foo/include masahiro@oscar:~$ pkg-config --libs yaml-0.1 -L/home/masahiro/foo/lib -lyamlQuoted 27 lines
Quoted 27 lines
Quoted 27 lines
Signed-off-by Jiping Ma <[email protected]>--- scripts/dtc/Makefile | 4 ++++ 1 file changed, 4 insertions(+)scripts/dtc/Makefile +4
-1@@ -18,9 +18,13 @@ $(error dtc needs libyaml for DT schema validation support. \ endif HOST_EXTRACFLAGS += -DNO_YAML else +ifeq ($(wildcard /usr/include/yaml.h),) +HOST_EXTRACFLAGS += -DNO_YAML +else dtc-objs += yamltree.o HOSTLDLIBS_dtc := $(shell pkg-config yaml-0.1 --libs) endif +endif # Generated files need one more search path to include headers in source tree HOSTCFLAGS_dtc-lexer.lex.o := -I $(srctree)/$(src) --1.9.1
Quoted 18 lines · Jiping Ma
Quoted 14 lines · Masahiro Yamada
Quoted 13 lines · Jiping Ma
Quoted 6 lines · Rob Herring
Quoted 2 lines · Jiping Ma
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.Does this patch fix your issue?:
No, it did not fix the issue.
$ pkg-config --cflags yaml-0.1
Quoted 12 lines
Quoted 3 lines
Review
Quoted 3 lines
$ pkg-config yaml-0.1 --libs(quoted diff) +0
-2-L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64 -lyamlThis issue happened in Yocto, After completing the SDK build and
installing it, use a new shell to source the environment and try to
build the helper scripts.
export SDKTARGETSYSROOT=/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib64/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfigQuoted 2 lines
Probably, this commit:
https://github.com/yaml/libyaml/commit/3c80be99fb18f3ee18af37221a3b0c4760e8df06
Use newer libyaml, and that's fine.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 29 lines · Masahiro Yamada
Quoted 16 lines · Jiping Ma
Quoted 13 lines · Masahiro Yamada
Quoted 12 lines · Jiping Ma
Quoted 6 lines · Rob Herring
Quoted 2 lines · Jiping Ma
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.Does this patch fix your issue?:
No, it did not fix the issue.
$ pkg-config --cflags yaml-0.1Quoted 11 lines
Quoted 3 lines
Review
Quoted 3 lines
$ pkg-config yaml-0.1 --libs(quoted diff) +0
-2-L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64 -lyamlThis issue happened in Yocto, After completing the SDK build and
installing it, use a new shell to source the environment and try to
build the helper scripts.
export SDKTARGETSYSROOT=/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib64/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfigQuoted 1 line
Quoted 6 lines
Probably, this commit:
https://github.com/yaml/libyaml/commit/3c80be99fb18f3ee18af37221a3b0c4760e8df06
Use newer libyaml, and that's fine.
This commit already was included in our code.
Quoted 2 lines
Quoted 33 lines · Jiping Ma
Quoted 29 lines · Masahiro Yamada
Quoted 27 lines · Jiping Ma
Quoted 8 lines · Masahiro Yamada
Quoted 7 lines · Jiping Ma
Quoted 5 lines · Rob Herring
Quoted 2 lines · Jiping Ma
yamltree.cincludes <yaml.h>, If/usr/include/yaml.hdoes not exist, it fails to build.Does this patch fix your issue?:
Quoted 8 lines
Review
Quoted 8 lines
No, it did not fix the issue.
$ pkg-config --cflags yaml-0.1$ pkg-config yaml-0.1 --libs(quoted diff) +0
-2-L/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux/usr/lib64 -lyamlThis issue happened in Yocto, After completing the SDK build and
installing it, use a new shell to source the environment and try to
build the helper scripts.
export SDKTARGETSYSROOT=/buildarea/jma1/wr-19-0518/19.45/sysroots/aarch64-wrs-linux export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib64/pkgconfig:$SDKTARGETSYSROOT/usr/share/pkgconfigQuoted 1 line
Quoted 7 lines
Quoted 6 lines
Probably, this commit:
https://github.com/yaml/libyaml/commit/3c80be99fb18f3ee18af37221a3b0c4760e8df06
Use newer libyaml, and that's fine.
This commit already was included in our code.
Then, I have no idea,
but this is not a problem in the kernel build.
Signature · 2 lines
Best Regards Masahiro Yamada