esp-homekit-demo icon indicating copy to clipboard operation
esp-homekit-demo copied to clipboard

Failed to build esp-sdk

Open Kunalverma1502 opened this issue 4 years ago • 8 comments

Earlier it was working completely fine.

now whenever I build esp-sdk using

'docker build . -f esp-sdk-dockerfile -t esp-sdk'

It says

[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:55.27) [00:55] / make[2]: *** [build] Error 1 #9 75.34 ct-ng:152: recipe for target 'build' failed #9 75.34 make[2]: Leaving directory '/build/esp-open-sdk/crosstool-NG' #9 75.34 ../Makefile:135: recipe for target '_toolchain' failed #9 75.34 make[1]: Leaving directory '/build/esp-open-sdk/crosstool-NG' #9 75.34 make[1]: *** [_toolchain] Error 2 #9 75.34 Makefile:130: recipe for target 'crosstool-NG/.built' failed #9 75.34 make: *** [crosstool-NG/.built] Error 2

executor failed running [/bin/sh -c su docker -c " git clone --recursive https://github.com/pfalcon/esp-open-sdk.git /build/esp-open-sdk ; cd /build/esp-open-sdk ; make STANDALONE=n ; "]: exit code: 2

@maximkulkin

Kunalverma1502 avatar Apr 02 '21 13:04 Kunalverma1502

I recently had the same problem on Ubuntu. Problem search resulted the build stopped because expat-2.2.10.tar.xz could not be downloaded. I downloaded it manually and the build was successful, but Docker seems to be able to borrow a container that has already been created.

https://github.com/pfalcon/esp-open-sdk/issues/237

ds5apm avatar Apr 02 '21 20:04 ds5apm

can you mention the steps to do the same ! @ds5apm

Kunalverma1502 avatar Apr 03 '21 06:04 Kunalverma1502

As detailed in the link above, I don't think there is a need to explain further. As a beginner, the sequence I followed is as follows. (Details can be found in /esp-open-sdk/crosstool-NG/build.log on your computer.)

  1. Download the file from the address below. https://master.dl.sourceforge.net/project/expat/expat/2.2.10/expat-2.2.10.tar.xz

  2. Download "expat-2.1.0.tar.gz" Go to ~/esp-open-sdk/crosstool-NG/.build/tarballs folder.

  3. Then rebuild " ...STANDALONE=n"

    I hope my experience will help you solve the problem.

ds5apm avatar Apr 04 '21 10:04 ds5apm

btw the toolchain is looking for expat-2.1.0.tar.gzfile. The url above is targeting to version 2.2.10.

purofy avatar Apr 12 '21 16:04 purofy

@maximkulkin Any idea how to solve this while using docker? get the same errors. but I can't manually edit or download because the image will not be created on error.

Thanks.

nikomaxi avatar May 06 '21 14:05 nikomaxi

It's missing libexpat, adding the following between git clone ... and make STANDALONE=n in esp-sdk-dockerfile fixed it for me:

    cd /build/esp-open-sdk/crosstool-NG ; \
    ls ; \
    mkdir .build ; \
    cd .build ; \
    mkdir tarballs ; \
    cd tarballs ; \
    wget https://github.com/libexpat/libexpat/releases/download/R_2_1_0/expat-2.1.0.tar.gz ; \

camielverdult avatar May 07 '21 12:05 camielverdult

The same steps would work if you were to do this manually on a linux VM/machine

camielverdult avatar May 07 '21 12:05 camielverdult

@camielverdult Yup, that works look here for more information.

AchimPieters avatar May 18 '21 14:05 AchimPieters