Re: [OE-core] [PATCH] nfs-utils: fix build error under tests folder
On 2018年12月18日 01:16, richard.pur...@linuxfoundation.org wrote: On Mon, 2018-12-17 at 00:47 -0800, mingli...@windriver.com wrote: From: Mingli Yu * Redefine the reference path of libnfs.a to ../support/nfs/.libs/libnfs.a to fix below error when run "make -C tests statdb_dump". | make: *** No rule to make target '../support/nfs/libnfs.a', needed by 'statdb_dump'. Stop. | make: *** No rule to make target '../../support/nfs/libnfs.a', needed by 'nsm_client'. Stop. * The function generic_make_pathname is introduced in nfs-utils 2.3.1. Add the source file which defines function generic_make_pathname to libnsm_a_SOURCES of libnsm.a to fix the undefined reference when run "make -C tests statdb_dump" | ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname': | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- 2.3.1/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- 2.3.1/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- 2.3.1/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | ../support/nsm/libnsm.a(file.o): In function `nsm_setup_pathnames': | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- 2.3.1/support/nsm/file.c:280: undefined reference to `generic_setup_basedir' | collect2: error: ld returned 1 exit status * After the logic of commit[dbb643e Removed missing-prototypes warnings.] introduced, there comes below error when run "make -C tests/nsm_client nsm_client" | nlm_sm_inter_svc.c:20:1: error: no previous prototype for 'nlm_sm_prog_3' [-Werror=missing-prototypes] It is because rpcgen doesn't generate -Wmissing-prototypes free code for nlm_sm_inter_svc.c with below logic in tests/nsm_client/Makefile.am [snip] GENFILES_SVC= nlm_sm_inter_svc.c [snip] $(GENFILES_SVC): %_svc.c: %.x $(RPCGEN) test -f $@ && rm -rf $@ || true $(RPCGEN) -m -o $@ $< So add the patch to not fatalize -Wmissing-prototypes. Fails on musl: Will send out V2 to fix it. https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/104 Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] nfs-utils: fix build error under tests folder
On Mon, 2018-12-17 at 00:47 -0800, mingli...@windriver.com wrote: > From: Mingli Yu > > * Redefine the reference path of libnfs.a to > ../support/nfs/.libs/libnfs.a to fix below > error when run "make -C tests statdb_dump". > | make: *** No rule to make target '../support/nfs/libnfs.a', > needed by 'statdb_dump'. Stop. > | make: *** No rule to make target '../../support/nfs/libnfs.a', > needed by 'nsm_client'. Stop. > > * The function generic_make_pathname is introduced in > nfs-utils 2.3.1. > Add the source file which defines function generic_make_pathname to > libnsm_a_SOURCES of libnsm.a to fix the undefined reference > when run "make -C tests statdb_dump" > | ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname': > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- > 2.3.1/support/nsm/file.c:175: undefined reference to > `generic_make_pathname' > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- > 2.3.1/support/nsm/file.c:175: undefined reference to > `generic_make_pathname' > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- > 2.3.1/support/nsm/file.c:175: undefined reference to > `generic_make_pathname' > | ../support/nsm/libnsm.a(file.o): In function > `nsm_setup_pathnames': > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils- > 2.3.1/support/nsm/file.c:280: undefined reference to > `generic_setup_basedir' > | collect2: error: ld returned 1 exit status > > * After the logic of commit[dbb643e Removed missing-prototypes > warnings.] > introduced, there comes below error when run > "make -C tests/nsm_client nsm_client" > | nlm_sm_inter_svc.c:20:1: error: no previous prototype for > 'nlm_sm_prog_3' [-Werror=missing-prototypes] > > It is because rpcgen doesn't generate -Wmissing-prototypes > free code for nlm_sm_inter_svc.c with below logic > in tests/nsm_client/Makefile.am > [snip] > GENFILES_SVC= nlm_sm_inter_svc.c > [snip] > $(GENFILES_SVC): %_svc.c: %.x $(RPCGEN) > test -f $@ && rm -rf $@ || true > $(RPCGEN) -m -o $@ $< > So add the patch to not fatalize -Wmissing-prototypes. Fails on musl: https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/104 Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] nfs-utils: fix build error under tests folder
That's a complicated patch to enable tests that we don't enable. Can you get it upstream first so we're not carrying this? Ross On 12 July 2018 at 09:46, wrote: > From: Mingli Yu > > * When enable the test as below in nfs-utils recipe, > do_compile_append_class-target () { > oe_runmake -C tests statdb_dump > oe_runmake -C tests/nsm_client nsm_client > } > > There comes some build error as: > 1, > | make: *** No rule to make target '../support/nfs/libnfs.a', needed by > 'statdb_dump'. Stop. > | make: *** No rule to make target '../../support/nfs/libnfs.a', needed by > 'nsm_client'. Stop. > > 2, > | ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname': > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:175: > undefined reference to `generic_make_pathname' > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:175: > undefined reference to `generic_make_pathname' > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:175: > undefined reference to `generic_make_pathname' > | ../support/nsm/libnsm.a(file.o): In function `nsm_setup_pathnames': > | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:280: > undefined reference to `generic_setup_basedir' > | collect2: error: ld returned 1 exit status > > * Redefine the reference path of libnfs.a to > ../support/nfs/.libs/libnfs.a to fix the error 1 as > above > > * The function generic_make_pathname is introduced in > nfs-utils 2.3.1 > Add the source file which defines function generic_make_pathname to > libnsm_a_SOURCES of libnsm.a to fix the undefined reference > error 2 as above > > Signed-off-by: Mingli Yu > --- > ...efile.am-update-the-path-of-libnfs.a.patch | 49 +++ > .../0001-fix-undefined-for-libnsm.a.patch | 293 ++ > .../nfs-utils/nfs-utils_2.3.1.bb | 2 + > 3 files changed, 344 insertions(+) > create mode 100644 > meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch > create mode 100644 > meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch > > diff --git > a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch > > b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch > new file mode 100644 > index 00..b756ef6c5a > --- /dev/null > +++ > b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch > @@ -0,0 +1,49 @@ > +From fcece65d1b713eaeef41706898440302f8ce92d9 Mon Sep 17 00:00:00 2001 > +From: Mingli Yu > +Date: Thu, 12 Jul 2018 15:19:41 +0800 > +Subject: [PATCH] Makefile.am: update the path of libnfs.a > + > +The libnfs.a is under ../support/nfs/.libs/ now, > +update the reference path accordingly to fix below > +build error: > +| make: *** No rule to make target '../support/nfs/libnfs.a', needed by > 'statdb_dump'. Stop. > + > +| make: *** No rule to make target '../../support/nfs/libnfs.a', needed by > 'nsm_client'. Stop. > + > +Upstream-Status: Pending > + > +Signed-off-by: Mingli Yu > +--- > + tests/Makefile.am| 2 +- > + tests/nsm_client/Makefile.am | 2 +- > + 2 files changed, 2 insertions(+), 2 deletions(-) > + > +diff --git a/tests/Makefile.am b/tests/Makefile.am > +index 1f96264..74aa629 100644 > +--- a/tests/Makefile.am > b/tests/Makefile.am > +@@ -3,7 +3,7 @@ > + check_PROGRAMS = statdb_dump > + statdb_dump_SOURCES = statdb_dump.c > + > +-statdb_dump_LDADD = ../support/nfs/libnfs.a \ > ++statdb_dump_LDADD = ../support/nfs/.libs/libnfs.a \ > + ../support/nsm/libnsm.a $(LIBCAP) > + > + SUBDIRS = nsm_client > +diff --git a/tests/nsm_client/Makefile.am b/tests/nsm_client/Makefile.am > +index a8fc131..43db9c2 100644 > +--- a/tests/nsm_client/Makefile.am > b/tests/nsm_client/Makefile.am > +@@ -13,7 +13,7 @@ check_PROGRAMS = nsm_client > + nsm_client_SOURCES = $(GENFILES) nsm_client.c > + > + BUILT_SOURCES = $(GENFILES) > +-nsm_client_LDADD = ../../support/nfs/libnfs.a \ > ++nsm_client_LDADD = ../../support/nfs/.libs/libnfs.a \ > + ../../support/nsm/libnsm.a $(LIBCAP) $(LIBTIRPC) > + > + if CONFIG_RPCGEN > +-- > +2.7.4 > + > diff --git > a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch > > b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch > new file mode 100644 > index 00..bb210dbd1b > --- /dev/null > +++ > b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch > @@ -0,0 +1,293 @@ > +From 7b945c3498b5f88640947c187460f8029a09751e Mon Sep 17 00:00:00 2001 > +From: Mingli Yu > +Date: Thu, 12 Jul 2018 14:57:53 +0800 > +Subject: [PATCH] fix undefined function for libnsm.a > + > +The source file file.c of libnsm.a uses some function > +in ../support/misc/file.c, add
Re: [OE-core] [PATCH] nfs-utils: fix build error under tests folder
Ping. Thanks, On 2018年07月12日 16:46, mingli...@windriver.com wrote: From: Mingli Yu * When enable the test as below in nfs-utils recipe, do_compile_append_class-target () { oe_runmake -C tests statdb_dump oe_runmake -C tests/nsm_client nsm_client } There comes some build error as: 1, | make: *** No rule to make target '../support/nfs/libnfs.a', needed by 'statdb_dump'. Stop. | make: *** No rule to make target '../../support/nfs/libnfs.a', needed by 'nsm_client'. Stop. 2, | ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname': | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | ../support/nsm/libnsm.a(file.o): In function `nsm_setup_pathnames': | /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:280: undefined reference to `generic_setup_basedir' | collect2: error: ld returned 1 exit status * Redefine the reference path of libnfs.a to ../support/nfs/.libs/libnfs.a to fix the error 1 as above * The function generic_make_pathname is introduced in nfs-utils 2.3.1 Add the source file which defines function generic_make_pathname to libnsm_a_SOURCES of libnsm.a to fix the undefined reference error 2 as above Signed-off-by: Mingli Yu --- ...efile.am-update-the-path-of-libnfs.a.patch | 49 +++ .../0001-fix-undefined-for-libnsm.a.patch | 293 ++ .../nfs-utils/nfs-utils_2.3.1.bb | 2 + 3 files changed, 344 insertions(+) create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch new file mode 100644 index 00..b756ef6c5a --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch @@ -0,0 +1,49 @@ +From fcece65d1b713eaeef41706898440302f8ce92d9 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Thu, 12 Jul 2018 15:19:41 +0800 +Subject: [PATCH] Makefile.am: update the path of libnfs.a + +The libnfs.a is under ../support/nfs/.libs/ now, +update the reference path accordingly to fix below +build error: +| make: *** No rule to make target '../support/nfs/libnfs.a', needed by 'statdb_dump'. Stop. + +| make: *** No rule to make target '../../support/nfs/libnfs.a', needed by 'nsm_client'. Stop. + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu +--- + tests/Makefile.am| 2 +- + tests/nsm_client/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 1f96264..74aa629 100644 +--- a/tests/Makefile.am b/tests/Makefile.am +@@ -3,7 +3,7 @@ + check_PROGRAMS = statdb_dump + statdb_dump_SOURCES = statdb_dump.c + +-statdb_dump_LDADD = ../support/nfs/libnfs.a \ ++statdb_dump_LDADD = ../support/nfs/.libs/libnfs.a \ + ../support/nsm/libnsm.a $(LIBCAP) + + SUBDIRS = nsm_client +diff --git a/tests/nsm_client/Makefile.am b/tests/nsm_client/Makefile.am +index a8fc131..43db9c2 100644 +--- a/tests/nsm_client/Makefile.am b/tests/nsm_client/Makefile.am +@@ -13,7 +13,7 @@ check_PROGRAMS = nsm_client + nsm_client_SOURCES = $(GENFILES) nsm_client.c + + BUILT_SOURCES = $(GENFILES) +-nsm_client_LDADD = ../../support/nfs/libnfs.a \ ++nsm_client_LDADD = ../../support/nfs/.libs/libnfs.a \ + ../../support/nsm/libnsm.a $(LIBCAP) $(LIBTIRPC) + + if CONFIG_RPCGEN +-- +2.7.4 + diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch new file mode 100644 index 00..bb210dbd1b --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-fix-undefined-for-libnsm.a.patch @@ -0,0 +1,293 @@ +From 7b945c3498b5f88640947c187460f8029a09751e Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Thu, 12 Jul 2018 14:57:53 +0800 +Subject: [PATCH] fix undefined function for libnsm.a + +The source file file.c of libnsm.a uses some function +in ../support/misc/file.c, add ../support/misc/file.c +to libnsm_a_SOURCES to fix build error: +| ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname': +| /usr/src/debug/nfs-utils/2.3.1-r0/nfs-utils-2.3.1/support/nsm/file.c:175: undefined reference to `generic_make_pathname' +|