Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276787 - sys-libs/slang-2.1.4 fails to build: "ld: cannot find -ltermcap"
Summary: sys-libs/slang-2.1.4 fails to build: "ld: cannot find -ltermcap"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-06 16:25 UTC by Michal Janke
Modified: 2010-05-03 18:13 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Janke 2009-07-06 16:25:54 UTC
This happens on a headless-built, x86 gentoo system. (No X etc...)

The error:

libslang.so.2.1.4 created in /var/tmp/portage/sys-libs/slang-2.1.4/work/slang-2.1.4/src/elfx86objs.
The link libslang.so to libslang.so.2.1.4 was also created.

make[1]: Leaving directory `/var/tmp/portage/sys-libs/slang-2.1.4/work/slang-2.1.4/src'
cd slsh; make all
make[1]: Entering directory `/var/tmp/portage/sys-libs/slang-2.1.4/work/slang-2.1.4/slsh'
cp ../src/config.h .
i686-pc-linux-gnu-gcc -c -O2 -march=native -mtune=native -pipe -ftracer -ftree-vectorize   -I/var/tmp/portage/sys-libs/slang-2.1.4/work/slang-2.1.4/src -DSLSH_CONF_DIR='"/etc"' -DSLSH_PATH='"/usr/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"'  slsh.c
i686-pc-linux-gnu-gcc -c -O2 -march=native -mtune=native -pipe -ftracer -ftree-vectorize   -I/var/tmp/portage/sys-libs/slang-2.1.4/work/slang-2.1.4/src -DSLSH_CONF_DIR='"/etc"' -DSLSH_PATH='"/usr/share/slsh"' -DSLSH_CONF_DIR_ENV='"SLSH_CONF_DIR"' -DSLSH_LIB_DIR_ENV='"SLSH_LIB_DIR"' -DSLSH_PATH_ENV='"SLSH_PATH"'  -DUSE_GNU_READLINE=1 readline.c
i686-pc-linux-gnu-gcc -O2 -march=native -mtune=native -pipe -ftracer -ftree-vectorize   slsh.o readline.o -o slsh_exe -Wl,-O1 -Wl,--sort-common -Wl,--warn-once,--hash-style=gnu -Wl,--as-needed -Wl,-export-dynamic -L/var/tmp/portage/sys-libs/slang-2.1.4/work/slang-2.1.4/src/elfx86objs -lslang -lreadline -ltermcap -ldl  -lm
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -ltermcap
collect2: ld returned 1 exit status
make[1]: *** [slsh_exe] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-libs/slang-2.1.4/work/slang-2.1.4/slsh'
make: *** [elf] Error 2
 * 
 * ERROR: sys-libs/slang-2.1.4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2157:  Called die
 * The specific snippet of code:
 *       emake -j1 elf static || die "emake elf static failed";
 *  The die message:
 *   emake elf static failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-libs:slang-2.1.4:20090706-155351.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/slang-2.1.4/temp/environment'.
 * 


Reproducible: Always

Steps to Reproduce:
emerge sys-libs/slang-2.1.4
Actual Results:  
build fails

Expected Results:  
builds ok

The machine is HEADLESS; All is done via ssh.

emerge --info :
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.27-gentoo-r8_bt1 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8_bt1-i686-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-glibc2.0
Timestamp of tree: Fri, 03 Jul 2009 00:20:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r3
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.4_p6, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -pipe -ftracer -ftree-vectorize"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -mtune=native -pipe -ftracer -ftree-vectorize -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--warn-once,--hash-style=gnu -Wl,--as-needed"
LINGUAS="pl en_GB"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl alsa bash-completion bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog logrotate mad midi minimal mmx mp3 mudflap ncurses nls nptl nptlonly ogg openmp openntpd pam pcre perl pppd python readline reflection session spl sse sse2 ssl ssse3 sysfs unicode userlocales vorbis wma x86 xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en_GB" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Michal Janke 2009-08-04 16:10:16 UTC
I've found several similar problem reports on the web, referring to building other programs. Some people managed to get over this with a workaround to link libtermcap.so to libncurses.so or modify the Makefiles to use ncurses lib instead of termcap. There's also a compatibility package sys-libs/libtermcap-compat in the portage, which might solve the problem as well.

For me, using the first workaround (linking) was enough to build slang.

Could someone more knowledgeable please point which way is the best (or provide a better one)?
Comment 2 MATSUU Takuto (RETIRED) gentoo-dev 2009-08-24 23:54:11 UTC
sorry for delay.
please try to remerge ncurses.

# emerge --oneshot ncurses
# emerge slang
Comment 3 Michal Janke 2009-08-26 20:23:57 UTC
(In reply to comment #2)
> sorry for delay.
> please try to remerge ncurses.
> 
> # emerge --oneshot ncurses
> # emerge slang
> 

Just tried to re-emerge it, and the problem did not occur! 
I removed the symbolic link set previously as a workaround, started the emerge to confirm that it fails the same way - but it didn't!
I don't know, why it went fine this time. I'll dig into the logs to find out if ncurses had been emerged since last time I built slang.
Comment 4 Michal Janke 2009-09-11 23:25:45 UTC
(In reply to comment #3)
> 
> Just tried to re-emerge it, and the problem did not occur! 
> I removed the symbolic link set previously as a workaround, started the emerge
> to confirm that it fails the same way - but it didn't!
> I don't know, why it went fine this time. I'll dig into the logs to find out if
> ncurses had been emerged since last time I built slang.
> 

Sorry for my delay now. Here's some relevant info about my merges:
 # qlop -l | grep "\(slang\|ncurses\)"
Wed Feb 18 04:04:55 2009 >>> sys-libs/slang-2.1.3-r1
Thu Feb 19 00:06:59 2009 >>> sys-libs/ncurses-5.6-r2
Fri Feb 27 17:05:53 2009 >>> sys-libs/ncurses-5.6-r2
Tue Aug  4 13:39:26 2009 >>> sys-libs/slang-2.1.4
Wed Aug  5 00:33:09 2009 >>> sys-libs/ncurses-5.6-r2
Wed Aug 26 17:49:54 2009 >>> sys-libs/slang-2.1.4

...So, it seems I've already re-emerged ncurses earlier (before 2009-08-26). However, before testing later, whether re-emerging it resolves the problem, I first _removed_ the workaround link. Now I'm confused - what is the problem with slang and ncurses, if re-emerging the latter resolves that issue?
Comment 5 Seri Al-Najjar 2009-10-24 15:50:04 UTC
I've just tried this and it seems the problem occurs if you have built ncurses with the "minimal" flag.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-05-03 18:13:44 UTC
fixed in 2.2.2