Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 544828 - sys-libs/ncurses[gpm] does not build on uclibc due to `ldd` output being overly verbose
Summary: sys-libs/ncurses[gpm] does not build on uclibc due to `ldd` output being over...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2015-03-28 21:32 UTC by René Rhéaume
Modified: 2016-03-01 11:33 UTC (History)
1 user (show)

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


Attachments
emerge --info output (emerge-info.txt,5.35 KB, text/plain)
2015-03-28 21:32 UTC, René Rhéaume
Details
build.log from emerge (build.log,58.94 KB, text/plain)
2015-03-28 21:33 UTC, René Rhéaume
Details
config.log (config.log,112.11 KB, text/plain)
2015-08-15 11:04 UTC, René Rhéaume
Details
build.log after change by vapier (build.log,24.31 KB, text/x-log)
2015-08-15 11:05 UTC, René Rhéaume
Details

Note You need to log in before you can comment on or make changes to this bug.
Description René Rhéaume 2015-03-28 21:32:05 UTC
ncurses does not build on uclibc system when the gpm USE flag is enabled. When disabled, it merges fine.

Reproducible: Always

Steps to Reproduce:
1. USE="gpm" emerge -1 ncursees
2.
3.
Actual Results:  
* ERROR: sys-libs/ncurses-5.9-r3::gentoo failed (compile phase):
*   emake failed


Expected Results:  
ncurses installed on system
Comment 1 René Rhéaume 2015-03-28 21:32:32 UTC
Created attachment 399982 [details]
emerge --info output
Comment 2 René Rhéaume 2015-03-28 21:33:37 UTC
Created attachment 399984 [details]
build.log from emerge
Comment 3 Anthony Basile gentoo-dev 2015-04-21 14:19:52 UTC
There are a few errors in ncurses_cfg.h.  Fix each in order we hit the next

1) Lines 58 and 59 of include/ncurses_cfg.h are messed up:

#define LIBGPM_SONAME "libgpm.so.1'
libgpm.so.1"

2) Line 109 redefines pid_t

#define pid_t int


After this I hit

  ncurses/curses.priv.h:773:2: error: unknown type name 'SIG_ATOMIC_T'

and stopped.

Rene, did an older version of ncurses work?
Comment 4 René Rhéaume 2015-04-21 22:36:19 UTC
(In reply to Anthony Basile from comment #3)

> Rene, did an older version of ncurses work?
I don't think I enabled the gpm USE flag on an older revision, so I can't answer this. Where is the Portage install history? Because according to files inside /var/log/portage/elog, the two versions I had were 5.9-r2 and 5.9-r3 (since December 2013).
Comment 5 Anthony Basile gentoo-dev 2015-04-21 23:14:17 UTC
(In reply to René Rhéaume from comment #4)
> (In reply to Anthony Basile from comment #3)
> 
> > Rene, did an older version of ncurses work?
> I don't think I enabled the gpm USE flag on an older revision, so I can't
> answer this. Where is the Portage install history? Because according to
> files inside /var/log/portage/elog, the two versions I had were 5.9-r2 and
> 5.9-r3 (since December 2013).

The history is here

https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-libs/ncurses/

Look in the attic, where it says "(Show 51 dead files)".  I was hoping to bracket the error between versions because I didn't see anything obvious in the code.  Also, I don't want to go down a guagmire of bug fixes since it looks like more than one thing is wrong.
Comment 6 René Rhéaume 2015-05-02 19:14:30 UTC
Do you have something simpler? Because going back to ncurses-5.7-r7 requires I downgrade sys-libs/gpm which then requires me to downgrade sys-libs/readline , and readline currently has the following reverse dependencies on my system:

% emerge -pv --depclean sys-libs/readline

Calculating dependencies ... done!
  sys-libs/readline-6.2_p5-r1 pulled in by:
    app-crypt/gnupg-2.0.26-r3 requires sys-libs/readline
    app-office/abiword-2.8.6-r2 requires sys-libs/readline
    app-shells/bash-4.2_p53 requires >=sys-libs/readline-6.2
    app-text/hunspell-1.3.3 requires sys-libs/readline
    dev-db/sqlite-3.8.9 requires sys-libs/readline:0/0=[abi_x86_64(-)], sys-libs/readline:0=[abi_x86_64(-)]
    dev-lang/python-2.7.9-r1 requires >=sys-libs/readline-4.1
    dev-lang/python-3.3.5-r1 requires >=sys-libs/readline-4.1
    dev-libs/libpcre-8.36 requires sys-libs/readline
    dev-libs/libxml2-2.9.2-r1 requires sys-libs/readline:0/0=, sys-libs/readline:=
    media-gfx/gphoto2-2.5.3 requires sys-libs/readline
    net-ftp/lftp-4.6.2 requires >=sys-libs/readline-5.1
    sys-apps/gawk-4.0.2 requires sys-libs/readline
    sys-devel/bc-1.06.95 requires >=sys-libs/readline-4.1
    sys-devel/gdb-7.7.1 requires sys-libs/readline
    sys-fs/xfsprogs-3.2.1 requires sys-libs/readline
    sys-libs/slang-2.2.4-r1 requires >=sys-libs/readline-6.2_p5-r1:0[abi_x86_64(-)]
    sys-process/fcron-3.1.2-r2 requires sys-libs/readline

ncurses-5.8 seemed neglected by Gentoo.
Comment 7 SpanKY gentoo-dev 2015-08-12 08:35:58 UTC
this all boils down to the same issue -- LIBGPM_SONAME is broken

this is because the configure script attempts to detect the soname by using ldd.  on uclibc, the output confuses the script which causes it to print the name twice.

it can be worked around by doing:
  export cf_cv_gpm_soname=libgpm.so.1

the uClibc ldd output is not great regardless:
$ ldd /bin/bash
checking sub-depends for '/lib/libreadline.so.6'
checking sub-depends for '/lib/libncurses.so.5'
checking sub-depends for '/lib/libiconv.so.2'
checking sub-depends for '/lib/libc.so.0'
        libreadline.so.6 => /lib/libreadline.so.6 (0x00000000)
        libncurses.so.5 => /lib/libncurses.so.5 (0x00000000)
        libiconv.so.2 => /lib/libiconv.so.2 (0x00000000)
        libc.so.0 => /lib/libc.so.0 (0x00000000)
        /lib/ld64-uClibc.so.0 => /lib/ld64-uClibc.so.0 (0x00000000)

it shouldn't be emitting those "checking sub-depends" lines.
Comment 8 SpanKY gentoo-dev 2015-08-12 10:10:19 UTC
looks like the ebuild was already passing in the soname via some multilib logic.  i changed it to just do it all the time:
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=912dfbf3095a5087982364d5813b3ebdc03c4cf7

that makes this issue go away, but i think we want to clean up uClibc's ldd
Comment 9 René Rhéaume 2015-08-15 11:04:12 UTC
Created attachment 409060 [details]
config.log

I tried again with the change made by vapier and now econf fails, although ncurses_cfg.h no longer have the two errors.

Attaching config.log as asked by the econf failure. build.log will come next.
Comment 10 René Rhéaume 2015-08-15 11:05:52 UTC
Created attachment 409062 [details]
build.log after change by vapier
Comment 11 René Rhéaume 2015-09-10 00:48:36 UTC
Problem seems fixed since the update to 5.9-r5 then 5.9-r99.
Comment 12 Anthony Basile gentoo-dev 2016-03-01 11:33:09 UTC
(In reply to René Rhéaume from comment #11)
> Problem seems fixed since the update to 5.9-r5 then 5.9-r99.

yep.  closing resolved fixed.