Bug 172908 - x86_64: ncurses linking, tab completion not working
Summary: x86_64: ncurses linking, tab completion not working
Alias: None
Product: Fedora
Classification: Fedora
Component: grub
Version: 6
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Mike McLean
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2005-11-11 02:13 UTC by Nick Jones
Modified: 2008-05-06 15:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-05-06 15:32:14 UTC
Type: ---

Attachments (Terms of Use)
Kludgy fix for configure script to demonstrate solution (641 bytes, patch)
2005-11-11 02:15 UTC, Nick Jones
no flags Details | Diff

Description Nick Jones 2005-11-11 02:13:24 UTC
From Bugzilla Helper:
User-Agent: Opera/8.5 (X11; Linux i686; U; en)

Description of problem:
A couple of issues, the configure script is broken, causing tests for ncurses.h 
to fail.  This seems to be an autoconf problem that affects many of the tests.  
These tests build their conftest.c with the string: 'ac_includes_default' which 
uses macros that are never defined.  The attached patch shows how a fix can be 
forced, but I don't know enough about autoconf to do the fix properly.  This 
patch should be applied after the autoreconf step (thus I moved autoreconf into

On an x86_64 system, the grub binaries are compiled in -m32 mode, therefore, to 
link to ncurses, the ncurses, ncurses-devel packages from i386.  To let rpm help 
us enforce this, a BuildRequires: /lib/libncurses.so.5 could be added.

When the above fix is applied, ncurses libraries (32bit) are detected properly, 
but on x86_64, we find a new problem.  The -static flag is added to the CFLAGS 
for the configure and build on this arch, but there is a patch: grub-0.95-
staticcurses.patch that adds CFLAGS: -Wl,-Bstatic -lncurses -Wl,-Bdynamic which 
is fine on ix86 because the link method is set to static, then back to dynamic 
for the final linking of the start and end scripts, but is a problem on x86_64 
where the link method is always static, the final linking is then done in 
dynamic mode, generating a useless binary.  To fix this, the application of the 
staticcurses patch can be enclosed in: %ifnarch x86_64, %endif

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Build grub
2. On both ix86 and x86_64, notice the 'checking ncurses/curses.h usability...' 
output from %configure
3. Press tab in x86_64 grub console, no completions

Additional info:

Comment 1 Nick Jones 2005-11-11 02:15:29 UTC
Created attachment 120918 [details]
Kludgy fix for configure script to demonstrate solution

Comment 2 Nick Jones 2005-11-11 02:17:20 UTC
...therefore, to link to ncurses, the ncurses, ncurses-devel packages from i386
... should be installed on the build host.

Comment 3 Christian Iseli 2007-01-20 00:34:57 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?


Comment 4 Nick Jones 2007-01-20 03:32:19 UTC
I downloaded the latest rawhide grub (0.97-13) and built it on my fc6, x86_64 
desktop.  Same issue, the generated grub binary is useless.

I don't know how redhat builds grub internally.  The rpm that ships with fc6 is 
built for x86_64, but it seems to work fine, I assume it is built on a ix86 
host with setarch?  Or maybe I'm doing something wrong.

With the following changes made to the rawhide grub spec:
- ifnarch x86_64 macros around the 'static' patch
- autoreconf moved to %prep
- apply my configure fix patch, ugly as it is
, I can build on my desktop and have a valid binary produced (although untested 
here, I do use the above steps in the production of a grub package for my 
companys product)

I changed the target product to fc6.

Comment 5 Bug Zapper 2008-04-04 02:03:53 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 6 Bug Zapper 2008-05-06 15:32:12 UTC
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.