Cannot build the hello world sample

timothyp
Posts: 5
Joined: Thu Feb 27, 2020 3:53 am

Cannot build the hello world sample

Postby timothyp » Thu Feb 27, 2020 5:52 am

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?

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Cannot build the hello world sample

Postby ESP_Roland » Thu Feb 27, 2020 6:56 am

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
.

timothyp
Posts: 5
Joined: Thu Feb 27, 2020 3:53 am

Re: Cannot build the hello world sample

Postby timothyp » Thu Feb 27, 2020 7:07 am

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.

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Cannot build the hello world sample

Postby ESP_Roland » Thu Feb 27, 2020 8:04 am

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.

timothyp
Posts: 5
Joined: Thu Feb 27, 2020 3:53 am

Re: Cannot build the hello world sample

Postby timothyp » Thu Feb 27, 2020 8:53 am

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?

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Cannot build the hello world sample

Postby ESP_Roland » Thu Feb 27, 2020 9:26 am

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.

lladam
Posts: 44
Joined: Tue Jul 20, 2021 12:14 am

Re: Cannot build the hello world sample

Postby lladam » Mon May 13, 2024 9:52 pm

hello,
how about the error? does it solved?

Who is online

Users browsing this forum: Google [Bot], Sang_Huynh and 212 guests