[Bug 16339] New: bug: Cannot compile successfully when running the make menuconfig command on versions of gcc above 14
bugzilla at busybox.net
bugzilla at busybox.net
Sat Apr 19 14:34:33 UTC 2025
https://bugs.busybox.net/show_bug.cgi?id=16339
Bug ID: 16339
Summary: bug: Cannot compile successfully when running the make
menuconfig command on versions of gcc above 14
Product: Busybox
Version: 1.37.x
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: fulifan at 126.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
Overview
When using GCC versions higher than 14, executing the make menuconfig command
fails to compile successfully.
Steps to Reproduce
When both gcc and g++ versions exceed 14, running the make menuconfig command
results in the following 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.
Expected Behavior
Normally, this command should launch the BusyBox Configuration interface.
Solution
Modify line 48 in scripts/kconfig/lxdialog/check-lxdialog.sh, replacing:
main() {}
with:
int main() { return 0; }
Build Date & System Information
Issue encountered on April 19, 2025. System environment:
OS: Arch Linux x86_64
Host: Dell G15 5515 1.25.0
Kernel: 6.12.23-1-lts
Uptime: 11 hours, 10 mins
Packages: 1310 (pacman)
Shell: zsh 5.9
Resolution: 1920x1080
DE: Xfce 4.20
WM: Xfwm4
WM Theme: Qogir-Light
Theme: Arc-Lighter [GTK2/3]
Icons: Qogir-light [GTK2/3]
Terminal: kitty
CPU: AMD Ryzen 7 5800H with Radeon Graphics (16) @ 4.463GHz
GPU: NVIDIA GeForce RTX 3060 Mobile / Max-Q
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
Memory: 10782MiB / 31437MiB
Additional Builds and Platforms
This issue does not occur on Ubuntu, but is reproducible on Arch Linux and
openSUSE.
Additional Information
I attempted reinstalling the ncurses package and reconfiguring symbolic links,
but the issue persisted. Eventually, I traced the problem to line 48 in
scripts/kconfig/lxdialog/check-lxdialog.sh, which contains main() {}.
In older GCC versions, the return type of main can be implicitly assumed.
However, starting from GCC 14, an explicit return type is required. If omitted,
the function may return a random value—specifically, the value of a
register—causing unpredictable behavior. In this case, it leads the check
script to incorrectly determine that the ncurses libraries are missing, even if
they are properly installed.
This explains why the problem does not appear on Ubuntu (default GCC 11.4.0)
but does on Arch Linux and openSUSE (both using GCC 14.1.0).
After switching the GCC version on Ubuntu to 14.1.0, the issue was reproduced
there as well, confirming the root cause.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list