Bug 7369

Summary: glibc: log.do_configure shows error in prompted configurations
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Benjamin Esquivel <benjamin.esquivel>
Component: coreAssignee: Benjamin Esquivel <benjamin.esquivel>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Medium CC: meta.mr.watcher, meta.watcher, raj.khem, sgw
Version: 1.8   
Target Milestone: 1.8   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
configure error samples none

Description Benjamin Esquivel 2015-02-25 17:42:20 UTC
Created attachment 2422 [details]
configure error samples

the do_configure process of glibc generates a log with some errors described like this sample:

  Functions for producing backtraces (EGLIBC_BACKTRACE) [N/y/?]
  Error in reading or end of file.

More errors like this are found at the log.do_configure file. Another sample of these Errors is found within the attachment.

This issue is contained just at the logging part of it because the configured options are exactly as specified at the run.do_configure script. Also the rest of the configure process carries on after these errors are shown and the command exits with no error as well.

Another thing to point out is that if run.do_configure is run via devshell then it asks at the terminal for user input at these options while if run via 'bitbake -c configure glibc' it just shows these errors.

This bug is to find a more well-designed mechanism for doing this configure process.
Comment 1 Benjamin Esquivel 2015-03-11 21:36:50 UTC
More info about this, if you run the configuration manually like:

        $ bitbake -c configure glibc
        $ bitbake -c devshell glibc
        <devshell>/temp $ ./run.do_configure

it comes to a point where it starts asking for user input on some
variables. Like this:

        IPv6 Advanced Sockets API support (RFC3542) (EGLIBC_ADVANCED_INET6)
[Y/n/?]

But if you instead run: 

        $ bitbake -c configure glibc
        $ bitbake -c devshell glibc
        <devshell>/temp $ cat log.do_configure

you will see some occurrences like:
        IPv6 Advanced Sockets API support (RFC3542) (EGLIBC_ADVANCED_INET6)
[Y/n/?]
        Error in reading or end of file.

I haven't found this displayed Error to be tied to any functional error
yet, it finishes fine and everything configures as expected.
Comment 2 Benjamin Esquivel 2015-03-11 21:38:53 UTC
If this error is only cosmetic I may pass on fixing this bug, I'm in the process of finding it out.
Comment 3 Khem Raj 2015-03-18 05:20:29 UTC
(In reply to comment #2)
> If this error is only cosmetic I may pass on fixing this bug, I'm in the
> process of finding it out.

For glibc kconfig patch that we have we have three options implemented
defconfig, config and menuconfig
config is what we use and it calls conf program with --oldaskconfig 
option which is suppose to behave as expected waiting for inputs from line oriented program

Try something like below, that should fix the issue

diff --git a/meta/recipes-core/glibc/glibc_2.21.bb b/meta/recipes-core/glibc/glibc_2.21.bb
index 615297b..f57e3f9 100644
--- a/meta/recipes-core/glibc/glibc_2.21.bb
+++ b/meta/recipes-core/glibc/glibc_2.21.bb
@@ -111,7 +111,7 @@ do_configure () {
         fi
         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
         find ${S} -name "configure" | xargs touch
-        CPPFLAGS="" oe_runconf
+        yes '' | CPPFLAGS="" oe_runconf
 }
Comment 4 Benjamin Esquivel 2015-03-18 20:29:51 UTC
thanks for your pointer, I already sent a patch of it and CC'ed you.