Open lukash opened 7 months ago
@prusnak was telling me to go ahead and drop python38, and so I did. The ball is in his court.
In my situation, it is:
$ arm-none-eabi-gdb
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "/nix/store/p4g8jhmqsx6wqzy70n8mxr965hndj4fs-python3-3.9.19/lib/python3.9/site.py", line 73, in <module>
import os
File "/nix/store/p4g8jhmqsx6wqzy70n8mxr965hndj4fs-python3-3.9.19/lib/python3.9/os.py", line 29, in <module>
from _collections_abc import _check_methods
File "/nix/store/p4g8jhmqsx6wqzy70n8mxr965hndj4fs-python3-3.9.19/lib/python3.9/_collections_abc.py", line 12, in <module>
GenericAlias = type(list[int])
TypeError: 'type' object is not subscriptable
I add the same issue.
If you bump the package version to '13.3.rel1', it works for arm-none-eabi-gdb
but not for arm-none-eabi-gdb-py
. Because arm-none-eabi-gdb-py
still relies on python3.8. If you do not use gdb python like with the gef extension, gdb will work.
The other alternative is to use the gdb package that seems to be built for multiarch by default
The other alternative is to use the gdb package that seems to be built for multiarch by default
Unfortunately that doesn't work as if I try to have both the gcc-arm-embedded-13
& gdb
in home-manager packages I get:
ome-manager switch --flake nix/#$USER
warning: Git tree '/home/maks/nix' is dirty
error: builder for '/nix/store/pvcj3kfai9xxblj5gw7xih5ga7ckn260-home-manager-path.drv' failed with exit code 255;
last 1 log lines:
> error: collision between `/nix/store/wyqn0j2ly4w4mvpyfmkjnp48d9ax70f7-gdb-15.1/include/gdb/jit-reader.h' and `/nix/store/wzc93rl44c9vd55zmpgks1wyfzjr9p9k-gcc-arm-embedded-13.2.rel1/include/gdb/jit-reader.h'
For full logs, run 'nix-store -l /nix/store/pvcj3kfai9xxblj5gw7xih5ga7ckn260-home-manager-path.drv'.
error: 1 dependencies of derivation '/nix/store/2n85g8rslnagya98sa6dsfd3ljm2dibc-home-manager-generation.drv' failed to build
With the suggestion about bumping the package version to 13.3.re1
how would I do that? (sorry I'm very new to Nix) note per above I pasted, I got 13.2.rel1
when I used gcc-arm-embedded-13
package.
package version to
13.3.re1
how would I do that
I updated the version to 13.3.rel1
in https://github.com/NixOS/nixpkgs/pull/339744 but still the same issue persists (the binaries built by arm are still tied to python3.8 which we do not have in nixpkgs anymore).
Immediate solution for me was just to have gdb installed as a package and for building the project run nix-shell -p gcc-arm-embedded
in a different terminal to the one used for GDB and then run make to compile the project.
A comment on another issue (https://github.com/NixOS/nixpkgs/issues/299754#issuecomment-2025419464) suggests this workaround:
As a workaround, you can use
pkgsCross.arm-embedded.buildPackages.gdb
instead ofgcc-arm-embedded
Hi,
I have the same problem. For me this issue is resolved by just using gcc-arm-embedded-10: This does not have any python dependencies.
IMO the solution should be to remove the python dependency altogether from gcc-arm-embedded if it is not required.
IMO the solution should be to remove the python dependency altogether from gcc-arm-embedded if it is not required.
It is required for arm-none-eabi-gdb-py
IMO the solution should be to remove the python dependency altogether from gcc-arm-embedded if it is not required.
It is required for
arm-none-eabi-gdb-py
But not for arm-none-eabi-gdb
. Currently the package is broken for users who do not need python support.
I am new to nix, but is there an option to build the package either with or without python support?
Got it. I removed the Python scripting for GDB in https://github.com/NixOS/nixpkgs/pull/352408
@mfiumara Can you please try whether GDB works for you using the package from the PR?
Got it. I removed the Python scripting for GDB in #352408
@mfiumara Can you please try whether GDB works for you using the package from the PR?
How can I test this?
But what if one needs python support? (I do)
But what if one needs python support? (I do)
It makes sense if the package would build the same version as what arm-none-eabi-gdb-py is built for. So it seems python3.8.
But what if one needs python support? (I do)
Then you are free to go and fix it (currently it does not work at all either).
Describe the bug
Importing Python's
subprocess
module in a gdb python script fails with an import error.Note this is before
python38
removal, nowarm-none-eabi-gdb
is broken altogether as reported in https://github.com/NixOS/nixpkgs/issues/299754.Steps To Reproduce
Expected behavior
Importing the
subprocess
module works without error.Notify maintainers
@mweinelt @prusnak
Metadata
Add a :+1: reaction to issues you find important.