diff mbox series

[PULL,02/77] hw/arm: remove explicit dependencies listed

Message ID 20250530071250.2050910-3-pbonzini@redhat.com
State Accepted
Commit 0ca26a51791f2601238129c6c2724cc4c604392c
Headers show
Series [PULL,01/77] meson: build target libraries with common dependencies | expand

Commit Message

Paolo Bonzini May 30, 2025, 7:11 a.m. UTC
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20250521223414.248276-3-pierrick.bouvier@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/arm/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Cédric Le Goater June 2, 2025, 1:59 p.m. UTC | #1
Hello Pierrick,

On 5/30/25 09:11, Paolo Bonzini wrote:
> From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Link: https://lore.kernel.org/r/20250521223414.248276-3-pierrick.bouvier@linaro.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   hw/arm/meson.build | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/arm/meson.build b/hw/arm/meson.build
> index 5098795f61d..d90be8f4c94 100644
> --- a/hw/arm/meson.build
> +++ b/hw/arm/meson.build
> @@ -8,7 +8,7 @@ arm_common_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c'))
>   arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c'))
>   arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c'))
>   arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c'))
> -arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicpal.c')])
> +arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [files('musicpal.c')])
>   arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c'))
>   arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c'))
>   arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c'))
> @@ -79,7 +79,7 @@ arm_common_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c'))
>   arm_common_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c'))
>   arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
>   
> -arm_common_ss.add(fdt, files('boot.c'))
> +arm_common_ss.add(files('boot.c'))
>   
>   hw_arch += {'arm': arm_ss}
>   hw_common_arch += {'arm': arm_common_ss}

This commit breaks building these files on Windows:

     hw/arm/{boot.c,vexpress.c,imx8mp-evk.c,raspi4b.c}

Error is :

     fatal error: libfdt.h: No such file or directory

Thanks,

C.
Pierrick Bouvier June 2, 2025, 6:39 p.m. UTC | #2
Hi Cédric,

On 6/2/25 6:59 AM, Cédric Le Goater wrote:
> Hello Pierrick,
> 
> On 5/30/25 09:11, Paolo Bonzini wrote:
>> From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Link: https://lore.kernel.org/r/20250521223414.248276-3-pierrick.bouvier@linaro.org
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>    hw/arm/meson.build | 4 ++--
>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/arm/meson.build b/hw/arm/meson.build
>> index 5098795f61d..d90be8f4c94 100644
>> --- a/hw/arm/meson.build
>> +++ b/hw/arm/meson.build
>> @@ -8,7 +8,7 @@ arm_common_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c'))
>>    arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c'))
>>    arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c'))
>>    arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c'))
>> -arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicpal.c')])
>> +arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [files('musicpal.c')])
>>    arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c'))
>>    arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c'))
>>    arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c'))
>> @@ -79,7 +79,7 @@ arm_common_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c'))
>>    arm_common_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c'))
>>    arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
>>    
>> -arm_common_ss.add(fdt, files('boot.c'))
>> +arm_common_ss.add(files('boot.c'))
>>    
>>    hw_arch += {'arm': arm_ss}
>>    hw_common_arch += {'arm': arm_common_ss}
> 
> This commit breaks building these files on Windows:
> 
>       hw/arm/{boot.c,vexpress.c,imx8mp-evk.c,raspi4b.c}
> 
> Error is :
> 
>       fatal error: libfdt.h: No such file or directory
> 
> Thanks,
> 

Is libfdt available in your windows environment? If yes, is it in a non 
standard path?
On my side, it built successfully, so I first need to reproduce this.

Thanks,
Pierrick
Nabih Estefan June 2, 2025, 8:53 p.m. UTC | #3
Hi Pierrick,

For what it's worth, those files were also breaking on Ubuntu and Debian for me.
I had to explicitly `sudo apt install libfdt-dev` for it to work
again. I don't believe
it was installed at all previously, but QEMU was building and working correctly
without it being explicitly installed.

Thanks,
Nabih

Nabih Estefan (he/him) |  Software Engineer |
nabihestefan@google.com |  857-308-9574



