espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.35k stars 1.57k forks source link

Invalid error caused by menuconfig: Unable to find the ncurses libraries or the required header files. (GIT8266O-861) #1283

Open DaniilAlpha opened 4 months ago

DaniilAlpha commented 4 months ago

Similar issue do exist, but is closed and not very relevant as about an arch package.

Environment

Problem Description

After idf.py menuconfig is run, ESP8266_RTOS_SDK/tools/kconfig/lxdialog/check-lxdialog.sh reports an error

 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 *** 
 *** Install ncurses (ncurses-devel) and try again.
 *** 

Althought, both ncurses and ncurses-devel is preset on the system. After a bit of digging, I realized that error is actually not related to ncurses at all. The way script checks for ncurses presence is kida lame not so good, furthermore it relies on non-standard C (ommiting type before the main function), so compiler generates a warning which makes the check fail.

Expected Behavior

Menuconfig builds out of the box.

Actual Behavior

To build menuconfig, tinkering with idf scripts is required.

Steps to repropduce

May be kind of tricky, as it depends on compiler options and the compiler itself. I personaly add -std=c11 at the project-level CMakeLists, but not sure if it matters.

Fix

Adding int before this test main function fixes the problem.

mnganga10 commented 2 months ago

very helpful, should be pushed to master branch

tikhonp commented 3 weeks ago

yeap this pull request fixes problem for me