]> code.ossystems Code Review - openembedded-core.git/commit
nfs-utils: fix build error under tests folder
authorMingli Yu <Mingli.Yu@windriver.com>
Tue, 18 Dec 2018 05:21:00 +0000 (21:21 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 14 Jan 2019 11:21:57 +0000 (11:21 +0000)
commit18947cd4782934e9bc3ec5507db8db51258d9b2c
tree6000a90ff71db836f56971daf3eabf5d5bc0a211
parent463e064a4f4a664ae1b871b98f26b561d1cbe98b
nfs-utils: fix build error under tests folder

* 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.

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch [new file with mode: 0644]
meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-update-the-path-of-libnfs.a.patch [new file with mode: 0644]
meta/recipes-connectivity/nfs-utils/nfs-utils/0001-configure.ac-Do-not-fatalize-Wmissing-prototypes.patch [new file with mode: 0644]
meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb