When doing a standard "emerge whowatch", the build fails on account of missing functions. Reproducible: Always Steps to Reproduce: 1. emerge --sync 2. emerge whowatch-1.8.3 Actual Results: whowatch.c: In function 'main': whowatch.c:439: warning: implicit declaration of function 'read_key' whowatch.c:444: warning: implicit declaration of function 'periodic' whowatch.c:415: warning: unused variable 'key' Creating whowatch whowatch.o: In function `main': /var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3/src/whowatch.c:439: undefined reference to `read_key' /var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3/src/whowatch.c:444: undefined reference to `periodic' collect2: ld returned 1 exit status make[1]: *** [whowatch] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3/src' make: *** [all] Error 1 Expected Results: Successfull instalation of whowatch Emerge --info Portage 2.1.11.9 (default/linux/amd64/10.0/server, gcc-4.4.4, glibc-2.15-r3, 2.6.24-23-xen x86_64) ================================================================= System Settings ================================================================= System uname: Linux-2.6.24-23-xen-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2350_HE-with-gentoo-2.1 Timestamp of tree: Mon, 05 Nov 2012 00:30:01 +0000 app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.6.4, 2.7.3-r2, 3.2.3 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.10.2, 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.4.4-r2, 4.5.4 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl amd64 apache2 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre pppd readline session snmp sse sse2 ssl tcpd truetype unicode xml zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON #emerge -pqv '=app-admin/whowatch-1.8.3' [ebuild N ] app-admin/whowatch-1.8.3 Build Log: ^[[32;01m * ^[[39;49;00mPackage: app-admin/whowatch-1.8.3 ^[[32;01m * ^[[39;49;00mRepository: gentoo ^[[32;01m * ^[[39;49;00mMaintainer: jer@gentoo.org ^[[32;01m * ^[[39;49;00mUSE: amd64 elibc_glibc kernel_linux multilib userland_GNU ^[[32;01m * ^[[39;49;00mFEATURES: sandbox >>> Unpacking source... >>> Unpacking whowatch-1.8.3.tar.gz to /var/tmp/portage/app-admin/whowatch-1.8.3/work >>> Source unpacked in /var/tmp/portage/app-admin/whowatch-1.8.3/work >>> Preparing source in /var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3 ... ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 creating cache ./config.cache checking for gcc... x86_64-pc-linux-gnu-gcc checking whether the C compiler (x86_64-pc-linux-gnu-gcc -O2 -pipe -Wl,-O1 -Wl,--as-needed) works... yes checking whether the C compiler (x86_64-pc-linux-gnu-gcc -O2 -pipe -Wl,-O1 -Wl,--as-needed) is a cross-compiler... no checking whether we are using GNU C... yes checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes checking for a BSD compatible install... /usr/bin/install -c checking whether make sets ${MAKE}... yes checking for kvm_openfiles in -lkvm... no checking for scrollok in -lncurses... yes checking for dlopen in -ldl... yes checking for dirent.h that defines DIR... yes checking for opendir in -ldir... no checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E checking for ANSI C header files... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking for fcntl.h... yes checking for sys/ioctl.h... yes checking for sys/time.h... yes checking for unistd.h... yes checking for curses.h... yes checking for working const... yes checking for inline... inline checking for pid_t... yes checking for st_rdev in struct stat... yes checking whether time.h and sys/time.h may both be included... yes checking whether utmp has USER_PROCESS type... yes checking whether utmp has DEAD_PROCESS type... yes checking whether utmp struct has ut_pid member... yes checking whether utmp struct has ut_name member... yes checking whether x86_64-pc-linux-gnu-gcc needs -traditional... no checking return type of signal handlers... void checking for select... yes checking for getloadavg... yes checking whether select() modifies the time value... no checking whether sysctl() can be used... no updating cache ./config.cache creating ./config.status creating Makefile creating src/Makefile creating src/config.h >>> Source configured. >>> Compiling source in /var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3 ... make -j4 Making all in src make[1]: Entering directory `/var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3/src' Compiling [plist.o] Compiling [proctree.o] Compiling [procinfo.o] Compiling [owner.o] Compiling [screen.o] plist.c: In function 'prepare_line': plist.c:152: warning: pointer targets in passing argument 1 of 'snprintf' differ in signedness /usr/include/bits/stdio2.h:62: note: expected 'char * __restrict__' but argument is of type 'u8 *' plist.c:156: warning: pointer targets in passing argument 1 of 'snprintf' differ in signedness /usr/include/bits/stdio2.h:62: note: expected 'char * __restrict__' but argument is of type 'u8 *' plist.c:158: warning: pointer targets in return differ in signedness plist.c: In function 'getprocbyname': plist.c:188: warning: implicit declaration of function 'scr_crsr_jmp' plist.c: In function 'ptreeinfo': plist.c:197: warning: pointer targets in initialization differ in signedness plist.c: In function 'pmsgh': plist.c:282: warning: cast from pointer to integer of different size plist.c:282: warning: return makes pointer from integer without a cast Compiling [block.o] Compiling [ulist.o] Compiling [exti.o] ulist.c: In function 'uprint': ulist.c:88: warning: pointer targets in passing argument 1 of 'snprintf' differ in signedness /usr/include/bits/stdio2.h:62: note: expected 'char * __restrict__' but argument is of type 'u8 *' ulist.c:89: warning: pointer targets in passing argument 2 of 'scr_maddstr' differ in signedness whowatch.h:129: note: expected 'char *' but argument is of type 'u8 *' ulist.c: In function 'user_search': ulist.c:268: warning: implicit declaration of function 'scr_crsr_jmp' Compiling [pluglib.o] ulist.c: In function 'umsgh': ulist.c:290: warning: cast from pointer to integer of different size ulist.c:290: warning: return makes pointer from integer without a cast Compiling [wdgts.o] Compiling [proc_plugin.o] wdgts.c: In function 'do_search': wdgts.c:28: warning: passing argument 3 of 'wmsg_send' makes pointer from integer without a cast whowatch.h:122: note: expected 'void *' but argument is of type 'int' wdgts.c:30: warning: cast from pointer to integer of different size wdgts.c: In function 'ido_search': wdgts.c:78: warning: pointer targets in passing argument 2 of 'do_search' differ in signedness wdgts.c:16: note: expected 'char *' but argument is of type 'u8 *' wdgts.c:79: warning: pointer targets in passing argument 2 of 'do_search' differ in signedness wdgts.c:16: note: expected 'char *' but argument is of type 'u8 *' Compiling [user_plugin.o] proc_plugin.c: In function 'read_tcp_conn': proc_plugin.c:178: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result Compiling [kbd.o] proc_plugin.c: In function 'proc_starttime': proc_plugin.c:399: warning: pointer targets in passing argument 1 of 'ctime' differ in signedness /usr/include/time.h:258: note: expected 'const time_t *' but argument is of type 'long unsigned int *' kbd.c: In function 'getkey': kbd.c:321: warning: pointer targets in initialization differ in signedness kbd.c:323: warning: pointer targets in assignment differ in signedness Compiling [whowatch.o] whowatch.c: In function 'resize': whowatch.c:200: warning: pointer targets in passing argument 1 of 'get_scrsize' differ in signedness whowatch.c:179: note: expected 'int *' but argument is of type 'u32 *' whowatch.c:200: warning: pointer targets in passing argument 2 of 'get_scrsize' differ in signedness whowatch.c:179: note: expected 'int *' but argument is of type 'u32 *' whowatch.c: In function 'info_wdgt': whowatch.c:300: warning: implicit declaration of function 'info_reg' whowatch.c: In function 'main_init': whowatch.c:380: warning: pointer targets in passing argument 1 of 'get_scrsize' differ in signedness whowatch.c:179: note: expected 'int *' but argument is of type 'u32 *' whowatch.c:380: warning: pointer targets in passing argument 2 of 'get_scrsize' differ in signedness whowatch.c:179: note: expected 'int *' but argument is of type 'u32 *' whowatch.c: In function 'main': whowatch.c:439: warning: implicit declaration of function 'read_key' whowatch.c:444: warning: implicit declaration of function 'periodic' whowatch.c:415: warning: unused variable 'key' Creating whowatch whowatch.o: In function `main': /var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3/src/whowatch.c:439: undefined reference to `read_key' /var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3/src/whowatch.c:444: undefined reference to `periodic' collect2: ld returned 1 exit status make[1]: *** [whowatch] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3/src' make: *** [all] Error 1 emake failed ^[[31;01m*^[[0m ERROR: app-admin/whowatch-1.8.3 failed (compile phase): ^[[31;01m*^[[0m emake failed ^[[31;01m*^[[0m ^[[31;01m*^[[0m Call stack: ^[[31;01m*^[[0m ebuild.sh, line 85: Called src_compile ^[[31;01m*^[[0m environment, line 646: Called _eapi2_src_compile ^[[31;01m*^[[0m phase-helpers.sh, line 573: Called die ^[[31;01m*^[[0m The specific snippet of code: ^[[31;01m*^[[0m emake || die "emake failed" ^[[31;01m*^[[0m ^[[31;01m*^[[0m If you need support, post the output of `emerge --info '=app-admin/whowatch-1.8.3'`, ^[[31;01m*^[[0m the complete build log and the output of `emerge -pqv '=app-admin/whowatch-1.8.3'`. ^[[31;01m*^[[0m The complete build log is located at '/var/tmp/portage/app-admin/whowatch-1.8.3/temp/build.log'. ^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/app-admin/whowatch-1.8.3/temp/environment'. ^[[31;01m*^[[0m Working directory: '/var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3' ^[[31;01m*^[[0m S: '/var/tmp/portage/app-admin/whowatch-1.8.3/work/whowatch-1.8.3'
FYI: This is /not/ just the read key function. This is also the periodic function. I intended this to be both cases as I suspect they both stem from the same problem.
Created attachment 328394 [details, diff] Fix #ifdef branch I can't test this properly because it doesn't refresh on my machine. But this should at least fix the build error. One #ifdef branch was never updated after those two functions were renamed. I just moved things around a little, and borrowed some code from the working branch. It builds and runs with and without the #ifdef now.
Thanks for reporting. checking whether select() modifies the time value... yes This is a really awful test and it used to return "yes" but unsurprisingly suddenly returns "no" some of the time, or even most of the time, thereby having us switch to a code path that has some unfinished code - function names elsewhere were updated: periodic() -> main_periodic() read_key() -> getkey() I have fixed that in -r1. Please test.
Having monkeypatched this into my system, I confirm that the -r1 build works.