Skip to contentSkip to conversation

Arch Linux - Python Newer than Recommend i.e. post 3.12

DISCUSSION Nicholas Krause 4 participants 7 messages Feb 5 – Feb 22

lore
Share & tools
lore
#0 lore raw

Greetings,
I'm getting this on Arch:
bitbake core-image-full-cmdline
Traceback (most recent call last):
File "/home/npkrause/poky/bitbake/bin/bitbake", line 36, in <module>

    sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
             ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                          cookerdata.CookerConfiguration()))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/home/npkrause/poky/bitbake/lib/bb/main.py", line 378, in
bitbake_main
return ui_module.main(server_connection.connection,
server_connection.events,

~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                          configParams)
                          ^^^^^^^^^^^^^
  File "/home/npkrause/poky/bitbake/lib/bb/ui/knotty.py", line 415, in main
    params.updateToServer(server, os.environ.copy())
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/home/npkrause/poky/bitbake/lib/bb/cookerdata.py", line 75, in
updateToServer
raise Exception("Unable to update the server configuration with
local parameters: %s" % error)
Exception: Unable to update the server configuration with local parameters: Traceback (most recent call last):
File "/home/npkrause/poky/bitbake/lib/bb/command.py", line 90, in
runCommand
result = command_method(self, commandline)
File "/home/npkrause/poky/bitbake/lib/bb/command.py", line 286, in
updateConfig
command.cooker.updateConfigOpts(options, environment, cmdline) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/npkrause/poky/bitbake/lib/bb/cooker.py", line 535, in
updateConfigOpts

    self.reset()
    ~~~~~~~~~~^^
  File "/home/npkrause/poky/bitbake/lib/bb/cooker.py", line 1775, in reset
    self.handlePRServ()
    ~~~~~~~~~~~~~~~~~^^
  File "/home/npkrause/poky/bitbake/lib/bb/cooker.py", line 437, in 
handlePRServ
    self.hashserv.serve_as_process()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/npkrause/poky/bitbake/lib/bb/asyncrpc/serv.py", line 280, 
in serve_as_process
    self.process.start()
    ~~~~~~~~~~~~~~~~~~^^

File "/usr/lib/python3.14/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.14/multiprocessing/context.py", line 224, in
_Popen

    return _default_context.get_context().Process._Popen(process_obj)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^

File "/usr/lib/python3.14/multiprocessing/context.py", line 300, in
_Popen
return Popen(process_obj)
File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line
35, in __init__

    super().__init__(process_obj)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3.14/multiprocessing/popen_fork.py", line 20, in 
__init__
    self._launch(process_obj)
    ~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line 
47, in _launch
    reduction.dump(process_obj, buf)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^

_pickle.PicklingError: Can't pickle local object <function AsyncServer.serve_as_process.<locals>.run at 0x7fea88598a90> when serializing dict item '_target'
when serializing multiprocessing.context.Process state

Due to being on Python 3.14. I would prefer not to have to use a backwards supported penv for Yocto alone. Does anyone have any experience with working on Arch and how to avoid these issues without either dealing with penv or yay for getting a older version of python, pre 3.12 I believe. Thanks,
Nick

#1 lore raw

Which version of yocto/bitbake are you using? Can you check if the issue triggers on latest master of bitbake/oe-core?

Alex

Quoted 95 lines · Nicholas Krause via lists.yoctoproject.org

Greetings,
I'm getting this on Arch:
bitbake core-image-full-cmdline
Traceback (most recent call last):
File "/home/npkrause/poky/bitbake/bin/bitbake", line 36, in <module>

     sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
              ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                           cookerdata.CookerConfiguration()))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/home/npkrause/poky/bitbake/lib/bb/main.py", line 378, in
bitbake_main
return ui_module.main(server_connection.connection,
server_connection.events,

~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                           configParams)
                           ^^^^^^^^^^^^^
   File "/home/npkrause/poky/bitbake/lib/bb/ui/knotty.py", line 415, in main
     params.updateToServer(server, os.environ.copy())
     ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/home/npkrause/poky/bitbake/lib/bb/cookerdata.py", line 75, in
