Bug 56510 - apachetop 0.11 fails to compile, complains of undefined refs in /lib/libreadline.so
Bug#: 56510 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: CLOSED Severity: blocker Priority: P2
Resolution: TEST-REQUEST Assigned To: web-apps@gentoo.org Reported By: pioto01@gmail.com
Component: Applications
URL: 
Summary: apachetop 0.11 fails to compile, complains of undefined refs in /lib/libreadline.so
Keywords:  
Status Whiteboard: 
Opened: 2004-07-08 21:01 0000
Description:   Opened: 2004-07-08 21:01 0000
i have re-emerged readline to no avail... i consistantly get this:

$emerge -v =app-admin/apachetop-0.11
[snip]
g++  -march=pentium4 -O3 -pipe  -pthread   -o apachetop  apachetop.o log.o inlines.o ohtbl.o map.o display.o hits_circle.o timed_circle.o filters.o  -lcurses -ltermcap  -lreadline
/lib/libreadline.so: undefined reference to `tgetnum'
/lib/libreadline.so: undefined reference to `tgoto'
/lib/libreadline.so: undefined reference to `tgetflag'
/lib/libreadline.so: undefined reference to `BC'
/lib/libreadline.so: undefined reference to `tgetent'
/lib/libreadline.so: undefined reference to `UP'
/lib/libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
make[2]: *** [apachetop] Error 1
make[2]: Leaving directory `/var/tmp/portage/apachetop-0.11/work/apachetop-0.11/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/apachetop-0.11/work/apachetop-0.11'make: *** [all] Error 2

!!! ERROR: app-admin/apachetop-0.11 failed.
!!! Function src_compile, Line 28, Exitcode 2
!!! (no error message)

I have no issues with the previous version of apachetop (0.9), it works fine. I just have never been able to get 0.11 to compile correctly...

Reproducible: Always
Steps to Reproduce:
1. emerge -v =app-admin/apachetop-0.11

Actual Results:  
fails to compile [i think it fails on the linking, actually]
emerge fails

Expected Results:  
should properly compile and install the software

mk65 root # emerge info
Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r8)
=================================================================
System uname: 2.6.7-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.4.16
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf
/etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://adelie.polymtl.ca/
ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/bmg-main.alternative"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="S3TC X X509 Xaw3d aalib acl acpi acpi4linux alsa amd apache2 apm avi berkdb
bonobo caps cdr chroot cjk crypt cups curl debug dedicated directfb dnd doc dvd
emacs-w3 encode esd ethereal faad fam fbcon flac foomaticdb gatos gd gdbm ggi
gif gimpprint gnome gnomedb gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile idea
imagemagick imap imlib innodb jack java javamail javascript jikes jpeg jython
ldap libg++ libwww mad maildir mbox mikmod mmx mng motif mozilla moznoirc
moznomail mpeg mpeg4 mule music mysql nas ncurses neXt nls objc offensive
oggvorbis opengl oss pam parse-clocks passfile pcap pda pdflib perl plotutils
png ppds python quicktime readline ruby samba sasl sdk sdl skey slang slp speex
spell sse ssl svga tcltk tcpd tetex theora tiff transcode truetype usb
video_cards_radeon videos vim-with-x virus-scan wmf x86 xchattext xml xml2 xmms
xosd xvid zlib zvbi"

------- Comment #1 From Rob Holland 2004-07-09 09:25:45 0000 -------
--- apachetop-0.11.ebuild       2004-06-24 21:35:17.000000000 +0000
+++ apachetop-0.11-r1.ebuild    2004-07-09 16:24:50.025363072 +0000
@@ -25,6 +25,7 @@
                sed -i 's%DEFAULT_LOGFILE "/var/httpd/apache_log"%DEFAULT_LOGFILE "/var/log/access_log"%' src/apachetop.h
        fi
        ./configure
+       sed -i 's/-lcurses/-lncurses/' src/Makefile
        emake || die
 }

This patch fixes it.

------- Comment #2 From Stuart Herbert (RETIRED) 2004-07-09 13:01:43 0000 -------
Hrm.  I can't reproduce the bug.  I'm happy that the patch isn't going to break
anything.

Please emerge sync, and see if that fixes the problem.

Best regards,
Stu

------- Comment #3 From Mike Kelly 2004-07-09 13:47:30 0000 -------
Thanks! It now finally works... just in time for apachetop-0.12 to be added to
the portage tree...

Just out of curiosities sake, what exactly does that added sed line do? And
what do you think it fixed that wasn't being done properly for me before?