[OE-core] [PATCH] nfs-utils: fix build error under tests folder

Yu, Mingli mingli.yu at windriver.com
Tue Dec 18 02:31:58 UTC 2018



On 2018年12月18日 01:16, richard.purdie at linuxfoundation.org wrote:
> On Mon, 2018-12-17 at 00:47 -0800, mingli.yu at windriver.com wrote:
>> From: Mingli Yu <Mingli.Yu at windriver.com>
>>
>> * 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
>
>


More information about the Openembedded-core mailing list