larsks / docker-image-esp-open-sdk

9 stars 3 forks source link

Fails to build while 'Retrieving needed toolchain components' tarballs' #2

Closed benalb closed 3 years ago

benalb commented 3 years ago

Cloning the repo and doing docker build -t esp-open-sdk . fails with this error:

[foobar@intruder docker-image-esp-open-sdk]$ docker build -t esp-open-sdk . (...) now configured for "xtensa-lx106-elf" gmake[2]: Leaving directory '/tools/crosstool-NG' sed -r -i.org s%CT_PREFIX_DIR=.*%CT_PREFIX_DIR="/tools/xtensa-lx106-elf"% .config sed -r -i s%CT_INSTALL_DIR_RO=y%"#"CT_INSTALL_DIR_RO=y% .config cat ../crosstool-config-overrides >> .config ./ct-ng build gmake[2]: Entering directory '/tools/crosstool-NG' [INFO ] Performing some trivial sanity checks [INFO ] Build started 20210529.102916 [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/B - Known issues.txt' [ERROR]
[ERROR] (elapsed: 0:27.69) [00:28] / gmake[2]: [ct-ng:152: build] Error 1 gmake[2]: Leaving directory '/tools/crosstool-NG' make[1]: Leaving directory '/tools/crosstool-NG' make[1]: [../Makefile:139: _toolchain] Error 2 make: *** [Makefile:131: crosstool-NG/.built] Error 2 The command '/bin/sh -c cd /tools && git checkout ${ESP_SDK_REF} && git am 0001-Fix-build-errors-with-bash-4.patch && make' returned a non-zero code: 2

larsks commented 3 years ago

Looking at the build.log file, it seems to be failing because it's trying to fetch expat-2.1.0:

[DEBUG]    ==> Executing: 'wget' '--passive-ftp' '--tries=3' '-nc' '--progress=dot:binary' '-T' '10' '-O' '/tools/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-08-05 01:19:35--  http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0
[ALL  ]    Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 204.68.111.105
[ALL  ]    Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|204.68.111.105|:80... connected.
[ALL  ]    HTTP request sent, awaiting response... 404 Not Found
[ALL  ]    2021-08-05 01:19:35 ERROR 404: Not Found.
[ALL  ]
[DEBUG]    Not at this location: "http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0"

On sourceforge, the expat-2.1.0.tar.gz file has been pulled and replaced with:

https://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0-RENAMED-VULNERABLE-PLEASE-USE-2.3.0-INSTEAD.tar.gz/download

I'm not sure what the solution is here...there's probably a way to modify the crosstool configuration to use a newer version.