| Summary: | bitbake virtual/kernel -c menuconfig dependencies | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Robert Berger <pokylinux> |
| Component: | kernel | Assignee: | Robert Berger <pokylinux> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | f.bre, marc.ferland, randy.macleod, ross.burton, srifenbark, tom.zanussi |
| Version: | unspecified | ||
| Target Milestone: | 2.8 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Done (doc changes complete) | |
|
Description
Robert Berger
2019-01-19 14:14:48 UTC
There are probably two things needed here: a) To run a sanity test and error if the needed prerequisites aren't present when running menuconfig b) See if we can use the native dependencies (ensuring BUILD_CFLAGS and BUILD_LDFLAGS are set) Indeed, my first thought was shouldn't the menuconfig task depend on ncurses-native. I'll try and drag up all the history on this, but we've been all around this several times. There are various incompatibilities with ncurses and how it is built (leading to garbled output) as well as getting the kernel to actually properly use our libraries when they are made available. There have been -native attempts, various variables, host dependencies, etc, that have all not fully solved issues. What exactly is the problem that is being seen ? That menuconfig simply fails to build and run due to missing libraries ? What distro, etc, are we talking about. Experience shows that we need to capture all the details before coming up with any potential fixes. Hi Bruce, Yes it's menuconfig which fails to build due to missing libraries and "rookies" stumbling over it. I would just go and install the missing libs on the host and all is good. (although this is rather un-nice since actually everything needed should either be built by OE/the YP or it should be detected that stuff is missing and some kind of warning should be spit out). I see it on Ubuntu 16, but I guess the same problem exists on all distros. As I said initially: The first line of defence would be to 1) add missing packages to the Manual[3] [3] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#required-packages-for-the-build-host This would be fine for me ;) ==== Having said that, if it's possible to come up with a generic solution which works everywhere, that would be great, but I from what you say this is most likely not so straight forward. ==== On Ubuntu-16.04, "bitbake -c menuconfig <linux-kernel-name>" reports mconf.c:(.text+0x8a4): undefined reference to `stdscr'. I needed to spend a lot of frustrating time to find out I have to solve this very cryptic error by installing the following 2 packages via Synaptic: - libncurses5-dev - libtinfo-dev Hi, I can add the packages to the list of required host packages now for the 2.7 version of the manuals. Should I go ahead and do that? Scott They're only required for menuconfig to work, so I wouldn't want them in the required dependencies section. Can we just list them in the kernel's menuconfig section? Thanks Ross - I will update this section - https://yoctoproject.org/docs/2.7/mega-manual/mega-manual.html#using-menuconfig Scott Just as a side note:
except for
bitbake virtual/kernel -c menuconfig
we also have (at least)
bitbake busybox -c menuconfig
where I assume the same/similar native dependencies are required.
Aso I notices the meta/classes/cml1.bbclass which tries to do something about it:
CROSS_CURSES_LIB = "-lncurses -ltinfo"
CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"'
TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
KCONFIG_CONFIG_COMMAND ??= "menuconfig"
python do_menuconfig() {
...
}
do_menuconfig[depends] += "ncurses-native:do_populate_sysroot"
do_menuconfig[nostamp] = "1"
This class is inherited by the kernel and busybox.
meta/classes/kernel.bbclass:inherit cml1
meta/recipes-core/busybox/busybox.inc:inherit cml1
*** Bug 13164 has been marked as a duplicate of this bug. *** Hi, See https://yoctoproject.org/docs/2.7/kernel-dev/kernel-dev.html#using-menuconfig for a modification to the section telling how to run menuconfig. Please let me know if this takes care of the documentation component of this issue. Thanks, Scott (In reply to comment #11) > Please let me know if this takes care of the documentation component of this > issue. yeah, looks great. Thanks for checking the doc changes.... I don't own this bug so I am leaving the status alone. But, I am marking the docs flag to "done." Scott As the history shows, we did get the documentation part done. But the code changes (including sanity checks) didn't fit into the schedule so far. I'll see if I can get the sanity checks done for the missing host packages as part of m4. The work to use -native dependencies is better suited to the next release, since there are quite a few distro/libs/linkers/compilers that need to be tested before we are sure it works (as witnessed by the fact that menuconfig already depends on ncurses-native, but yet we still were seeing that the host required ncurses-dev packages installed ..). Thanks! Waiting on Sanity checks... Still no additional information on this bug. Fixed from the documentation point of view. Scott Still no additional information on this bug. Fixed from the documentation point of view. Scott can someone send me the distro details to reproduce the problem ? (and preferably the details on how to create it in a docker container). I'm unable to reproduce the host dependency issue, so I'd only be guessing at fixes. There have been some commits to address this. It works for most people. If there's still a problem for your build, open a new defect with detailed information about the host and configuration please. Ensure that you have ncurses-dev installed on your host. That requirement is contentious but exists currently. -- Randy |