So with this patch applied we would get this CFLAGS on sysconfigdata on the 
build directory:

 'CFLAGS': '-fno-strict-overflow '
           '-Wsign-compare '
           '-DNDEBUG '
           '-g '
           '-O3 '
           '-Wall '
           '-O2 '
           '-g '
           '-fcanon-prefix-map  '
           
'-fmacro-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/Python-3.13.2=/usr/src/debug/python3/3.13.2
  '
           
'-fdebug-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/Python-3.13.2=/usr/src/debug/python3/3.13.2
  '
           
'-fmacro-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2  '
           
'-fdebug-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2  '
           
'-fdebug-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot=
  '
           
'-fmacro-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot=
  '
           
'-fdebug-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot-native=
  '
           
'-fmacro-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot-native=
  '
           '-pipe  '
           '-O2 '
           '-g '
           '-fcanon-prefix-map  '
           
'-fmacro-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/Python-3.13.2=/usr/src/debug/python3/3.13.2
  '
           
'-fdebug-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/Python-3.13.2=/usr/src/debug/python3/3.13.2
  '
           
'-fmacro-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2  '
           
'-fdebug-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2  '
           
'-fdebug-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot=
  '
           
'-fmacro-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot=
  '
           
'-fdebug-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot-native=
  '
           
'-fmacro-prefix-map=/build/tmp/work/core2-64-oe-linux/python3/3.13.2/recipe-sysroot-native=
  '
           '-pipe',

After replacing buildpaths and DEBUG_PREFIX_MAP on the package directory with 
`py_package_preprocess()`:

'CFLAGS': '-fno-strict-overflow '
           '-Wsign-compare '
           '-DNDEBUG '
           '-g '
           '-O3 '
           '-Wall '
           '-O2 '
           '-g       '
           
'-fmacro-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2  '
           
'-fdebug-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2      
    '
           '-pipe  '
           '-O2 '
           '-g       '
           
'-fmacro-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2  '
           
'-fdebug-prefix-map=/build/path/unavailable/=/usr/src/debug/python3/3.13.2      
    '
           '-pipe',

There are still some 'prefix-map' stuff that is not properly being replaced 
because the do_install() task is
doing this sed expression `-e "s,${B},/build/path/unavailable/,g"`. We could 
probably move that to
`py_package_preprocess()` and remove DEBUG_PREFIX_MAP entries altogether. I can 
put a v2 doing
that if you agree with that.

________________________________________
De: Alexander Kanavin <[email protected]>
Enviado: miércoles, 19 de febrero de 2025 17:01
Para: Sanjuán García, Jorge
Cc: [email protected]
Asunto: Re: [OE-core] [PATCH] python3: Remove DEBUG_PREFIX_MAP from 
sysconfigdata

[No suele recibir correo electrónico de [email protected]. Descubra por 
qué esto es importante en https://aka.ms/LearnAboutSenderIdentification ]

On Wed, 19 Feb 2025 at 16:47, Sanjuán García, Jorge
<[email protected]> wrote:
> The reason I found this is beacause I was trying to do something that 
> required building python extensions on a host were the compilation flag 
> `-fcanon-prefix-map` was invalid as that was introduced with gcc13. However, 
> looking a bit deeper I realized that the sed expression is actually not doing 
> what it is meant to when removing DEBUG_PREFIX_MAP.
>

Apologies, but I don't fully understand what you say. You show how the
entry in sysconfigdata looks before and after without your patch, but
I am not seeing how it looks before and after *with* the patch.
Without it, it's really hard to understand what the problem is, and
how it is being fixed.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211755): 
https://lists.openembedded.org/g/openembedded-core/message/211755
Mute This Topic: https://lists.openembedded.org/mt/111268642/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

  • Re: [OE-core] [PAT... Sanjuán García , Jorge via lists . openembedded . org
    • Re: [OE-core]... Sanjuán García , Jorge via lists . openembedded . org

Reply via email to