2023-06-06 09:40:58

by Naresh Kamboju

[permalink] [raw]
Subject: arm: shmobile_defconfig: ld.lld: error: undefined symbol: lynx_pcs_destroy

Following build regressions found while building arm shmobile_defconfig on
Linux next-20230606.

Regressions found on arm:

- build/clang-16-shmobile_defconfig
- build/gcc-8-shmobile_defconfig
- build/gcc-12-shmobile_defconfig
- build/clang-nightly-shmobile_defconfig


ld.lld: error: undefined symbol: lynx_pcs_destroy
>>> referenced by stmmac_mdio.c
>>> drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.o:(stmmac_mdio_unregister) in archive vmlinux.a
make[2]: *** [scripts/Makefile.vmlinux:35: vmlinux] Error 1


Reported-by: Linux Kernel Functional Testing <[email protected]>

links,
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230606/testrun/17347517/suite/build/test/gcc-12-shmobile_defconfig/history/
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230606/testrun/17347562/suite/build/test/clang-16-shmobile_defconfig/log

--
Linaro LKFT
https://lkft.linaro.org


2023-06-06 10:43:40

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: arm: shmobile_defconfig: ld.lld: error: undefined symbol: lynx_pcs_destroy

Hi Arnd,

On Tue, Jun 6, 2023 at 12:21 PM Arnd Bergmann <[email protected]> wrote:
> On Tue, Jun 6, 2023, at 11:28, Geert Uytterhoeven wrote:
> > On Tue, Jun 6, 2023 at 11:16 AM Arnd Bergmann <[email protected]> wrote:
> >> On Tue, Jun 6, 2023, at 11:01, Geert Uytterhoeven wrote:
> >>
> >> This won't work when PCS_LYNX is a loadable module and
> >> STMMAC is built-in. I think we should just select PCS_LYNX
> >
> > Oops, you're right, forgot about that case.
> > What about using IS_REACHABLE() instead?
> > No, that won't work either, as DWMAC_SOCFPGA can be modular,
> > with STMMAC builtin.
>
> It would work because of the 'select PCS_LYNX' below DWMAC_SOCFPGA,

That was my first thought, but it won't work, as DWMAC_SOCFPGA=m
causes PCS_LYNX=m, while main STMMAC can still be builtin.

> but I think that's too fragile and would easily break when another
> dwmac front-end starts using PCS_LYNX without have the same select
> statement. I think we should always avoid IS_REACHABLE().

;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-06-06 10:56:19

by Arnd Bergmann

[permalink] [raw]
Subject: Re: arm: shmobile_defconfig: ld.lld: error: undefined symbol: lynx_pcs_destroy

On Tue, Jun 6, 2023, at 12:31, Geert Uytterhoeven wrote:
> On Tue, Jun 6, 2023 at 12:21 PM Arnd Bergmann <[email protected]> wrote:
>> On Tue, Jun 6, 2023, at 11:28, Geert Uytterhoeven wrote:
>> > On Tue, Jun 6, 2023 at 11:16 AM Arnd Bergmann <[email protected]> wrote:
>> >> On Tue, Jun 6, 2023, at 11:01, Geert Uytterhoeven wrote:
>> >>
>> >> This won't work when PCS_LYNX is a loadable module and
>> >> STMMAC is built-in. I think we should just select PCS_LYNX
>> >
>> > Oops, you're right, forgot about that case.
>> > What about using IS_REACHABLE() instead?
>> > No, that won't work either, as DWMAC_SOCFPGA can be modular,
>> > with STMMAC builtin.
>>
>> It would work because of the 'select PCS_LYNX' below DWMAC_SOCFPGA,
>
> That was my first thought, but it won't work, as DWMAC_SOCFPGA=m
> causes PCS_LYNX=m, while main STMMAC can still be builtin.

Right, got it now.

Arnd

2023-06-07 14:06:40

by Arnd Bergmann

[permalink] [raw]
Subject: Re: arm: shmobile_defconfig: ld.lld: error: undefined symbol: lynx_pcs_destroy

On Wed, Jun 7, 2023, at 15:27, Aithal, Srikanth wrote:
> On 6/6/2023 2:31 PM, Geert Uytterhoeven wrote:
>> On Tue, Jun 6, 2023 at 10:53 AM Naresh Kamboju
>> <[email protected]> wrote:
>>> On Tue, 6 Jun 2023 at 14:17, Naresh Kamboju <[email protected]> wrote:
>>>> Following build regressions found while building arm shmobile_defconfig on
>>>> Linux next-20230606.
>>>>
>>>> Regressions found on arm:
>>>>
>>>> - build/clang-16-shmobile_defconfig
>>>> - build/gcc-8-shmobile_defconfig
>>>> - build/gcc-12-shmobile_defconfig
>>>> - build/clang-nightly-shmobile_defconfig
>>>
>>> And mips defconfig builds failed.
>>> Regressions found on mips:
>>>
>>> - build/clang-16-defconfig
>>> - build/gcc-12-defconfig
>>> - build/gcc-8-defconfig
>>> - build/clang-nightly-defconfig
>>
>> Please give my fix a try:
>> https://lore.kernel.org/linux-renesas-soc/7b36ac43778b41831debd5c30b5b37d268512195.1686039915.git.geert+renesas@glider.be
> On x86 as well seeing couple of issues related to same, not on defconfig
> though..
>
> ERROR: modpost: "lynx_pcs_destroy"
> [drivers/net/ethernet/stmicro/stmmac/stmmac.ko] undefined!
> ERROR: modpost: "lynx_pcs_destroy"
> [drivers/net/ethernet/altera/altera_tse.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:136: Module.symvers] Error 1
> make: *** [Makefile:1984: modpost] Error 2
>
> Among above issues stmmac issue would be resolved with above mentioned fix.

