diff mbox series

[meta-arago,master,v2,2/3] onnx: fix 32-bit ARM build failure due to LONG_BIT mismatch

Message ID 20260326072653.1025506-3-p-deshmukh@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series ARMv7 support across ML frameworks | expand

Commit Message

Pratham Deshmukh March 26, 2026, 7:26 a.m. UTC
Switch from python3native to python3targetconfig and update CMake
include paths to point to the target sysroot.

The build was incorrectly pulling Python headers from the native
(x86_64) sysroot, leading to a "LONG_BIT definition appears wrong"
error when cross-compiling for 32-bit ARMv7. Using python3targetconfig
ensures the compiler uses the target's architecture-specific
configuration, making the recipe compatible with both the
architectures.

Signed-off-by: Pratham Deshmukh <p-deshmukh@ti.com>
---
Change Logs:
 - No Changes

 meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chirag Shilwant March 26, 2026, 7:42 a.m. UTC | #1
On 26/03/26 12:56, Pratham Deshmukh wrote:
> Switch from python3native to python3targetconfig and update CMake
> include paths to point to the target sysroot.


I don't see the below happening in the patch diff,

"update CMake include paths to point to the target sysroot"


Chirag



>
> The build was incorrectly pulling Python headers from the native
> (x86_64) sysroot, leading to a "LONG_BIT definition appears wrong"
> error when cross-compiling for 32-bit ARMv7. Using python3targetconfig
> ensures the compiler uses the target's architecture-specific
> configuration, making the recipe compatible with both the
> architectures.
>
> Signed-off-by: Pratham Deshmukh <p-deshmukh@ti.com>
> ---
> Change Logs:
>   - No Changes
>
>   meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
> index fc565dec..7d27119d 100644
> --- a/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
> +++ b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
> @@ -61,7 +61,7 @@ EXTRA_OECMAKE:append = " \
>   	--log-level=VERBOSE \
>   "
>   
> -inherit python3native cmake
> +inherit python3targetconfig cmake
>   
>   python do_build_version_file() {
>       import os
Pratham Deshmukh March 26, 2026, 7:50 a.m. UTC | #2
On 26/03/26 1:12 pm, Chirag Shilwant wrote:
>
> On 26/03/26 12:56, Pratham Deshmukh wrote:
>> Switch from python3native to python3targetconfig and update CMake
>> include paths to point to the target sysroot.
>
>
> I don't see the below happening in the patch diff,
>
> "update CMake include paths to point to the target sysroot"
>
>
> Chirag
>
This was to address the CMake definitions changes that I did while

testing. Those changes aren't required now but I missed to update

the commit message accordingly. I'll update this.

>
>
>>
>> The build was incorrectly pulling Python headers from the native
>> (x86_64) sysroot, leading to a "LONG_BIT definition appears wrong"
>> error when cross-compiling for 32-bit ARMv7. Using python3targetconfig
>> ensures the compiler uses the target's architecture-specific
>> configuration, making the recipe compatible with both the
>> architectures.
>>
>> Signed-off-by: Pratham Deshmukh <p-deshmukh@ti.com>
>> ---
>> Change Logs:
>>   - No Changes
>>
>>   meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb 
>> b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
>> index fc565dec..7d27119d 100644
>> --- a/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
>> +++ b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
>> @@ -61,7 +61,7 @@ EXTRA_OECMAKE:append = " \
>>       --log-level=VERBOSE \
>>   "
>>   -inherit python3native cmake
>> +inherit python3targetconfig cmake
>>     python do_build_version_file() {
>>       import os
diff mbox series

Patch

diff --git a/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
index fc565dec..7d27119d 100644
--- a/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
+++ b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb
@@ -61,7 +61,7 @@  EXTRA_OECMAKE:append = " \
 	--log-level=VERBOSE \
 "
 
-inherit python3native cmake
+inherit python3targetconfig cmake
 
 python do_build_version_file() {
     import os