htop fails at Process.c:200: error: 'cpu_set_t' undeclared (first use in this function) Reproducible: Always Steps to Reproduce: 1.emerge -av htop 2. 3. Actual Results: Panel.c:107: warning: C99 inline functions are not supported; using GNU89 Panel.c:107: warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute Panel.c:114: warning: C99 inline functions are not supported; using GNU89 mv -f .deps/htop.Tpo .deps/htop.Po i686-gentoo-freebsd6.2-gcc -DHAVE_CONFIG_H -I. -DSYSCONFDIR=\"/etc\" -pedantic -Wall -std=c99 -O2 -mtune=i686 -pipe -std=c99 -MT Process.o -MD -MP -MF .deps/Process.Tpo -c -o Process.o Process.c Process.c: In function 'Process_getAffinity': Process.c:200: warning: implicit declaration of function 'sched_getaffinity' Process.c:200: error: 'cpu_set_t' undeclared (first use in this function) Process.c:200: error: (Each undeclared identifier is reported only once Process.c:200: error: for each function it appears in.) Process.c:200: error: expected expression before ')' token Process.c: In function 'Process_setAffinity': Process.c:205: warning: implicit declaration of function 'sched_setaffinity' Process.c:205: error: 'cpu_set_t' undeclared (first use in this function) Process.c:205: error: expected expression before ')' token gmake[1]: *** [Process.o] Error 1 gmake[1]: *** Waiting for unfinished jobs.... mv -f .deps/Panel.Tpo .deps/Panel.Po gmake[1]: Leaving directory `/var/tmp/portage/sys-process/htop-0.7/work/htop-0.7' gmake: *** [all] Error 2 * * ERROR: sys-process/htop-0.7 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2325: Called die * The specific snippet of code: * emake || die "make failed" * The die message: * make failed * Expected Results: should compile # emerge --info Portage 2.1.5_rc6 (default-bsd/fbsd/6.2/x86, gcc-4.2.3, freebsd-lib-6.2-r3, 6.2-RELEASE i386) ================================================================= System uname: 6.2-RELEASE i386 i386 Timestamp of tree: Mon, 05 May 2008 16:00:01 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r4, 2.5.2-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.3 sys-devel/autoconf: 2.13, 2.62 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.17-r2 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 6.2-r3 ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd" CBUILD="i686-gentoo-freebsd6.2" CFLAGS="-O2 -mtune=i686 -pipe" CHOST="i686-gentoo-freebsd6.2" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -mtune=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache collision-protect distlocks parallel-fetch sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo" LDFLAGS="" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" 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" PORTDIR_OVERLAY="/usr/portage/local" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac accessibility acl adns apache2 bash-completion bcmath berkdb bidi bindinst browserplugin bzip2 cairo calendar cli cracklib crypt cups curlwrappers dbus dedicated dga dlloader dri dts emacs emacs-w3 erandom ethereal expat fastcgi font ftp gd gdbm geoip glitz glut gnusetup gnutls gtk gtkhtml hal iconv imap immqt-bc inifile innodb java java5 javascript jp2 jpeg jpeg2k libcaca libclamv live lzo midi mime ming mmap motif mpi ncurses nls nsplugin nvidia oav objc oracle oscar oss pam pcre pdf perl php pic posix ppds python qt3support readline reflection samba session shared spl sqlite sse ssl symlink tcltktcpd tcpd test threads unicode urandom usb usepackagedmakefiles userlocales vcd vhosts x86-fbsd xcomposite xml xorg xpm xprint zeroconf zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="BSD" VIDEO_CARDS="nv vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 152007 [details] sys-process:htop-0.7:20080505-214420.log
htop-0.7 seems not to recognize OSs that don't use sched_getaffinity and/or sched_setaffinity syscalls. Thats why it is not building in gfbsd. However, upstream must have seen that because in htop-0.8 they build plpa also, to emulate those calls and make htop work. I'll attach an ebuild for htop-0.8. I've tested it and worked like a charm. It is probably a good idea to put plpa in its own ebuild and then have htop-0.8 depend on that, but that must imply to tweak htop's source to remove the inner plpa in its sources. Best regards,
Created attachment 152483 [details] ebuild for sys-process/htop-0.8 TESTS: overall emerge: PASS collision-protect: PASS test phase: NONE manual testing: PASS emerge --info Portage 2.1.5_rc6 (default-bsd/fbsd/6.2/x86, gcc-4.1.2, freebsd-lib-6.2-r3, 6.2-RELEASE i386) ================================================================= System uname: 6.2-RELEASE i386 i386 Timestamp of tree: Mon, 05 May 2008 03:30:01 +0000 app-shells/bash: 3.2_p17-r1 dev-lang/python: 2.4.4, 2.5.2-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.3 sys-devel/autoconf: 2.62 sys-devel/automake: 1.10.1-r1 sys-devel/binutils: 2.17-r2 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 6.2-r3 ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd" CBUILD="i686-gentoo-freebsd6.2" CFLAGS="-O2 -mtune=i686 -pipe" CHOST="i686-gentoo-freebsd6.2" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release /etc/terminfo" CXXFLAGS="-O2 -mtune=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="collision-detect distlocks parallel-fetch sfperms strict test unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="" PKGDIR="/usr/portage/packages" 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.gentoo.org/gentoo-portage"
Its probably a good idea to mask previous versions of htop for x86-fbsd Best regards,
So what exactly is it that I'm missing here? checking for /proc/stat... yes checking for /proc/meminfo... yes checking for syscall... yes checking sys/syscall.h usability... yes checking sys/syscall.h presence... yes checking for sys/syscall.h... yes checking for unistd.h... (cached) yes checking for __NR_sched_setaffinity... no configure: error: Failed to initialize PLPA. !!! Please attach the following file when seeking support: !!! /var/tmp/portage/sys-process/htop-0.8-r1/work/htop-0.8/config.log * * ERROR: sys-process/htop-0.8-r1 failed.
Hello Dan, Are you using the ebuild attached and USE='plpa-emulate' to emerge this? Cheers,
works fine with the USE flag, didn't even notice it. Thanks
FYI, htop-0.8.1 is going stable. Does this version work for you guys?
Test 0.8.1-r1, if that doesn't work -> Reopen.
Same problem with 0.8.1-r1 and no plpa-emulate USE available.
Created attachment 175726 [details] htop-0.8.1-r1 build log
The ebuild from this bug with plpa-emulate enabled and renamed to 0.8.1-r1 works fine. Someone forgot to commit it this way? :)
What's the status on this? I'm seeing it now on my sparc64 machine: checking for __NR_sched_setaffinity... no configure: error: Failed to initialize PLPA. !!! Please attach the following file when seeking support: !!! /var/tmp/portage/sys-process/htop-0.8.1-r1/work/htop-0.8.1/config.log Sync was done today. If you need more info let me know.
Hm ... interesting - today I managed to install it just fine. The machine was shut down for last few months so that's why maybe reboot helped (after upgrading half of the system) - don't know. Anyway - false positive it seems.
whats going on with this? Just commit the fix and close the bug! slacker :)
Created attachment 183936 [details, diff] htop-0.8.1-r1.ebuild.patch Newer htop wants /proc also on compilation (configure.ac check). So enforce it to be mounted
Created attachment 183937 [details, diff] files/htop-0.8.1-no-plpa.patch
Fix in CVS