Skip to content
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

Initial make fails with error about Python #15

Open
riban-bw opened this issue Nov 6, 2023 · 1 comment
Open

Initial make fails with error about Python #15

riban-bw opened this issue Nov 6, 2023 · 1 comment

Comments

@riban-bw
Copy link

riban-bw commented Nov 6, 2023

Following the build instructions in the README I get the following error:

make: Entering directory '/home/brian/projects/libopencm3_test/libopencm3'
  GENHDR  include/libopencm3/stm32/f0/irq.json
/usr/bin/env: ‘python’: No such file or directory
make: *** [Makefile:59: include/libopencm3/stm32/f0/irq.json.genhdr] Error 127
make: Leaving directory '/home/brian/projects/libopencm3_test/libopencm3'

I wonder whether this is due to the build process depending on Python2 which is now obsolute. Python3 executables tend to be called python3 whereas Python2 were just called python. (It is a shame that distros haven't yet changed the default name / alias for python=>python3.)

I see there are many scripts that have #!/usr/bin/env python. Updating each of these to use python3 advances the build but still failures:

make[1]: arm-none-eabi-gcc: No such file or directory

It looks like the cross compiler installed on my system differs (in location?) from that expected by the build system. Maybe the README should describe this dependancy?

@karlp
Copy link
Member

karlp commented Nov 6, 2023

libopencm3 (still) supports both python2 and python3, and followed the python PEPs for doing so, using a "python" name. If you're on a debian style distro, there's a "python-is-python3" package you can install. (you can also of course actually install python2 again, though I don't really recommend that)

arm-none-eabi-gcc is not in your path. That's something only you can fix, but you're right, this template repository doesn't have a full library readme, as it's more intended as a template for your own project readme. You can try following the upstream library readme instead: https://github.com/libopencm3/libopencm3/ I'm leaving this open to link better to the expected initial situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants