Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 173457 - dev-libs/libevent-1.3a fails to build
Summary: dev-libs/libevent-1.3a fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Caleb Tennis (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-05 11:55 UTC by Wolfram Schlich (RETIRED)
Modified: 2008-01-25 20:27 UTC (History)
4 users (show)

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 Wolfram Schlich (RETIRED) gentoo-dev 2007-04-05 11:55:34 UTC
--8<--
[...]
make[1]: Entering directory `/var/tmp/portage/dev-libs/libevent-1.3a/work/libevent-1.3a'
Making all in .
make[2]: Entering directory `/var/tmp/portage/dev-libs/libevent-1.3a/work/libevent-1.3a'
/bin/sh ./libtool --tag=CC --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat     -march=pentium3 -O2 -pipe -Wall -c -o event.lo event.c
/bin/sh ./libtool --tag=CC --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat     -march=pentium3 -O2 -pipe -Wall -c -o buffer.lo buffer.c
mkdir .libs
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -march=pentium3 -O2 -pipe -Wall -c event.c  -fPIC -DPIC -o .libs/event.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -march=pentium3 -O2 -pipe -Wall -c buffer.c  -fPIC -DPIC -o .libs/buffer.o
event.c: In function ‘gettime’:
event.c:156: warning: implicit declaration of function ‘clock_gettime’
event.c:156: error: ‘CLOCK_REALTIME’ undeclared (first use in this function)
event.c:156: error: (Each undeclared identifier is reported only once
event.c:156: error: for each function it appears in.)
make[2]: *** [event.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -march=pentium3 -O2 -pipe -Wall -c buffer.c -o buffer.o >/dev/null 2>&1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/libevent-1.3a/work/libevent-1.3a'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libevent-1.3a/work/libevent-1.3a'
make: *** [all] Error 2

!!! ERROR: dev-libs/libevent-1.3a failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  ebuild.sh, line 645:   Called die

!!! emake 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/dev-libs:libevent-1.3a:20070405-113346.log'.
--8<--

--8<--[ emerge --info ]--8<--
ortage 2.1.2.3 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.20-gentoo-r4-1 i686)
=================================================================
System uname: 2.6.20-gentoo-r4-1 i686 Pentium III (Katmai)
Gentoo Base System version 1.12.4
Timestamp of tree: Thu, 05 Apr 2007 00:50:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.4.3-r4, 1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /lib/modules /usr/lib/AntiVir/hbedv.key /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg candy ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="        http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror       http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo        http://gentoo.inode.at  http://ftp.ussg.iu.edu/linux/gentoo   http://gentoo.oregonstate.edu   http://distro.ibiblio.org/pub/linux/distributions/gentoo"
INSTALL_MASK=" /etc/apache2/modules.d/*.default-vhost.conf /etc/apache2/vhosts.d/*_default_vhost.conf /etc/portage/saslpass /etc/cron.monthly/update-pciids"
LANG="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=60"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /local/portage/layman/wschlich"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X509 aalib acl autofs bash-completion berkdb bzip2 bzlib cap caps chroot cli cracklib crypt curl ecc examples extensions fam fax finger gdbm gpgme hardened hostap-noplx hpn idea idn imap innodb ipv6 isdn isdnlog lmtp logrotate maildir mailwrapper mbox md5sum memlimit mmap mmx mysqli ncurses nis nls nocardbus nptl nptlonly oav offensive openssh pam pam_chroot pam_console pam_timestamp parse-clocks pcap pcntl pcre perl pic pie pop posix postfix pppd prelude procmail pthreads pwdb python quotas radius readline recode roundrobin rpc rrdtool sample sasl sensord serial session sftplogging shaper shared simplexml skey smime soap sockets socks5 softquota spl sse ssl sysfs sysvipc tcpd tcsim threads trusted udev unicode uptimed usb userlocales uudeview vda vhosts vim virus-scan x86 xinetd xml xmlrpc xsl xslt zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" FRITZCAPI_CARDS="fcpci fcclassic fcpnp" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" MISDN_CARDS="avmfritz" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mga neomagic nsc nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
--8<--
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2007-04-07 22:05:58 UTC
Hmmm.

CLOCK_REALTIME should be defined in time.h (/usr/include/linux/time.h). Wonder why it did not use it, since event.c includes <sys/time.h>.
I have the same linux-headers as you and it compiled fine.
Comment 2 Tom Lloyd 2007-05-08 17:25:29 UTC
I'm seeing this problem too, (almost identical ebuild output, same error, etc.), although my system is pretty different to yours:

Portage 2.1.2.2 (uclibc/ppc/2.4, gcc-4.1.1, uclibc-0.9.28-r1, 2.6.19-efika ppc)
=================================================================
System uname: 2.6.19-efika ppc G2_LE
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 08 May 2007 14:50:01 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61
sys-devel/automake:  1.6.3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.4.26-r1
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CBUILD="powerpc-gentoo-linux-uclibc"
CFLAGS="-Os -pipe"
CHOST="powerpc-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-z,relro"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://10.0.0.2/gentoo-portage"
USE="bitmap-fonts bzip2 cli cracklib dri embedded fastcgi gd ipv6 midi mysql ncurses pcre php ppc readline reflection session spl ssl truetype-fonts type1-fonts uclibc uclibc-compat xorg 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" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


I'll post the ebuild output too if requested, but the only difference I can see between mine and the original reporters' is the arch/buildsystem.
Comment 3 James Barford 2007-05-20 20:09:03 UTC
Yet another arch, same build error:

armeb-softfloat-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -march=armv5t -mtune=xscale -Os -Wall -c event.c  -fPIC -DPIC -o .libs/event.o
event.c: In function `gettime':
event.c:156: warning: implicit declaration of function `clock_gettime'
event.c:156: error: `CLOCK_REALTIME' undeclared (first use in this function)
event.c:156: error: (Each undeclared identifier is reported only once
event.c:156: error: for each function it appears in.)
make[2]: *** [event.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/libevent-1.3a/work/libevent-1.3a'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libevent-1.3a/work/libevent-1.3a'
make: *** [all] Error 2

emerge --info
Portage 2.1.2.7 (uclibc/arm, gcc-3.4.6, uclibc-0.9.28-r0, 2.6.14-rc2 armv5teb)
=================================================================
System uname: 2.6.14-rc2 armv5teb XScale-IXP42x Family rev 1 (v5b)
Gentoo Base System version 1.12.5
Timestamp of tree: Sun, 20 May 2007 09:00:01 +0000
distcc 2.18.3 armeb-softfloat-linux-uclibc (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="arm"
AUTOCLEAN="yes"
CBUILD="armeb-softfloat-linux-uclibc"
CFLAGS="-march=armv5t -mtune=xscale -Os"
CHOST="armeb-softfloat-linux-uclibc"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=armv5t -mtune=xscale -Os"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 arm bitmap-fonts cli cracklib cups dri foomaticdb ithreads jpeg midi mudflap mysql ncurses openmp pcre php ppds readline reflection samba scanner session snmp spl truetype-fonts type1-fonts uclibc usb xorg 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" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 4 James Barford 2007-05-20 20:50:13 UTC
Got it to build by adding "#include <time.h>" in event.c.

This brings in the missing clock_gettime() function prototype. Not sure why this is missing. I would guess its in the configure stage.
Comment 5 Tom Lloyd 2007-05-20 21:36:06 UTC
Fix works for me.

Which is curious, because of these things:

In event.c:
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <sys/_time.h>
#endif

During the ./configure stage:
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
<- SNIP ->
checking for clock_gettime... yes

Can this be added into the ebuild?
Comment 6 James Barford 2007-05-20 21:53:18 UTC
in evdns.c theres the following around time.h.

#ifdef DNS_USE_CPU_CLOCK_FOR_ID
#ifdef DNS_USE_OPENSSL_FOR_ID
#error Multiple id options selected
#endif
#ifdef DNS_USE_GETTIMEOFDAY_FOR_ID
#error Multiple id options selected
#endif
#include <time.h>
#endif


I believe this block (or a similar non DNS specific block) is missing from event.c. configure.in defines DNS_USE_CPU_CLOCK_FOR_ID after the correct test for the functions presence.

if test "x$ac_cv_func_clock_gettime" = "xyes"; then
   AC_DEFINE(DNS_USE_CPU_CLOCK_FOR_ID, 1, [Define if clock_gettime is available in libc])
else
   AC_DEFINE(DNS_USE_GETTIMEOFDAY_FOR_ID, 1, [Define is no secure id variant is available])
fi
Comment 7 karaluch 2007-05-30 09:10:23 UTC
Could somebody clear up it for me  becouse I still don't know how fix that bug :(
Comment 8 Caleb Tennis (RETIRED) gentoo-dev 2007-09-03 17:29:16 UTC
latest version should be in portage, does this fix the issue?
Comment 9 karaluch 2007-09-06 01:13:54 UTC
make.conf

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -fomit-frame-pointer -finline-functions -fforce-addr -mfpmath=sse,387 -s -pipe -ftracer -fstack-protector -DNDEBUG"
CXXFLAGS="-march=pentium4 -O3 -fomit-frame-pointer -finline-functions -fforce-addr -mfpmath=sse,387 -s -pipe -ftracer -fstack-protector -DNDEBUG"

USE="mmx sse sse2 -gtk -gnome qt kde -alsa -arts -dvd -cdr X dri -java samba cups kerberos acl cli apache2 mysql xml ldap pam readline oav libclamav python symlink nptl nptlonly slang -ipv6"

ACCEPT_KEYWORDS="~x86"
MAKEOPTS="-j2 -s"
FEATURES="sandbox strict tbz2"
CLEAN_DELAY="7"

libevent-1.3d doesn't fix my problem :(

../.libs/libevent.so: undefined reference to `debug_ntoa'
collect2: ld returned 1 exit status
make[2]: *** [event-test] Error 1
make[2]: *** Waiting for unfinished jobs....
../.libs/libevent.so: undefined reference to `debug_ntoa'
collect2: ld returned 1 exit status
make[2]: *** [time-test] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
 *
 * ERROR: dev-libs/libevent-1.3d failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_compile
 *   ebuild.sh, line 990:   Called qa_call 'src_compile'
 *   ebuild.sh, line 44:   Called src_compile
 *   ebuild.sh, line 662:   Called die
Comment 10 Paul de Vries 2007-10-23 11:06:59 UTC
(In reply to comment #8)
> latest version should be in portage, does this fix the issue?
> 
version 1.3e does fix this issue for me. I have a similar configuration as James (uclibc/arm, gcc-3.4.6, uclibc-0.9.28-r0, 2.6.14-rc2 armv5teb)
Comment 11 Caleb Tennis (RETIRED) gentoo-dev 2008-01-25 20:27:46 UTC
marking as fixed