-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
macOS setup fails to build for lack of "elftools" Python package #23165
Comments
Also maybe worth noting is that installing
|
OK, even after installing
|
I was able to work around this by adding |
@snej I just went through the procedure myself and did not find any issues. The package required is actually called I suspect your initial installation of @mbolivar can you think of another reason for this to fail based on the logs pasted by @snej? EDIT: I see that your brew
EDIT 2: Actually, I do have a Python 3 there:
I wonder if there's some collision with Catalina's built-in |
Re-labeling as a question since this does not seem to be an actual issue with our requirements file. |
As described in my comment above, this is really not required. Could you please try removing those extra lines from |
Hmm ... |
I know I got an error while installing HomeBrew packages, resolved it, and repeated the command. I don't recall an error running |
Indeed, sorry for the noise.
I see, then I am out of ideas. I really don't know what happened there. I assume you cannot reproduce it either? |
I can't think of a way to reproduce it without first erasing my entire HomeBrew or Python3 setup (which I cannot do because I have plenty of other stuff dependent on those) or finding another Mac to install Zephyr on (I do have an iMac, but I can't upgrade it to Catalina as I have music software on it that isn't compatible.) |
@snej are you using virtualenv or similar? I was googling for previous occurrences of this problem and found this: EDIT: Just to make sure, you didn't use |
I would try to reproduce in a virtualenv. The package is definitely 'pyelftools', not 'elftools', and it sounds like there might be a lot going on in the homebrew environment that could be complicating things. If it doesn't repro in a virtualenv, then I have no idea either about what happened the first time. I've set up macs from scratch before and |
I actually managed to get a clean macOS machine and run the whole procedure locally. Everything worked as expected, with no issues, except for this (seemingly harmless) error message:
The error above appeared but all the actual python dependencies were indeed installed correctly. Googling a bit didn't really help much, so I don't know why this appeared. Since I now tried on a clean machine, running Catalina, and no Zephyr-attributable issues were found, I will close this issue. |
I had the same issue after a fresh install and solved it by |
If you have this issue, make sure your local python version is the same as the one west uses, then reinstall the requirements. In my case, my shell was using Python 3.9 (which means all dependencies were installed for 3.9) but west 3.10. |
I also fixed this issue after struggling .. basically for me I had python3.7 and python3.9 installed .. so zephyr was trying to use 3.9 and missed pyelftools. installing with pip3 shows success but eventually fail to compile the I did this "pip3.9 install pyelftools" and it worked :D |
Describe the bug
I'm just getting started, on macOS 10.15. I installed the latest GCC-ARM toolchain as directed.
However, building fails due to lack of the Python
elftools
package. This package should be added torequirements.txt
, or at least mentioned on the 3rd-party-toolchains page if it's specific to using the GCC toolchain.To Reproduce
west build -b bbc_microbit samples/basic/blinky
Expected behavior
The "blinky" program builds.
Impact
Can't build anything, without digging through Python exception dumps looking for clues.
Screenshots or console output
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: