-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directory for tool is present, but tool was not found. NixOS linker path issue. Documentation or warning needed (IDFGH-12839) #13806
Comments
I'm not entirely sure but maybe https://github.com/mirrexagon/nixpkgs-esp-dev exist for this. Does this help you? Also there is this Wiki page: https://nixos.wiki/wiki/ESP-IDF As for ESP-IDF, we don't support oficially NixOS . |
Yes this github repository worked like a charm I don't know how I didn't find it, But thank you very much. It fixed other problems I was having. Would it be possible to add a warning in maybe the installation part of the documentation for NixOS? |
We try to keep it as simple as possible for new users. But this might change if more of our users will start to use NixOS. |
@ZXTube Could you help me a little, please?
Did you run export.sh already in nix-shell? I'm wondering how could we detect that the script is run in NixOS. Checking the presence of the |
No, I didn't need to enter any nix shell while installing it. Do you want to detect if the person is specially using NixOS or also if using nix on another OS? I think $NIX_PATH is there in NixOS and nix-shell (on a different OS) |
Hi, Yes, it seems that
Or maybe just check if
I have no hands on experience with the nix package manager though. |
Is your feature request related to a problem?
This is the output I get after running
idf_tools.py install
thenexport.sh
.This is happening mainly because I'm on NixOS and files aren't in their usual location. I don't know what else could cause this
And trying to run the binary files for example openocd only outputs
cannot execute: required file not found
which isn't at all helpfulAnd it took me way to much time to find out how to fix this.
Describe the solution you'd like.
So it would be very helpful if maybe documentation was added for that, or a warning is given when running
idf_tools.py install
in a nix environment or on NixOSCurrently how I solved this was just running
patchelf
on each binary file in these tools and setting the interpreter then adding into rpath any error it gives me for a not found librarye.g.
patchelf --set-interpreter /nix/store/qn3ggz5sf3hkjs2c797xf7nan3amdxmp-glibc-2.38-27/lib/ld-linux-x86-64.so.2 openocd
./openocd
-->./openocd: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory
find -iname 'libudev.so.1' /nix/store
pick anything that is foundpatchelf --set-rpath "/nix/store/2m7fcpn68c5pq6zby22xddsv5hwx1x67-steam-fhs/usr/lib64/" openocd
./openocd
--> output indicating it's workingOpen On-Chip Debu...
I have no idea if there are better ways to solve this and I have little experience so anything that would at least inform people if they have the same problem I have would be very appreciated.
Thanks in advance.
Describe alternatives you've considered.
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered: