Open Sashkoiv opened 5 years ago
Change line 193 at: esp-open-sdk/crosstool-NG/configure.ac
like this:
|$EGREP '^GNU bash, version ([0-9\.]+)')
then run make again
p/s: this image is wrong
([0-9\.]+)
, not ([0-9.]+)
I can confirm this error on systems with bash version 5+
thanks vin for the heads up. I hope that pfalcon can fix it in the code, as it is unable to build without editing the config file. Also, libtool-bin is needed and libexpat-dev is now libexpat1-dev in debian 10+
fixed upstream https://github.com/jcmvbkbc/crosstool-NG/pull/56
Can confirm error on Debian 10, can confirm that the fix work
Change line 193 at: esp-open-sdk/crosstool-NG/configure.ac like this: |$EGREP '^GNU bash, version ([0-9\.]+)') then run make again
p/s: this image is wrong
([0-9\.]+)
, not([0-9.]+)
@vinhjaxt Thank you! works on raspbian too
Same error on Arch Linux
I just changed: |$EGREP '^GNU bash, version (3.[1-9]|4)') to |$EGREP '^GNU bash, version (3.[1-9]|4|5)')
Trying to install this on WSL + ubuntu. jcable's fix worked for me.
Change line 193 at: esp-open-sdk/crosstool-NG/configure.ac like this: |$EGREP '^GNU bash, version ([0-9\.]+)') then run make again
p/s: this image is wrong
([0-9\.]+)
, not([0-9.]+)
(3.[1-9]|4|5|6|7) may be
now that i figured it's required to use this sdk to build pycopy for esp8266 it's not in usable state 😢
now that i figured it's required to use this sdk to build pycopy for esp8266 it's not in usable state cry
esp-open-sdk build and then pycopy esp8266 build using it is fine, as exemplified by pycopy CI builds: https://github.com/pfalcon/pycopy/runs/1457821945 .
Maybe it's not fine on some overmodern distros, which is sad, but there's a choice of not falling for overmodern distros, or use docker, etc. When I fall myself for overmodern distros (it happens to everyone eventually, but the keyword is exactly "eventually"), I'll fix it here (can't fix not seeing an issue, right?). Until then, good people above gave hints how to fix it on your side.
not sure what you are trying to say by "overmodern distros" - i am using osx
which is said to be pretty common. micropython
is well supporting this platform so i dont mind closing this instead of fixing an issue reported multiple times here 🤡
i am using osx
And I'm not using osx, sorry.
nevermind i get the spirit around here.
Same error on Ubuntu 20.04. Fix from vinhjaxt works.
I guess a better solution now is described in ticket https://github.com/pfalcon/esp-open-sdk/issues/380
Update crosstools-ng as this solves additional problems.
I guess a better solution now is described in ticket #380
Update crosstools-ng as this solves additional problems.
This almost worked for me on Ubuntu 20.04. I also had to copy over the local-patches
directory from the old Crosstool-NG.
But now I get this after the script runs for a while:
make[2]: Entering directory '/home/ray/esp-open-sdk/crosstool-NG'
make[2]: *** No rule to make target 'xtensa-lx106-elf'. Stop.
make[2]: Leaving directory '/home/ray/esp-open-sdk/crosstool-NG'
make[1]: *** [../Makefile:135: _toolchain] Error 2
make[1]: Leaving directory '/home/ray/esp-open-sdk/crosstool-NG'
make: *** [Makefile:131: crosstool-NG/.built] Error 2
With @vinhjaxt I get further (I think?) Now it fails here:
./ct-ng build
make[2]: Entering directory '/home/ray/esp-open-sdk/crosstool-NG'
[INFO ] Performing some trivial sanity checks
[INFO ] Build started 20210513.173214
[INFO ] Building environment variables
[INFO ] =================================================================
[INFO ] Retrieving needed toolchain components' tarballs
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: do_expat_get[scripts/build/companion_libs/210-expat.sh@12]
[ERROR] >> called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@591]
[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-60-g37b07f6f-dirty/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 0:12.61)
[00:13] / make[2]: *** [ct-ng:152: build] Error 1
make[2]: Leaving directory '/home/ray/esp-open-sdk/crosstool-NG'
make[1]: *** [../Makefile:139: _toolchain] Error 2
make[1]: Leaving directory '/home/ray/esp-open-sdk/crosstool-NG'
make: *** [Makefile:131: crosstool-NG/.built] Error 2
In build.log it looks like the problem is downloading a file.
[EXTRA] Retrieving 'expat-2.1.0'
[DEBUG] Trying 'http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz'
[DEBUG] ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--progress=dot:binary' '-T' '10' '-O' '/home/ray/esp-open-sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tar.gz.tmp-dl' 'http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz'
[ALL ] --2021-05-13 17:32:25-- http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz
[ALL ] Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.105.38.13
[ALL ] Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.105.38.13|:80... connected.
[ALL ] HTTP request sent, awaiting response... 404 Not Found
[ALL ] 2021-05-13 17:32:25 ERROR 404: Not Found.
Tries a bunch more URLs, then eventually...
[DEBUG] Not at this location: "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.zip"
[DEBUG] Trying 'http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0'
[DEBUG] ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--progress=dot:binary' '-T' '10' '-O' '/home/ray/esp-open-sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tmp-dl' 'http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0'
[ALL ] --2021-05-13 17:32:27-- http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0
[ALL ] Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.105.38.13
[ALL ] Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.105.38.13|:80... connected.
[ALL ] HTTP request sent, awaiting response... 404 Not Found
[ALL ] 2021-05-13 17:32:27 ERROR 404: Not Found.
[ALL ]
[DEBUG] Not at this location: "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0"
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: do_expat_get[scripts/build/companion_libs/210-expat.sh@12]
[ERROR] >> called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@591]
[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-60-g37b07f6f-dirty/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 0:12.61)
Wait lol I found the problem. https://sourceforge.net/projects/expat/files/expat/2.1.0
They renamed it to expat-2.1.0-RENAMED-VULNERABLE-PLEASE-USE-2.3.0-INSTEAD
And this is why applications that auto-download files should always cheek for the latest version of things. eyerolls
Trouble is I have no clue how to tell the script where to find the new one. I don't know anything about makefiles other than how to edit specific lines in a template that are commented "Put your libraries and app name here", etc.
Alright, think I've finally got it working!
In total here's what I did that finally worked (using Ubuntu 20.04 WSL)
sudo apt install <dependencies found in Readme>
git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
rm -rf crosstool-NG
git clone https://github.com/jcmvbkbc/crosstool-NG
cd crosstool-NG
git checkout xtensa-1.22.x
code scripts/build/companion_libs/210-expat.sh
Using code, nano, or your editor of choice, add EXPVERS="2.3.0"
to the start of the file.
Everywhere where it says ${CT_EXPAT_VERSION}
, replace with ${EXPVERS}
Probably a better way to do this, but this worked.
cd ..
build
And finished!
Note: I did also have to tweak some of the dependencies specified in the Readme since some packages weren't found or are installed under a different command (ex python2 rather than python), but nothing too difficult to fix.
@Pecacheu - Version 2.3.0 of Expat is now removed from sourceforge due to exploits on that version, so best to switch to 2.4.1.... more eyes rolling ?
In addition to the issues described above, I had to fix some other things to get this to build on Ubuntu 21.10. The end result (which gets me a clean build on Ubuntu 21.10 of an apparently working toolchain) can be found here:
https://github.com/pfalcon/esp-open-sdk/pull/391 https://github.com/ChrisMacGregor/esp-open-sdk/tree/builds-on-Ubuntu-21.10 Tarball of built toolchain: https://github.com/ChrisMacGregor/esp-open-sdk/releases/tag/builds-on-Ubuntu-21.10
Note that I'm using expat 2.1.0; the comments above suggest that expat 2.4.1 is a drop-in replacement, and (so far) it has not been pulled for security issues. So you might want to do that differently than I did.
Change line 193 at: esp-open-sdk/crosstool-NG/configure.ac like this: |$EGREP '^GNU bash, version ([0-9\.]+)') then run make again
p/s: this image is wrong
([0-9\.]+)
, not([0-9.]+)
This worked for me. Only I switched the
|$EGREP '^GNU bash, version ([0-9\.]+)')
line 193 with
|$EGREP '^GNU bash, version (5\.[1-9]|4)')
Since I am running bash 5+ (to be more specific 5.1.16)
telling it where to find it in the Makefile worked for me:
~/esp-open-sdk$ nl Makefile | grep "with-bash"
124 ./configure --prefix=pwd
--with-bash=/usr/bin/bash
Ubuntu 18 appears after
make
command for the solution follow the link https://bbs.archlinux.org/viewtopic.php?id=244333