menuconfig launch fails missing curses.h - missing dependency in docs?

andyn_ff
Posts: 7
Joined: Mon Jun 10, 2019 4:34 pm

menuconfig launch fails missing curses.h - missing dependency in docs?

Postby andyn_ff » Wed Jul 15, 2020 9:09 pm

Hi,

I have set up the tools in a new virtual machine running Ubuntu Server 20.04 LTS.

I want to run the simple_ota_example from the examples folder in ESP-IDF. I have followed the setup instructions at https://docs.espressif.com/projects/esp ... setup.html and installed all the listed dependencies.

However, when I launch menuconfig, I get the following error, saying that curses.h cannot be found.

Code: Select all

user@ubuntuvm:~/esp/examples/system/ota/simple_ota_example$ idf.py menuconfig
Checking Python dependencies...
Python requirements from /home/user/esp/requirements.txt are satisfied.
Executing action: menuconfig
Running cmake in directory /home/user/esp/examples/system/ota/simple_ota_example/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DWARN_UNINITIALIZED=1 -DCCACHE_ENABLE=0 /home/user/esp/examples/system/ota/simple_ota_example"...
Warn about uninitialized values.
-- Found Git: /usr/bin/git (found version "2.25.1")
-- IDF_TARGET not set, using default target: esp32
-- 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/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/user/.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/user/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/user/.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.0.1
-- Building ESP-IDF components for target esp32
Loading defaults file /home/user/esp/examples/system/ota/simple_ota_example/sdkconfig.defaults...
-- Found PythonInterp: /home/user/.espressif/python_env/idf4.0_py3.8_env/bin/python (found version "3.8.2")
-- Found Perl: /usr/bin/perl (found version "5.30.0")
-- Adding linker script /home/user/esp/examples/system/ota/simple_ota_example/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /home/user/esp/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /home/user/esp/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script /home/user/esp/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/user/esp/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/user/esp/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/user/esp/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/user/esp/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_ringbuf esp_rom esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table protobuf-c protocol_examples_common protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /home/user/esp/components/app_trace /home/user/esp/components/app_update /home/user/esp/components/asio /home/user/esp/components/bootloader /home/user/esp/components/bootloader_support /home/user/esp/components/bt /home/user/esp/components/coap /home/user/esp/components/console /home/user/esp/components/cxx /home/user/esp/components/driver /home/user/esp/components/efuse /home/user/esp/components/esp-tls /home/user/esp/components/esp32 /home/user/esp/components/esp_adc_cal /home/user/esp/components/esp_common /home/user/esp/components/esp_eth /home/user/esp/components/esp_event /home/user/esp/components/esp_gdbstub /home/user/esp/components/esp_http_client /home/user/esp/components/esp_http_server /home/user/esp/components/esp_https_ota /home/user/esp/components/esp_https_server /home/user/esp/components/esp_local_ctrl /home/user/esp/components/esp_ringbuf /home/user/esp/components/esp_rom /home/user/esp/components/esp_websocket_client /home/user/esp/components/esp_wifi /home/user/esp/components/espcoredump /home/user/esp/components/esptool_py /home/user/esp/components/expat /home/user/esp/components/fatfs /home/user/esp/components/freemodbus /home/user/esp/components/freertos /home/user/esp/components/heap /home/user/esp/components/idf_test /home/user/esp/components/jsmn /home/user/esp/components/json /home/user/esp/components/libsodium /home/user/esp/components/log /home/user/esp/components/lwip /home/user/esp/examples/system/ota/simple_ota_example/main /home/user/esp/components/mbedtls /home/user/esp/components/mdns /home/user/esp/components/mqtt /home/user/esp/components/newlib /home/user/esp/components/nghttp /home/user/esp/components/nvs_flash /home/user/esp/components/openssl /home/user/esp/components/partition_table /home/user/esp/components/protobuf-c /home/user/esp/examples/common_components/protocol_examples_common /home/user/esp/components/protocomm /home-- Build files have been written to: /home/user/esp/examples/system/ota/simple_ota_example/build
Running ninja in directory /home/user/esp/examples/system/ota/simple_ota_example/build
Executing "ninja menuconfig"...
[6/9] Performing build step for 'mconf-idf'
FAILED: mconf-idf-prefix/src/mconf-idf-stamp/mconf-idf-build kconfig_bin/mconf-idf
cd /home/user/esp/examples/system/ota/simple_ota_example/build/kconfig_bin && rm -f /home/user/esp/tools/kconfig/zconf.lex.c /home/user/esp/tools/kconfig/zconf.hash.c && make -f /home/user/esp/tools/kconfig/Makefile mconf-idf && /usr/bin/cmake -E touch /home/user/esp/examples/system/ota/simple_ota_example/build/mconf-idf-prefix/src/mconf-idf-stamp/mconf-idf-build
mkdir -p lxdialog
cc -c  -DCURSES_LOC="<curses.h>" -DLOCALE -MMD -MP -I "." -I "/home/user/esp/tools/kconfig"  /home/user/esp/tools/kconfig/mconf.c -o mconf.o
<command-line>: fatal error: curses.h: No such file or directory
compilation terminated.
make: *** [/home/user/esp/tools/kconfig/Makefile:173: mconf.o] Error 1
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
I understand that curses.h is part of ncurses. I was not sure which version of ncurses should be installed, but I tried running

Code: Select all

sudo apt install ncurses-dev
, and then when I launched menuconfig again it worked.

Do you expect some version of ncurses to be installed as a prerequisite for ESP-IDF? Maybe this should be included in the list of prerequisite packages to install in the docs. I will submit a pull request on github if I can find out which version is the right thing to install.

Best regards,
Andy

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

Re: menuconfig launch fails missing curses.h - missing dependency in docs?

Postby ESP_Roland » Thu Jul 16, 2020 6:55 am

Hi Andy,

You are using IDF v4.0.X, right? The documentation you are browsing is for the "master" branch (v4.3 under development). You can see "latest" in your link.

Here is the documentation page for v4.0 which contains the ncurses package:
https://docs.espressif.com/projects/esp ... setup.html

Since IDF v4.1 a new menuconfig is used which doesn't require ncurses.

Roland

andyn_ff
Posts: 7
Joined: Mon Jun 10, 2019 4:34 pm

Re: menuconfig launch fails missing curses.h - missing dependency in docs?

Postby andyn_ff » Thu Jul 16, 2020 2:27 pm

Thank you, that makes perfect sense. It was my mistake to be looking at the 'latest' docs rather than 'stable'.

Who is online

Users browsing this forum: No registered users and 34 guests