Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775584 - media-libs/libggi-2.2.2-r1 input.c:(.text+0x87): undefined reference to `stdscr' when using slibtool
Summary: media-libs/libggi-2.2.2-r1 input.c:(.text+0x87): undefined reference to `stds...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: tinfo slibtool
  Show dependency tree
 
Reported: 2021-03-12 09:44 UTC by Alessandro Barbieri
Modified: 2022-05-13 20:19 UTC (History)
4 users (show)

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


Attachments
libggi-2.2.2-r1:20210312-093442.log (libggi-2.2.2-r1:20210312-093442.log,798.03 KB, text/plain)
2021-03-12 09:45 UTC, Alessandro Barbieri
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-03-12 09:44:34 UTC
slibtool: link: ln -s ../sub.la .libs/sub.la                                                             
slibtool: link: ln -s ../sub.la .libs/sub.lai                                                            
slibtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc  -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -I/usr/include -pedantic -D_REENTRA
NT -D_THREAD_SAFE -std=gnu99 -Wall -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wswitch -Wmissing-prototypes -Wreturn-type -Wshadow -Wnested-externs -Wredundant-decls -Wuninitialized -Wcast-qual -Wwrite-s
trings -Werror-implicit-function-declaration  -Wl,-O1 -Wl,--as-needed -L/usr/lib -o helper_x_dbe.la  -rpath /usr/lib64/ggi/helper  -shared -module -no-undefined -avoid-version -export-symbols ../display/X/helper
/dbe/EXPSYMS  ../display/X/helper/dbe/libhelper_x_dbe.la ../ggi/libggi.la -lc 
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../display/terminfo/.libs/libterminfo.a(input.o): in function `GII_terminfo_eventpoll':
input.c:(.text+0x87): undefined reference to `stdscr'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: input.c:(.text+0xb8): undefined reference to `wtimeout'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: input.c:(.text+0xcd): undefined reference to `wtimeout'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../display/terminfo/.libs/libterminfo.a(mode.o): in function `GGI_terminfo_flush':
mode.c:(.text+0x78): undefined reference to `LINES'                                                                                                                                                                
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: mode.c:(.text+0x82): undefined reference to `stdscr'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: mode.c:(.text+0x8b): undefined reference to `COLS'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../display/terminfo/.libs/libterminfo.a(mode.o): in function `GGI_terminfo_checkmode':
mode.c:(.text+0x206): undefined reference to `COLS'                                                      
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: mode.c:(.text+0x213): undefined reference to `LINES'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../display/terminfo/.libs/libterminfo.a(mode.o): in function `GGI_terminfo_setmode':
mode.c:(.text+0x4e5): undefined reference to `stdscr'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../display/terminfo/.libs/libterminfo.a(visual.o): in function `GGIopen':
visual.c:(.text+0x30d): undefined reference to `acs_map'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: visual.c:(.text+0x4d6): undefined reference to `acs_map'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../display/terminfo/.libs/libterminfo.a(visual.o): in function `GGIclose':
visual.c:(.text+0x8c6): undefined reference to `stdscr'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../display/terminfo/.libs/libterminfo.a(ncurses.o): in function `_terminfo_new_screen':
ncurses.c:(.text+0x153): undefined reference to `cbreak'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ncurses.c:(.text+0x164): undefined reference to `stdscr'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ncurses.c:(.text+0x16f): undefined reference to `wtimeout'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ncurses.c:(.text+0x17d): undefined reference to `meta'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: ncurses.c:(.text+0x18b): undefined reference to `keypad'
collect2: error: ld returned 1 exit status                                                                                                                                                                         
slibtool: exec error upon slbt_exec_link_create_library(), line 1446: (see child process error messages).                                                                                                          
slibtool: < returned to > slbt_exec_link(), line 1836.                               
make[2]: *** [Makefile:839: terminfo.la] Error 2
Comment 1 Alessandro Barbieri 2021-03-12 09:45:18 UTC
Created attachment 690939 [details]
libggi-2.2.2-r1:20210312-093442.log

buildlog
Comment 2 Ionen Wolkens gentoo-dev 2021-03-12 09:58:44 UTC
I guess slibtool may expose more -ltinfo issues (MAKEFLAGS='LIBTOOL=slibtool LIBS=-ltinfo' worked)
Comment 3 orbea 2022-05-12 03:57:00 UTC
Its the -no-undefined.

On gentoo both -lncurses and -ltinfo are needed, but since GNU libtool silently ignores -no-undefined it somehow works. Slibtool of course will respect this flag explicitly causing the build failure.
Comment 4 Larry the Git Cow gentoo-dev 2022-05-13 20:17:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0672a2622df370d77641ed5acc972a07b901e8b3

commit 0672a2622df370d77641ed5acc972a07b901e8b3
Author:     orbea <orbea@riseup.net>
AuthorDate: 2022-05-12 02:56:23 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-13 20:16:19 +0000

    media-libs/libggi: Fix build with slibtool
    
    On Gentoo both -ltinfo and -lncurses are needed when only the latter is
    used in the build.
    
    Also remove hardcoded instances of libtool and remove acinclude.m4.
    
    Bug: https://bugs.gentoo.org/775584
    Upstream-PR: https://sourceforge.net/p/ggi/patches/7/
    Upstream-PR: https://sourceforge.net/p/ggi/patches/8/
    Signed-off-by: orbea <orbea@riseup.net>
    Closes: https://github.com/gentoo/gentoo/pull/25452
    Signed-off-by: Sam James <sam@gentoo.org>

 .../libggi/files/libggi-2.2.2-slibtool.patch       | 65 ++++++++++++++++++++++
 media-libs/libggi/libggi-2.2.2-r1.ebuild           | 16 ++++++
 2 files changed, 81 insertions(+)