Description of problem: Fedora 11 don't support static compile of procps 3.2.8 source. Version-Release number of selected component (if applicable): procps 3.2.8 How reproducible: wget http://procps.sourceforge.net/procps-3.2.8.tar.gz tar xvzf procps-3.2.8.tar.gz cd procps-3.2.8 sudo make SHARED=0 CC='gcc -static' Steps to Reproduce: 1. wget http://procps.sourceforge.net/procps-3.2.8.tar.gz 2. tar xvzf procps-3.2.8.tar.gz 3. cd procps-3.2.8 4. sudo make SHARED=0 CC='gcc -static' Actual results: [root@fedora11 procps-3.2.8]# [root@fedora11 procps-3.2.8]# make SHARED=0 CC='gcc -static' gcc -static -fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -O2 -s -Wdeclaration-after-statement -Wpadded -Wstrict-aliasing -fweb -frename-registers -fomit-frame-pointer -fno-inline-functions top.o proc/libproc.a -Wl,-warn-common -o top -lncurses proc/libproc.a(pwcache.o): In function `group_from_gid': pwcache.c:(.text+0x55): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking top.o: In function `parse_uid.clone.0': top.c:(.text+0x477c): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking proc/libproc.a(pwcache.o): In function `user_from_uid': pwcache.c:(.text+0x115): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking top.o: In function `tg2': top.c:(.text+0x1aa3): undefined reference to `cur_term' top.c:(.text+0x1ab9): undefined reference to `tgoto' top.o: In function `bye_bye': top.c:(.text+0x1aff): undefined reference to `putp' top.c:(.text+0x1b0b): undefined reference to `putp' top.c:(.text+0x1b17): undefined reference to `putp' top.c:(.text+0x1b23): undefined reference to `putp' top.o: In function `display_fields': top.c:(.text+0x1c60): undefined reference to `putp' top.o:top.c:(.text+0x1cd2): more undefined references to `putp' follow top.o: In function `capsmk': top.c:(.text+0x1f87): undefined reference to `cur_term' top.c:(.text+0x1fa7): undefined reference to `cur_term' top.c:(.text+0x1fc7): undefined reference to `cur_term' top.c:(.text+0x1fe7): undefined reference to `cur_term' top.c:(.text+0x2014): undefined reference to `cur_term' top.o:top.c:(.text+0x2034): more undefined references to `cur_term' follow top.o: In function `capsmk': top.c:(.text+0x20f7): undefined reference to `tgoto' top.c:(.text+0x2123): undefined reference to `cur_term' top.c:(.text+0x2157): undefined reference to `cur_term' top.c:(.text+0x2180): undefined reference to `tparm' top.c:(.text+0x219e): undefined reference to `cur_term' top.c:(.text+0x21b3): undefined reference to `tparm' top.c:(.text+0x21e9): undefined reference to `cur_term' top.c:(.text+0x21fe): undefined reference to `tparm' top.c:(.text+0x2230): undefined reference to `cur_term' top.c:(.text+0x2245): undefined reference to `tparm' top.c:(.text+0x2275): undefined reference to `cur_term' top.c:(.text+0x2296): undefined reference to `tparm' top.c:(.text+0x2394): undefined reference to `cur_term' top.c:(.text+0x23b7): undefined reference to `cur_term' top.o: In function `wins_resize': top.c:(.text+0x24f4): undefined reference to `cur_term' top.o: In function `show_special': top.c:(.text+0x2f42): undefined reference to `putp' top.c:(.text+0x2fe1): undefined reference to `putp' top.c:(.text+0x301f): undefined reference to `putp' top.o: In function `window_show': top.c:(.text+0x335a): undefined reference to `putp' top.c:(.text+0x3664): undefined reference to `putp' top.o:top.c:(.text+0x43ef): more undefined references to `putp' follow top.o: In function `do_key': top.c:(.text+0x4e0a): undefined reference to `cur_term' top.c:(.text+0x4e48): undefined reference to `putp' top.c:(.text+0x4e54): undefined reference to `putp' top.c:(.text+0x4e69): undefined reference to `putp' top.c:(.text+0x4f3d): undefined reference to `putp' top.c:(.text+0x4f49): undefined reference to `putp' top.o:top.c:(.text+0x4fe8): more undefined references to `putp' follow top.o: In function `main': top.c:(.text+0x6405): undefined reference to `setupterm' top.c:(.text+0x64c5): undefined reference to `putp' top.c:(.text+0x668c): undefined reference to `putp' top.c:(.text+0x6818): undefined reference to `putp' top.c:(.text+0x699f): undefined reference to `putp' top.c:(.text+0x731a): undefined reference to `putp' top.o:top.c:(.text+0x7326): more undefined references to `putp' follow top.o: In function `main': top.c:(.text+0x73f3): undefined reference to `setupterm' top.c:(.text+0x7495): undefined reference to `putp' top.o: In function `suspend': top.c:(.text+0x4733): undefined reference to `putp' collect2: ld returned 1 exit status make: *** [top] 오류 1 [root@fedora11 procps-3.2.8]# [root@fedora11 procps-3.2.8]# [root@fedora11 procps-3.2.8]# rpm -qa | grep ncurse ncurses-5.7-2.20090207.fc11.i586 ncurses-term-5.7-2.20090207.fc11.i586 ncurses-libs-5.7-2.20090207.fc11.i586 ncurses-base-5.7-2.20090207.fc11.i586 ncurses-devel-5.7-2.20090207.fc11.i586 ncurses-static-5.7-2.20090207.fc11.i586 [root@fedora11 procps-3.2.8]# Expected results: No compile erros. Additional info: I can compile procps 3.2.8 source with static on Fedora 6, Ubuntu 9.04.
I think that ncurses of fedora11 is some problems when we try to compile procps 3.2.8 source.
this seems to be ncurses problem, reassigning to ncurses
ncurses in Fedora is configured to put the terminfo code into libtinfo library (instead of libncurses), so you'll need to add -ltinfo to the linking command line.
Thank you for reply about this problem. As you mentioned, I solved static compile with -ltinfo. I summarized steps to compile procps 3.2.8 source with static libraries. [invain@fedora11 ~]$ rpm -ql ncurses-static-5.7-2.20090207.fc11.i586 | grep ncurse /usr/lib/libncurses++.a /usr/lib/libncurses++w.a /usr/lib/libncurses.a /usr/lib/libncurses_g.a /usr/lib/libncursesw.a /usr/lib/libncursesw_g.a [invain@fedora11 ~]$ [invain@fedora11 ~]$ rpm -ql ncurses-static-5.7-2.20090207.fc11.i586 | grep ncurse /usr/lib/libncurses++.a /usr/lib/libncurses++w.a /usr/lib/libncurses.a /usr/lib/libncurses_g.a /usr/lib/libncursesw.a /usr/lib/libncursesw_g.a [invain@fedora11 ~]$ cd /task2/procps-3.2.8 procps-3.2.8/ procps-3.2.8.tar.gz [invain@fedora11 ~]$ cd /task2/procps-3.2.8 [invain@fedora11 procps-3.2.8]$ cat Makefile | grep tinfo CURSES := -lncurses -ltinfo [invain@fedora11 procps-3.2.8]$ make SHARED=0 CC='gcc -static' [invain@fedora11 procps-3.2.8]$ file ./top ./top: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.18, stripped