You are not logged in.

#1 2024-05-16 12:06:33

KazuoMyshkin
Member
Registered: 2024-05-16
Posts: 2

[SOLVED] Issues with make menuconfig and the ncurses library

Hi there,

I'm trying to set up a development toolchain for the ESP8266, as per their documentation.
Unfortunately, I am running into issues with the make menuconfig command, which gives the following output:

make menuconfig
make[1]: Verzeichnis „/home/nikita/Embedded/esp/ESP8266_RTOS_SDK/tools/kconfig“ wird betreten
/home/nikita/Embedded/esp/ESP8266_RTOS_SDK/tools/kconfig/lxdialog/check-lxdialog.sh -check cc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -MMD -MP -I "." -I "/home/nikita/Embedded/esp/ESP8266_RTOS_SDK/tools/kconfig" -lncursesw
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 *** 
 *** Install ncurses (ncurses-devel) and try again.
 *** 
make[1]: *** [Makefile:219: dochecklxdialog] Fehler 1
make[1]: Verzeichnis „/home/nikita/Embedded/esp/ESP8266_RTOS_SDK/tools/kconfig“ wird verlassen
make: *** Keine Regel vorhanden, um das Ziel „/home/nikita/Embedded/esp/ESP8266_RTOS_SDK/tools/kconfig/conf-idf“, benötigt von „/home/nikita/Embedded/esp/ESP8266_RTOS_SDK/tools/kconfig/mconf-idf“, zu erstellen.  Schluss.

I have the ncurses library installed, and as per other suggestions installed the ncurses5-compat-lib from the AUR, bud sadly that did not help. My limited understanding of the ncurses library on arch gave me the idea, that the "-lncursesw" flag might cause issues? I would be grateful for any pointers smile

Also, please let me know if another part of the forum would be more appropriate for my issue.

Last edited by KazuoMyshkin (2024-05-16 17:00:14)

Offline

#2 2024-05-16 14:43:59

seth
Member
Registered: 2012-09-03
Posts: 57,455

Re: [SOLVED] Issues with make menuconfig and the ncurses library

Offline

#3 2024-05-16 16:59:25

KazuoMyshkin
Member
Registered: 2024-05-16
Posts: 2

Re: [SOLVED] Issues with make menuconfig and the ncurses library

Oh wow, thanks so much, indeed inserting the missing int as per the second link you posted it solved the issue.

Offline

#4 2024-07-25 14:26:19

m8
Member
Registered: 2023-03-06
Posts: 16

Re: [SOLVED] Issues with make menuconfig and the ncurses library

I was having the same issue in busybox and this fixed it.

The kernel did not have such an issue. Is this a problem with busybox? Should I open an issue/submit a patch?

Offline

#5 2024-07-25 14:42:11

cryptearth
Member
Registered: 2024-02-03
Posts: 824

Re: [SOLVED] Issues with make menuconfig and the ncurses library

according to several sources main() must obey the definition of any other function and hence is required to have a return type of either int or void
so the missing return type causes the test compilation to fail for the wrong reason
so - yes, this is an upstream problem and an upstream bug should get filed

Offline

#6 2024-07-25 16:30:36

m8
Member
Registered: 2023-03-06
Posts: 16

Re: [SOLVED] Issues with make menuconfig and the ncurses library

cryptearth wrote:

according to several sources main() must obey the definition of any other function and hence is required to have a return type of either int or void
so the missing return type causes the test compilation to fail for the wrong reason
so - yes, this is an upstream problem and an upstream bug should get filed

Sorry to be dragging this, but do you have an example of those sources? In dash, bash and zsh manuals, I don't see any reference to function return types

https://www.gnu.org/software/bash/manua … -Functions
https://zsh.sourceforge.io/Doc/Release/ … #Functions
https://man7.org/linux/man-pages/man1/dash.1.html

Offline

#7 2024-07-25 16:37:04

seth
Member
Registered: 2012-09-03
Posts: 57,455

Re: [SOLVED] Issues with make menuconfig and the ncurses library

The script there tries to compile a mini C program and since C99 main() *must* return an int.
It's just that compilers used to be VERY lenient about that  (C90 allowed no return type)

Here's some people nerding out about it wink
https://stackoverflow.com/questions/204 … in-c-and-c

Offline

#8 2024-07-25 16:37:53

loqs
Member
Registered: 2014-03-06
Posts: 17,916

Re: [SOLVED] Issues with make menuconfig and the ncurses library

m8 wrote:

Sorry to be dragging this, but do you have an example of those sources?

See the Implicit int types (-Werror=implicit-int) section of porting to gcc 14.

Offline

#9 2024-07-25 20:49:11

m8
Member
Registered: 2023-03-06
Posts: 16

Re: [SOLVED] Issues with make menuconfig and the ncurses library

wooow that code is cursed, I thought it was a shell function at first

Offline

#10 2024-07-25 21:03:57

cryptearth
Member
Registered: 2024-02-03
Posts: 824

Re: [SOLVED] Issues with make menuconfig and the ncurses library

m8 wrote:

Sorry to be dragging this, but do you have an example of those sources?

as this is C

$cc -x c - -o $tmp 2>/dev/null <<'EOF'
 #include CURSES_LOC
main() {}
 EOF

which results in a C file of just

#include CURSES_LOC
main() {}

main in C requires either VOID or INT
the actual error is this:

error: return type defaults to 'int' [-Wimplicit-int]
    2 | main() {}
      | ^~~~

which causes the test to fail no matter if ncurses is installed

Offline

Board footer

Powered by FluxBB