esp8266 make error

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
Adixylian
Posts: 13
Joined: Thu Jan 21, 2016 7:21 pm

esp8266 make error

Post by Adixylian » Sat Apr 16, 2016 8:21 pm

Hello

I have succesfully installed esp-open-sdk, same with the micropython/unix ("make deplibs", "make"...)
I have all necessary packages installed, including xtensa-lx106.... At least I think so, otherwise it wouldn't be possible to install esp-open-sdk
So, I did all of that and cd --> micropython/esp8266
When I run "make" it asks me for administrator.
So I run "sudo make" and it this shows up:

micropython/esp8266$ sudo make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
make: xtensa-lx106-elf-gcc: Command not found
GEN build/genhdr/qstrdefs.generated.h
/bin/sh: 1: xtensa-lx106-elf-gcc: not found


Can somebody please help me
I am using Vagrant
Thank you

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: esp8266 make error

Post by dhylands » Sat Apr 16, 2016 9:21 pm

You need to add the directory which contains xtensa-lx106-elf-gcc into your PATH.

Adixylian
Posts: 13
Joined: Thu Jan 21, 2016 7:21 pm

Re: esp8266 make error

Post by Adixylian » Sat Apr 16, 2016 11:17 pm

Already done that, also rebooted and still nothing.
I have compiled esp8266 before, a few times. But since the last update of esp-open-sdk (week ago), this error cant go off for me

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: esp8266 make error

Post by dhylands » Sun Apr 17, 2016 12:52 am

The only reason for that error is that the program isn't in your PATH.

Either the PATH contains a spelling mistake or it is otherwise malformed, or perhaps the PATH wasn't exported.

Adixylian
Posts: 13
Joined: Thu Jan 21, 2016 7:21 pm

Re: esp8266 make error

Post by Adixylian » Sun Apr 17, 2016 8:15 am

So the problem was that, before I exported the xtensa.. in $PATH, I tried to "make" micropython/esp8266
When I fixed this with the $PATH, rebooted and tried again "make" in /esp8266, it still gave the same error

Fix: "make clean" and it works :D

And my $PATH was corrupted a little so I had to remove something.
It had xtensa-lx106-elf/xtensa-lx106-elf/xtensa-lx106-elf/xtensa-lx106-elf/bin.... Never seen that before haha

Thanks for your help, now the $PATH is as it should be and the problem is solved

User avatar
kfricke
Posts: 342
Joined: Mon May 05, 2014 9:13 am
Location: Germany

Re: esp8266 make error

Post by kfricke » Sun Apr 17, 2016 8:34 am

Smells like a VIM command repetition (number x entered before entering the command to insert the text passage -> insert repeted x times).

nui_de
Posts: 40
Joined: Fri Oct 23, 2015 3:27 pm

Re: esp8266 make error

Post by nui_de » Sun Jul 24, 2016 10:49 am

Hi,

I currently also get stuck with this... did the same as Adixylian but when trying to build:

~/micropython/esp8266$ sudo make axtls
...
make[1]: Verzeichnis „/home/nui/micropython/lib/axtls“ wird betreten
make -C crypto
make[2]: Verzeichnis „/home/nui/micropython/lib/axtls/crypto“ wird betreten
/bin/sh: 1: xtensa-lx106-elf-gcc: not found
make[2]: *** Keine Regel vorhanden, um das Ziel „.depend“,
benötigt von „all“, zu erstellen. Schluss.
...
echo $PATH
/home/nui/esp-open-sdk/xtensa-lx106-elf/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

so PATH looks fine... can also start xtensa-lx106-elf-gcc from everywhere what may I have missed???

jms
Posts: 108
Joined: Thu May 05, 2016 8:29 pm
Contact:

Re: esp8266 make error

Post by jms » Sun Jul 24, 2016 6:04 pm

DON'T use sudo. It's very very bad practice to use any privilege where not necessary (compilation is such a situation) and likely to mess with your environment and leave some files with ownership that will cause more problems.

nui_de
Posts: 40
Joined: Fri Oct 23, 2015 3:27 pm

Re: esp8266 make error

Post by nui_de » Sun Jul 24, 2016 6:55 pm

Thanks, I am not sure why I was prompted to use sudo - however I guess something is messed up, will try a clean
checkout...

warren
Posts: 74
Joined: Tue Jul 12, 2016 5:47 pm

Re: esp8266 make error

Post by warren » Sun Jul 24, 2016 7:21 pm

If you have a system where you are accustomed to having to SUDO to do some things, you might want to check this out:

Assuming you want to add modules to the firmware build, it works first time - the modules are added.

But then if you remove modules (from ESP8266/modules) or change the content of existing ones, those changes may NOT be reflected in your build - the firmware will still contain the previous mix of modules and the previous content.

This seems to happen if the 'make' command you type to build the firmware does not have the permissions to overwrite the previous build files. But it doesn't tell you this! It *seems* to work...

If I try to sudo make, I too get those errors.

To be absolutely sure I am getting the present module mix in /esp8266/modules I delete:

/esp8266/build/modules -- all the mpy files
/esp8266/build/build - all files

and in the /esp8266/build I delete:

all .bin files
firmware.elf
frozen.c
frozen.mpc

If you find that your modules are not being correctly written to the firmware, the above will almost certainly fix it - but of course it is a bit tedious...

Side note: this is a good example where those who write docs for these systems need to think out of the box and realise that not everyone has the same configuration as them, and there will be times when standard instructions are inadequate.... hence the forums I guess!

Post Reply