On Mon, Jun 2, 2025 at 11:41 AM Pierrick Bouvier
<pierrick.bouvier@linaro.org> wrote:
>
> Hi Cédric,
>
> On 6/2/25 6:59 AM, Cédric Le Goater wrote:
> > Hello Pierrick,
> >
> > On 5/30/25 09:11, Paolo Bonzini wrote:
> >> From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> >>
> >> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> >> Reviewed-by: Thomas Huth <thuth@redhat.com>
> >> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> >> Link: https://lore.kernel.org/r/20250521223414.248276-3-pierrick.bouvier@linaro.org
> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >> ---
> >>    hw/arm/meson.build | 4 ++--
> >>    1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/hw/arm/meson.build b/hw/arm/meson.build
> >> index 5098795f61d..d90be8f4c94 100644
> >> --- a/hw/arm/meson.build
> >> +++ b/hw/arm/meson.build
> >> @@ -8,7 +8,7 @@ arm_common_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c'))
> >>    arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c'))
> >>    arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c'))
> >>    arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c'))
> >> -arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicpal.c')])
> >> +arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [files('musicpal.c')])
> >>    arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c'))
> >>    arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c'))
> >>    arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c'))
> >> @@ -79,7 +79,7 @@ arm_common_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c'))
> >>    arm_common_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c'))
> >>    arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
> >>
> >> -arm_common_ss.add(fdt, files('boot.c'))
> >> +arm_common_ss.add(files('boot.c'))
> >>
> >>    hw_arch += {'arm': arm_ss}
> >>    hw_common_arch += {'arm': arm_common_ss}
> >
> > This commit breaks building these files on Windows:
> >
> >       hw/arm/{boot.c,vexpress.c,imx8mp-evk.c,raspi4b.c}
> >
> > Error is :
> >
> >       fatal error: libfdt.h: No such file or directory
> >
> > Thanks,
> >
>
> Is libfdt available in your windows environment? If yes, is it in a non
> standard path?
> On my side, it built successfully, so I first need to reproduce this.
>
> Thanks,
> Pierrick
>
Cédric Le Goater June 2, 2025, 9:11 p.m. UTC | #4
On 6/2/25 22:53, Nabih Estefan wrote:
> Hi Pierrick,
> 
> For what it's worth, those files were also breaking on Ubuntu and Debian for me.
> I had to explicitly `sudo apt install libfdt-dev` for it to work
> again. I don't believe
> it was installed at all previously, but QEMU was building and working correctly
> without it being explicitly installed.

yes. I had to install libfdt-dev/el on some systems too.

However, for the windows (on Linux) build :

   ./configure --cross-prefix=x86_64-w64-mingw32- --target-list=aarch64-softmmu,ppc64-softmmu,x86_64-softmmu,s390x-softmmu --disable-docs --disable-sdl

It's still broken.

Thanks,

C.





> 
> Thanks,
> Nabih
> 
> Nabih Estefan (he/him) |  Software Engineer |
> nabihestefan@google.com |  857-308-9574
> 
> 
> 
> On Mon, Jun 2, 2025 at 11:41 AM Pierrick Bouvier
> <pierrick.bouvier@linaro.org> wrote:
>>
>> Hi Cédric,
>>
>> On 6/2/25 6:59 AM, Cédric Le Goater wrote:
>>> Hello Pierrick,
>>>
>>> On 5/30/25 09:11, Paolo Bonzini wrote:
>>>> From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>>>
>>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>>> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>> Link: https://lore.kernel.org/r/20250521223414.248276-3-pierrick.bouvier@linaro.org
>>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>> ---
>>>>     hw/arm/meson.build | 4 ++--
>>>>     1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/hw/arm/meson.build b/hw/arm/meson.build
>>>> index 5098795f61d..d90be8f4c94 100644
>>>> --- a/hw/arm/meson.build
>>>> +++ b/hw/arm/meson.build
>>>> @@ -8,7 +8,7 @@ arm_common_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c'))
>>>>     arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c'))
>>>>     arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c'))
>>>>     arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c'))
>>>> -arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicpal.c')])
>>>> +arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [files('musicpal.c')])
>>>>     arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c'))
>>>>     arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c'))
>>>>     arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c'))
>>>> @@ -79,7 +79,7 @@ arm_common_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c'))
>>>>     arm_common_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c'))
>>>>     arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
>>>>
>>>> -arm_common_ss.add(fdt, files('boot.c'))
>>>> +arm_common_ss.add(files('boot.c'))
>>>>
>>>>     hw_arch += {'arm': arm_ss}
>>>>     hw_common_arch += {'arm': arm_common_ss}
>>>
>>> This commit breaks building these files on Windows:
>>>
>>>        hw/arm/{boot.c,vexpress.c,imx8mp-evk.c,raspi4b.c}
>>>
>>> Error is :
>>>
>>>        fatal error: libfdt.h: No such file or directory
>>>
>>> Thanks,
>>>
>>
>> Is libfdt available in your windows environment? If yes, is it in a non
>> standard path?
>> On my side, it built successfully, so I first need to reproduce this.
>>
>> Thanks,
>> Pierrick
>>
>
Pierrick Bouvier June 2, 2025, 10:37 p.m. UTC | #5
On 6/2/25 2:11 PM, Cédric Le Goater wrote:
> On 6/2/25 22:53, Nabih Estefan wrote:
>> Hi Pierrick,
>>
>> For what it's worth, those files were also breaking on Ubuntu and Debian for me.
>> I had to explicitly `sudo apt install libfdt-dev` for it to work
>> again. I don't believe
>> it was installed at all previously, but QEMU was building and working correctly
>> without it being explicitly installed.
> 
> yes. I had to install libfdt-dev/el on some systems too.
> 
> However, for the windows (on Linux) build :
> 
>     ./configure --cross-prefix=x86_64-w64-mingw32- --target-list=aarch64-softmmu,ppc64-softmmu,x86_64-softmmu,s390x-softmmu --disable-docs --disable-sdl
>

