Subject: Re: linux-next: build failure after merge of the rust tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 28 Sep 2021 15:52:47 +1000

Hi Gary,

On Tue, 28 Sep 2021 05:18:49 +0100 Gary Guo <[email-masked]> wrote:
>
> On Tue, 28 Sep 2021 14:09:32 +1000
> Stephen Rothwell <[email-masked]> wrote:
> 
> > Hi all,
> > 
> > After merging the rust tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> > 
> > scripts/kconfig/confdata.c: In function 'rustc_cfg_print_symbol':
> > scripts/kconfig/confdata.c:669:9: warning: implicit declaration of
> > function 'sym_escape_string_value'; did you mean
> > 'sym_set_string_value'? [-Wimplicit-function-declaration] 669 |   str
> > = sym_escape_string_value(value); |         ^~~~~~~~~~~~~~~~~~~~~~~ |
> >         sym_set_string_value scripts/kconfig/confdata.c:669:7:
> > warning: assignment to 'const char *' from 'int' makes pointer from
> > integer without a cast [-Wint-conversion] 669 |   str =
> > sym_escape_string_value(value); |       ^ /usr/bin/ld:
> > scripts/kconfig/confdata.o: in function `rustc_cfg_print_symbol':
> > confdata.c:(.text+0x738): undefined reference to
> > `sym_escape_string_value'
> > 
> > Caused by commit
> > 
> >   dc08d49444e9 ("Kbuild: add Rust support")
> > 
> > interacting with commit
> > 
> >   420a2bdbead2 ("kconfig: Refactor sym_escape_string_value")
> > 
> > from the kbuild tree.
> > 
> > I applied the following patch, but it doesn't seem quite right.  
> 
> That's indeed incorrect, if we have `CONFIG_FOO=bar` then sym here is
> `FOO` and value is `bar`. I think to resolve the conflict, 420a2bdbead2
> would have to be reverted.

OK, I have done that for today.  (I needed to revert
16f3610168218ed5e2eafa6978bb7f10c175c7a9 as well).

-- 
Cheers,
Stephen Rothwell