I sent out my version of the build fixups for altera and stmmac now.

Arnd

2023-06-07 14:11:06

by Russell King (Oracle)

[permalink] [raw]
Subject: Re: arm: shmobile_defconfig: ld.lld: error: undefined symbol: lynx_pcs_destroy

On Wed, Jun 07, 2023 at 06:57:17PM +0530, Aithal, Srikanth wrote:
> On 6/6/2023 2:31 PM, Geert Uytterhoeven wrote:
> > Hi Naresh,
> >
> > On Tue, Jun 6, 2023 at 10:53 AM Naresh Kamboju
> > <[email protected]> wrote:
> > > On Tue, 6 Jun 2023 at 14:17, Naresh Kamboju <[email protected]> wrote:
> > > > Following build regressions found while building arm shmobile_defconfig on
> > > > Linux next-20230606.
> > > >
> > > > Regressions found on arm:
> > > >
> > > > - build/clang-16-shmobile_defconfig
> > > > - build/gcc-8-shmobile_defconfig
> > > > - build/gcc-12-shmobile_defconfig
> > > > - build/clang-nightly-shmobile_defconfig
> > >
> > > And mips defconfig builds failed.
> > > Regressions found on mips:
> > >
> > > - build/clang-16-defconfig
> > > - build/gcc-12-defconfig
> > > - build/gcc-8-defconfig
> > > - build/clang-nightly-defconfig
> >
> > Please give my fix a try:
> > https://lore.kernel.org/linux-renesas-soc/7b36ac43778b41831debd5c30b5b37d268512195.1686039915.git.geert+renesas@glider.be
> On x86 as well seeing couple of issues related to same, not on defconfig
> though..
>
> ERROR: modpost: "lynx_pcs_destroy"
> [drivers/net/ethernet/stmicro/stmmac/stmmac.ko] undefined!
> ERROR: modpost: "lynx_pcs_destroy"
> [drivers/net/ethernet/altera/altera_tse.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:136: Module.symvers] Error 1
> make: *** [Makefile:1984: modpost] Error 2
>
> Among above issues stmmac issue would be resolved with above mentioned fix.

Patches are in progress to resolve this issue (on netdev), please be
patient.

Even better would be to check netdev for the patches, review them, and
give them a test, and provide feedback, which will help get them
merged.

Latest version can be found here:

https://lore.kernel.org/netdev/[email protected]/T/#t

Thanks.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

2023-06-09 05:53:44

by Aithal, Srikanth

[permalink] [raw]
Subject: Re: arm: shmobile_defconfig: ld.lld: error: undefined symbol: lynx_pcs_destroy

On 6/7/2023 7:29 PM, Arnd Bergmann wrote:
> On Wed, Jun 7, 2023, at 15:27, Aithal, Srikanth wrote:
>> On 6/6/2023 2:31 PM, Geert Uytterhoeven wrote:
>>> On Tue, Jun 6, 2023 at 10:53 AM Naresh Kamboju
>>> <[email protected]> wrote:
>>>> On Tue, 6 Jun 2023 at 14:17, Naresh Kamboju <[email protected]> wrote:
>>>>> Following build regressions found while building arm shmobile_defconfig on
>>>>> Linux next-20230606.
>>>>>
>>>>> Regressions found on arm:
>>>>>
>>>>> - build/clang-16-shmobile_defconfig
>>>>> - build/gcc-8-shmobile_defconfig
>>>>> - build/gcc-12-shmobile_defconfig
>>>>> - build/clang-nightly-shmobile_defconfig
>>>>
>>>> And mips defconfig builds failed.
>>>> Regressions found on mips:
>>>>
>>>> - build/clang-16-defconfig
>>>> - build/gcc-12-defconfig
>>>> - build/gcc-8-defconfig
>>>> - build/clang-nightly-defconfig
>>>
>>> Please give my fix a try:
>>> https://lore.kernel.org/linux-renesas-soc/7b36ac43778b41831debd5c30b5b37d268512195.1686039915.git.geert+renesas@glider.be
>> On x86 as well seeing couple of issues related to same, not on defconfig
>> though..
>>
>> ERROR: modpost: "lynx_pcs_destroy"
>> [drivers/net/ethernet/stmicro/stmmac/stmmac.ko] undefined!
>> ERROR: modpost: "lynx_pcs_destroy"
>> [drivers/net/ethernet/altera/altera_tse.ko] undefined!
>> make[1]: *** [scripts/Makefile.modpost:136: Module.symvers] Error 1
>> make: *** [Makefile:1984: modpost] Error 2
>>
>> Among above issues stmmac issue would be resolved with above mentioned fix.
>
> I sent out my version of the build fixups for altera and stmmac now.
Thanks, tested with next-20230608 and it builds fine.
Tested-by: [email protected]
>
> Arnd