Page 1 of 1

Cannot build the hello world sample

Posted: Thu Feb 27, 2020 5:52 am
by timothyp
Hi,

First off, Github is now as good as blocked in Shenzhen, and when it does work the connection gets cut ever few minutes,
so I spent more than 4 days to download esp-idf and then run `./install.sh` which just downloads more stuff.
As a Chinese company, you should probably provide local mirrors for everything.

Then today everything finally downloaded, I entered the `esp-idf/examples/get-started/hello_world` directory
and ran:

Code: Select all

idf.py build
This once again triggered a bunch of downloads from Github that took 4 hours to complete and resulted in

Code: Select all

 idf.py build
Executing action: all (aliases: build)
Running cmake in directory /home/timothy/Downloads/esp-idf/examples/get-started/hello_world/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /home/timothy/Downloads/esp-idf/examples/get-started/hello_world"...
Warn about uninitialized values.
-- Found Git: /usr/bin/git (found version "2.20.1") 
-- Component directory /home/timothy/Downloads/esp-idf/components/asio does not contain a CMakeLists.txt file. No component will be added
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/timothy/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/timothy/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/timothy/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/timothy/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/timothy/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: v4.1-dev-2030-g9cdbda325-dirty
-- Building ESP-IDF components for target esp32
-- Found PythonInterp: /home/timothy/.espressif/python_env/idf4.1_py2.7_env/bin/python (found version "2.7.17") 
-- Found Perl: /usr/bin/perl (found version "5.28.1") 
-- Adding linker script /home/timothy/Downloads/esp-idf/examples/get-started/hello_world/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs-time.ld
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/timothy/Downloads/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
CMake Error at ../../../tools/cmake/component.cmake:302 (message):
  Include directory
  '/home/timothy/Downloads/esp-idf/components/nghttp/nghttp2/lib/includes' is
  not a directory.
Call Stack (most recent call first):
  ../../../tools/cmake/component.cmake:470 (__component_add_include_dirs)
  ../../../components/nghttp/CMakeLists.txt:26 (idf_component_register)


-- Configuring incomplete, errors occurred!
See also "/home/timothy/Downloads/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1

System: Ubuntu 19.10
esp-idf source: Github v4.1 branch

Any suggestions?

Re: Cannot build the hello world sample

Posted: Thu Feb 27, 2020 6:56 am
by ESP_Roland
Hello timothyp.

I think you still don't have everything downloaded. Please go to the IDF directory and run

Code: Select all

git submodule update --init --recursive
.

Re: Cannot build the hello world sample

Posted: Thu Feb 27, 2020 7:07 am
by timothyp
You are correct.
Apparently it is downloading more stuff again.
This could take anything from minutes to a few days.
Will try again after that.

Is there a local mirror (or single package download) anywhere.
The blockade is affecting a lot of people.

Re: Cannot build the hello world sample

Posted: Thu Feb 27, 2020 8:04 am
by ESP_Roland
Unfortunately, there is no Chinese mirror at the time.

The releases page (https://github.com/espressif/esp-idf/releases) contains also links to ZIP files from dl.espressif.com which should be much faster for you:

Code: Select all

This archive can also be downloaded from Espressif's download server:
https://dl.espressif.com/dl/esp-idf/releases/esp-idf-v4.0.zip
These ZIP files contain also the .git directory so normal GIT command should work on the downloaded repository.

Re: Cannot build the hello world sample

Posted: Thu Feb 27, 2020 8:53 am
by timothyp
I downloaded that one before as well but it still tried to download stuff.

Now if this completes. I will have data in ~/Downloads/esp-idf/ and ~/.espressif
Do I need to copy them both if I move to a different system or can I just copy the esp-idf folder?

Re: Cannot build the hello world sample

Posted: Thu Feb 27, 2020 9:26 am
by ESP_Roland
The install script downloads the toolchain as well (binutils, openocd, xtensa). You can copy files from ~/.espressif/dist between computers and then the install script will recreate the other directories and files in ~/.espressif without downloading. I don't recomment to copy the whole ~/.espressif directory.

You can copy the whole esp-idf directory.

Re: Cannot build the hello world sample

Posted: Mon May 13, 2024 9:52 pm
by lladam
hello,
how about the error? does it solved?