Thanks Cédric, I could reproduce it using the fedora-win64-cross 
container. After investigation, it's related to having a target-list, 
and in a specific order (hum, hum, feels bad). I observe the same 
behaviour when building normally for Linux too.

Those 3 commands work as expected:
$ ./configure --target-list=aarch64-softmmu  && \
ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o
$ ./configure && \
ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o
$ ./configure --target-list=s390x-softmmu,aarch64-softmmu && \
ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o

This one fails:
$ ./configure --target-list=aarch64-softmmu,s390x-softmmu && \
ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o

I will investigate more, but I strongly suspect there is a bug in the 
meson libraries patch I wrote, with a variable being reused when it 
should not.
Sorry for the inconvenience.

Regards,
Pierrick
Pierrick Bouvier June 2, 2025, 11:40 p.m. UTC | #6
On 6/2/25 3:37 PM, Pierrick Bouvier wrote:
> On 6/2/25 2:11 PM, Cédric Le Goater wrote:
>> On 6/2/25 22:53, Nabih Estefan wrote:
>>> Hi Pierrick,
>>>
>>> For what it's worth, those files were also breaking on Ubuntu and Debian for me.
>>> I had to explicitly `sudo apt install libfdt-dev` for it to work
>>> again. I don't believe
>>> it was installed at all previously, but QEMU was building and working correctly
>>> without it being explicitly installed.
>>
>> yes. I had to install libfdt-dev/el on some systems too.
>>
>> However, for the windows (on Linux) build :
>>
>>      ./configure --cross-prefix=x86_64-w64-mingw32- --target-list=aarch64-softmmu,ppc64-softmmu,x86_64-softmmu,s390x-softmmu --disable-docs --disable-sdl
>>
> 
> Thanks Cédric, I could reproduce it using the fedora-win64-cross
> container. After investigation, it's related to having a target-list,
> and in a specific order (hum, hum, feels bad). I observe the same
> behaviour when building normally for Linux too.
> 
> Those 3 commands work as expected:
> $ ./configure --target-list=aarch64-softmmu  && \
> ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o
> $ ./configure && \
> ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o
> $ ./configure --target-list=s390x-softmmu,aarch64-softmmu && \
> ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o
> 
> This one fails:
> $ ./configure --target-list=aarch64-softmmu,s390x-softmmu && \
> ninja -C build libsystem_arm.a.p/hw_arm_raspi4b.c.o
> 
> I will investigate more, but I strongly suspect there is a bug in the
> meson libraries patch I wrote, with a variable being reused when it
> should not.
> Sorry for the inconvenience.
>

Fix sent here (was indeed a wrong variable reused):
https://lore.kernel.org/qemu-devel/20250602233801.2699961-1-pierrick.bouvier@linaro.org/

> Regards,
> Pierrick
diff mbox series

Patch

diff --git a/hw/arm/meson.build b/hw/arm/meson.build
index 5098795f61d..d90be8f4c94 100644
--- a/hw/arm/meson.build
+++ b/hw/arm/meson.build
@@ -8,7 +8,7 @@  arm_common_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c'))
 arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c'))
 arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c'))
 arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c'))
-arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicpal.c')])
+arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [files('musicpal.c')])
 arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c'))
 arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c'))
 arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c'))
@@ -79,7 +79,7 @@  arm_common_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c'))
 arm_common_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c'))
 arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
 
-arm_common_ss.add(fdt, files('boot.c'))
+arm_common_ss.add(files('boot.c'))
 
 hw_arch += {'arm': arm_ss}
 hw_common_arch += {'arm': arm_common_ss}