Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291238 - ncurses doesn't compile with USE=unicode when ncurses has not yet been installed before
Summary: ncurses doesn't compile with USE=unicode when ncurses has not yet been instal...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-30 23:21 UTC by Dirk Tilger
Modified: 2009-11-11 15:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Modification done to the IRIX patch to make it work. (ncurses-5.7-irix.patch.diff,604 bytes, patch)
2009-10-30 23:23 UTC, Dirk Tilger
Details | Diff
Build log (ncurses-build.log,1.16 MB, text/plain)
2009-11-03 14:00 UTC, Dirk Tilger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Tilger 2009-10-30 23:21:46 UTC
I tried to bootstrap a fresh gentoo-prefix on a Debian Linux following the Solaris guide. Compiling ncurses (for bash) failed due to linkage problems. With UNICODE support turned on, two versions of ncurses are built: one classical and one with multibyte character support. The latter gets the suffix "w" for all libraries. libncurses.so becomes libncursesw.so.

Compilation fails with:
-----8<-----
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make[1]: *** [test_opaque] Error 1
make[1]: Leaving directory `[whatever $EPREFIX points to]/var/tmp/portage/sys-libs/ncurses-5.7/work/narrowc/test'
make: *** [all] Error 2
-----8<-----

The problem exists with the portage tree fetched from the bootstrap script as well as for 5.7. My notes here refer to ncurses-5.7, but I would assume them being equally valid for the one coming with the bootstrap script (5.6).

The reason for the problem lies in a patch ncurses-5.7-irix.patch applied after the compilation phase that will insert "-L../lib -lncurses" into the linker parameters for the test_opaque application. In the wide character ncurses libncurses.so doesn't exist and if it doesn't exist in the system either, the linking fails.

The proposed solution is to replace the linking parameters with the $(TEST_ARGS) parameter from the Makefile that will have the right value assigned by autoconf. It supply a few additional libraries to the linker, but I would assume on most system that these will eventually be ignored when not needed.
Comment 1 Dirk Tilger 2009-10-30 23:23:40 UTC
Created attachment 208815 [details, diff]
Modification done to the IRIX patch to make it work.

I have tested the modification only with USE="unicode -ada -debug -doc (-gpm) -minimal -nocxx -profile -trace" on a Debian Linux system.
Comment 2 Fabian Groffen gentoo-dev 2009-10-31 11:20:15 UTC
Why are you bootstrapping with USE=unicode?  USE flags are only set at late state when the system is going to rebuild itself exactly to avoid things like this
Comment 3 Dirk Tilger 2009-11-03 11:49:29 UTC
(In reply to comment #2)
> Why are you bootstrapping with USE=unicode?  USE flags are only set at late
> state when the system is going to rebuild itself exactly to avoid things like
> this
> 

For the bootstrapping: as I just explained in the chat "unicode" comes with the profile.

Though I can't test it, I would have assumed that this IRIX patch will break whenever you switch on unicode, regardless of whether you're bootstrapping or not, unless some other flags then disable the compilation of this test.
Comment 4 Dirk Tilger 2009-11-03 14:00:48 UTC
Created attachment 209127 [details]
Build log

build log from bootstrap. ncurses gets pulled in from 1.7: bash.
Comment 5 Fabian Groffen gentoo-dev 2009-11-03 19:38:20 UTC
ok, thanks, this looks like a regression indeed
Comment 6 Fabian Groffen gentoo-dev 2009-11-11 15:42:20 UTC
patch applied, thanks