esp-open-sdk build error - python is missing or unusable (debian)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
gojimmypi
Posts: 36
Joined: Wed Mar 02, 2016 8:01 pm
Contact:

esp-open-sdk build error - python is missing or unusable (debian)

Post by gojimmypi » Thu May 26, 2016 12:32 am

I'll start with the solution. I needed to:

Code: Select all

sudo apt-get install python2.7-dev
(that apparently did not need to previously be installed, as I was able to compile prior to recent updates)

Now for the problem (in case others search for it).

I had the previous compile working... for quite some time... but this new one turned out to be a bit more challenging for me. I purged all of the old stuff - wiping out the esp-open-sdk completely. I then fetch & compile like this:

Code: Select all

cd ~/workspace/esp-open-sdk
make clean
git pull
git submodule sync
git submodule update --init
make
all goes well, but then I would get an error like this when almost done:

Code: Select all

[INFO ]  Installing C library
[INFO ]  Installing C library: done in 42.67s (at 12:09)
[INFO ]  =================================================================
[INFO ]  Installing final gcc compiler
[INFO ]  Installing final gcc compiler: done in 412.31s (at 19:01)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[ERROR]    configure: error: python is missing or unusable
[ERROR]    make[4]: *** [configure-gdb] Error 1
[ERROR]    make[3]: *** [all] Error 2
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing cross-gdb'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_debug_gdb_build[scripts/build/debug/300-gdb.sh@120]
[ERROR]  >>        called from: do_debug[scripts/build/debug.sh@35]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@646]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      'share/doc/crosstool-ng/crosstool-ng-1.22.0-55-gecfc19a/B - Known issues.txt'
[ERROR]
[ERROR]  (elapsed: 20:14.68)
[20:15] / ct-ng:152: recipe for target 'build' failed
There's nothing related in the known issues file. The build.log has the basically the same log file info displayed, but with an additional note just before the error that has a "no" for python2.7:

Code: Select all

[ALL  ]    checking for XML_StopParser... yes
[ALL  ]    checking whether to use python... yes
[ALL  ]    checking for python... /usr/bin/python
[ALL  ]    checking for python2.7... no
[ERROR]    configure: error: python is missing or unusable
[ALL  ]    Makefile:8724: recipe for target 'configure-gdb' failed
[ERROR]    make[4]: *** [configure-gdb] Error 1
Here's my python info:

Code: Select all

me@mymachine:~$ apt-cache policy python
python:
  Installed: 2.7.9-1
  Candidate: 2.7.9-1
  Version table:
 *** 2.7.9-1 0
        500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status
me@mymachine:~$ apt-cache policy python3
python3:
  Installed: 3.4.2-2
  Candidate: 3.4.2-2
  Version table:
 *** 3.4.2-2 0
        500 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
        100 /var/lib/dpkg/status
if I launch python, it seems to work, and the default is v2.7:

Code: Select all

$ python
Python 2.7.9 (default, Mar  1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "hello world"
hello world
it is not python that was a problem, but the missing python2.7-dev !

and so I've updated my building script described here: http://forum.micropython.org/viewtopic. ... 9769#p9769 or more specifically on github here https://github.com/gojimmypi/build_esp8266 - those are my own instructions & notes! the official build instructions are here: http://forum.micropython.org/viewtopic.php?f=16&t=1689

@pfalcon - perhaps the python2.7-dev could be added here: https://github.com/pfalcon/esp-open-sdk as well?

hopefully this helps someone...

btw the official build instructions are here: http://forum.micropython.org/viewtopic.php?f=16&t=1689

ideal2545
Posts: 12
Joined: Tue May 17, 2016 9:08 am

Re: esp-open-sdk build error - python is missing or unusable (debian)

Post by ideal2545 » Thu May 26, 2016 3:45 am

It seems this issue just started happening with some recent change for sure, I've been building it for a little while now and all of a sudden this happened to me yesterday. i also had to install something else for the first time... can't think of the name now.

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: esp-open-sdk build error - python is missing or unusable (debian)

Post by platforma » Thu May 26, 2016 12:31 pm

Just hit the same problem after reading your post and trying to update sdk. Looking at the error log, cross-gdb does indeed need some python headers. I don't know if this happened since the last gcc update in crosstool-NG or there's another reason.

User avatar
Roberthh
Posts: 1469
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: esp-open-sdk build error - python is missing or unusable (debian)

Post by Roberthh » Thu May 26, 2016 8:22 pm

I ran into the problem too.

Code: Select all

make PYTHON=python3
fixed it for me.

PinkInk
Posts: 61
Joined: Tue Mar 11, 2014 3:42 pm

Re: esp-open-sdk build error - python is missing or unusable (debian)

Post by PinkInk » Fri May 27, 2016 1:11 am

Installing python2.7-dev fixed it for me on latest Ubuntu

Tim

Post Reply