updateToServer
raise Exception("Unable to update the server configuration with
local parameters: %s" % error)
Exception: Unable to update the server configuration with local
parameters: Traceback (most recent call last):
File "/home/npkrause/poky/bitbake/lib/bb/command.py", line 90, in
runCommand
result = command_method(self, commandline)
File "/home/npkrause/poky/bitbake/lib/bb/command.py", line 286, in
updateConfig
command.cooker.updateConfigOpts(options, environment, cmdline) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/npkrause/poky/bitbake/lib/bb/cooker.py", line 535, in
updateConfigOpts

     self.reset()
     ~~~~~~~~~~^^
   File "/home/npkrause/poky/bitbake/lib/bb/cooker.py", line 1775, in reset
     self.handlePRServ()
     ~~~~~~~~~~~~~~~~~^^
   File "/home/npkrause/poky/bitbake/lib/bb/cooker.py", line 437, in
handlePRServ
     self.hashserv.serve_as_process()
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
   File "/home/npkrause/poky/bitbake/lib/bb/asyncrpc/serv.py", line 280,
in serve_as_process
     self.process.start()
     ~~~~~~~~~~~~~~~~~~^^

File "/usr/lib/python3.14/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
~~~~~~~~~~~^^^^^^
File "/usr/lib/python3.14/multiprocessing/context.py", line 224, in
_Popen

     return _default_context.get_context().Process._Popen(process_obj)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^

File "/usr/lib/python3.14/multiprocessing/context.py", line 300, in
_Popen
return Popen(process_obj)
File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line
35, in __init__

     super().__init__(process_obj)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
   File "/usr/lib/python3.14/multiprocessing/popen_fork.py", line 20, in
__init__
     self._launch(process_obj)
     ~~~~~~~~~~~~^^^^^^^^^^^^^
   File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line
47, in _launch
     reduction.dump(process_obj, buf)
     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.14/multiprocessing/reduction.py", line 60, in dump
     ForkingPickler(file, protocol).dump(obj)
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^

_pickle.PicklingError: Can't pickle local object <function AsyncServer.serve_as_process.<locals>.run at 0x7fea88598a90> when serializing dict item '_target'
when serializing multiprocessing.context.Process state

Due to being on Python 3.14. I would prefer not to have to use a backwards supported penv for Yocto alone. Does anyone have any experience with working on Arch and how to avoid these issues without either dealing with penv or yay for getting a older version of python, pre 3.12 I believe.
Thanks,
Nick

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#66220): https://lists.yoctoproject.org/g/yocto/message/66220
Mute This Topic: https://lists.yoctoproject.org/mt/117647566/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
In reply to Nicholas Krause
Quoted 5 lines · Nicholas Krause via lists.yoctoproject.org

_pickle.PicklingError: Can't pickle local object <function AsyncServer.serve_as_process.<locals>.run at 0x7fea88598a90> when serializing dict item '_target'
when serializing multiprocessing.context.Process state

Due to being on Python 3.14. I would prefer not to have to use a backwards supported penv for Yocto alone. Does anyone have any experience with working on Arch and how to avoid these issues without either dealing with penv or yay for getting a older version of python, pre 3.12 I believe.

There’s a number of fixes for the 3.14 changes to multiprocessing in git, so you likely need to backport those. What version of Yocto are you using?

Ross

#3 lore raw

Greetings,
I'm on kirkenstone currently. So backporting the patches is probably best. However, what's the longterm strategy around this as its been a program for several years on more bleeding edge distributions i.e. Arch? Even when were talking mainline its a problem with Arch sometimes.

Thanks,
Nick

Quoted 11 lines · Ross Burton
Quoted 5 lines · Nicholas Krause via lists.yoctoproject.org

_pickle.PicklingError: Can't pickle local object <function AsyncServer.serve_as_process.<locals>.run at 0x7fea88598a90> when serializing dict item '_target'
when serializing multiprocessing.context.Process state

Due to being on Python 3.14. I would prefer not to have to use a backwards supported penv for Yocto alone. Does anyone have any experience with working on Arch and how to avoid these issues without either dealing with penv or yay for getting a older version of python, pre 3.12 I believe.

There’s a number of fixes for the 3.14 changes to multiprocessing in git, so you likely need to backport those. What version of Yocto are you using?

Ross

#4 lore raw

When I've built on Arch, I've installed a buildtools tarball to work around Python versions, and it has worked well for me. Here's the relevant section of the manual:

https://docs.yoctoproject.org/ref-manual/system-requirements.html#required-git-tar-python-make-and-gcc-versions

Quoted 2 lines

However, what's the longterm strategy around this as its been a program for several years on more bleeding edge distributions i.e. Arch?

The manual states that they are unsupported, but that's not entirely true, since you can use the buildtools tarball. Relevant section of the manual is the note in the section on supported Linux distributions:

https://docs.yoctoproject.org/ref-manual/system-requirements.html#supported-linux-distributions

I've also been meaning to try Distrobox (https://distrobox.it), which looks like it might make the workflow easier when running officially supported distributions via a container.

Hope that helps!

Cheers,
Hugh

________________________________

Disclaimer Notice: This email, and any attachments (if any), may contain proprietary, privileged and/or confidential information. Unless you are specifically authorized to do so, you may not use, copy, or disclose to anyone this email message or any information contained herein. If you are not the intended recipient of this message, be aware that any use, disclosure, review, or reproduction of this message is strictly prohibited. If you received this message in error, please contact the sender, and promptly delete this message.

#5 lore raw
In reply to Nicholas Krause

Greetings,
Pinging this email as its been a few weeks and not sure if the patches have been backported.

Thanks,
Nick

Quoted 19 lines · Nicholas Krause

Greetings,
I'm on kirkenstone currently. So backporting the patches is probably best. However, what's the longterm strategy around this as its been a program for several years on more bleeding edge distributions i.e. Arch? Even when were talking mainline its a problem with Arch sometimes.

Thanks,
Nick

Quoted 11 lines · Ross Burton
Quoted 5 lines · Nicholas Krause via lists.yoctoproject.org

_pickle.PicklingError: Can't pickle local object <function AsyncServer.serve_as_process.<locals>.run at 0x7fea88598a90> when serializing dict item '_target'
when serializing multiprocessing.context.Process state

Due to being on Python 3.14. I would prefer not to have to use a backwards supported penv for Yocto alone. Does anyone have any experience with working on Arch and how to avoid these issues without either dealing with penv or yay for getting a older version of python, pre 3.12 I believe.

There’s a number of fixes for the 3.14 changes to multiprocessing in git, so you likely need to backport those. What version of Yocto are you using?

Ross

#6 lore raw

Greetings,
Please forget. I've switched to scrathgap which works fine. Kirkenstone is frozen so I would not worry about my previous concerns.

Nick

Quoted 27 lines · Nicholas Krause

Greetings,
Pinging this email as its been a few weeks and not sure if the patches have been backported.

Thanks,
Nick

Quoted 19 lines · Nicholas Krause

Greetings,
I'm on kirkenstone currently. So backporting the patches is probably best. However, what's the longterm strategy around this as its been a program for several years on more bleeding edge distributions i.e. Arch? Even when were talking mainline its a problem with Arch sometimes.

Thanks,
Nick

Quoted 11 lines · Ross Burton
Quoted 5 lines · Nicholas Krause via lists.yoctoproject.org

_pickle.PicklingError: Can't pickle local object <function AsyncServer.serve_as_process.<locals>.run at 0x7fea88598a90> when serializing dict item '_target'
when serializing multiprocessing.context.Process state

Due to being on Python 3.14. I would prefer not to have to use a backwards supported penv for Yocto alone. Does anyone have any experience with working on Arch and how to avoid these issues without either dealing with penv or yay for getting a older version of python, pre 3.12 I believe.

There’s a number of fixes for the 3.14 changes to multiprocessing in git, so you likely need to backport those. What version of Yocto are you using?

Ross