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

esp-open-sdk uses crosstools-NG that recognizes versions of bash only up to 4.x #380

Open
dbetz opened this issue Sep 4, 2020 · 7 comments

Comments

@dbetz
Copy link

dbetz commented Sep 4, 2020

esp-open-sdk fails to build on recent versions of Ubuntu that include bash 5.0.17(1)-release. This is because the configure.ac script for the included version of crosstools-NG only recognizes versions of bash up to 4. Please update crosstools-NG to allow more recent versions of bash.

Thanks for your work on this project. It's very helpful.

@drawkula
Copy link

drawkula commented Sep 4, 2020

Try...

(yeti@kumari:6)/opt/esp-open-sdk$ cd crosstool-NG/
(yeti@kumari:6)/opt/esp-open-sdk/crosstool-NG$ git diff
diff --git a/configure.ac b/configure.ac
index 5d512fe8..872a73de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,7 +190,7 @@ AC_CACHE_VAL([ac_cv_path__BASH],
 AC_CACHE_CHECK([for bash >= 3.1], [ac_cv_path__BASH],
     [AC_PATH_PROGS_FEATURE_CHECK([_BASH], [bash],
         [[_BASH_ver=$($ac_path__BASH --version 2>&1 \
-                     |$EGREP '^GNU bash, version (3\.[1-9]|4)')
+                     |$EGREP '^GNU bash, version (3\.[1-9]|4|5)')
           test -n "$_BASH_ver" && ac_cv_path__BASH=$ac_path__BASH ac_path__BASH_found=:]],
         [AC_MSG_RESULT([no])
          AC_MSG_ERROR([could not find bash >= 3.1])])])

...™works for me™ on Debian10.

...ok...

          AC_MSG_ERROR([could not find bash >= 3.1])])])

...needs an update too... somewhen... mayhaps... ॐmmmmmm... ;-)

_o/"

@dbetz
Copy link
Author

dbetz commented Sep 4, 2020

Yes, I did that. I just thought it would be helpful if that change was made in the repository.

@pfalcon pfalcon changed the title crosstools-NG/configure.ac esp-open-sdk uses crosstools-NG that recognizes versions of bash only up to 4.x Sep 6, 2020
@pfalcon
Copy link
Owner

pfalcon commented Sep 6, 2020

Thanks for the report. It's a matter of fact that I don't maintain esp-open-sdk anymore, and it stays in a static, known-working (with the tools of its generation) shape. So, I unlikely will update this repo to a newer crosstools-NG version, as then someone would need to re-triage "known working" status, and that's not easy.

(I do however still rename tickets so their titles corresponded to an issue reported and other users had a chance to discover them ;-) ).

@suculent
Copy link

Just stumbled upon this issue when updating my docker builder.

Actually, the source repository of crosstool-ng has changed and the new one is maintaine: While building the dockerized toolchain (maybe the case-sensitive rename is not necessary, nevertheless it works), i've just replaced the original source with new repo as a patch:

cd /home/nodemcu/esp-open-sdk/ && \
rm -rf ./crosstool-NG && \
git clone https://github.com/crosstool-ng/crosstool-ng && \
mv ./crosstool-ng ./crosstool-NG

@Haox1n
Copy link

Haox1n commented Nov 26, 2020

Just stumbled upon this issue when updating my docker builder.

Actually, the source repository of crosstool-ng has changed and the new one is maintaine: While building the dockerized toolchain (maybe the case-sensitive rename is not necessary, nevertheless it works), i've just replaced the original source with new repo as a patch:

cd /home/nodemcu/esp-open-sdk/ && \
rm -rf ./crosstool-NG && \
git clone https://github.com/crosstool-ng/crosstool-ng && \
mv ./crosstool-ng ./crosstool-NG

thanks for your msg here.
it helped me (as a noob) out.
thx again
Stay well

@Pecacheu
Copy link

Thanks for the report. It's a matter of fact that I don't maintain esp-open-sdk anymore, and it stays in a static, known-working (with the tools of its generation) shape. So, I unlikely will update this repo to a newer crosstools-NG version, as then someone would need to re-triage "known working" status, and that's not easy.

(I do however still rename tickets so their titles corresponded to an issue reported and other users had a chance to discover them ;-) ).

I don't know about 'known working' when as I just discovered apparently there are some dependencies it tries to download off the web that literally don't exist anymore at that URL, which means build will probably fail for ALL users. (#365)

@ChrisMacGregor
Copy link

A possibly-simpler fix for the bash-version-detection issue is this:

ChrisMacGregor@3fc1930#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52

I subsequently ran into a couple of other issues that needed patches. The end result (which gets me a clean build on Ubuntu 21.10 of an apparently working toolchain) can be found here:

#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

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

7 participants