Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437558 - dev-lang/erlang-15.2.2 - In file included from beam/sys.h:47:0, from hipe/hipe_mkliterals.c:29: sys/unix/erl_unix_sys.h:177:1: error: unknown type name ‘hrtime_t’
Summary: dev-lang/erlang-15.2.2 - In file included from beam/sys.h:47:0, from hipe/hip...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dirkjan Ochtman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-08 00:19 UTC by Craig Andrews
Modified: 2013-01-15 21:05 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (dev-lang:erlang-15.2.2:20121008-000943.log,49.40 KB, text/plain)
2012-10-08 00:20 UTC, Craig Andrews
Details
kernel-config-x86_64-3.6.0-gentoo (kernel-config-x86_64-3.6.0-gentoo,85.67 KB, text/plain)
2012-10-09 21:49 UTC, Craig Andrews
Details
config.log (config.log,22.12 KB, text/plain)
2012-10-10 16:24 UTC, Craig Andrews
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Andrews gentoo-dev 2012-10-08 00:19:20 UTC
dev-lang/erlang-15.2.2 does not compile.

The last error is:
x86_64-pc-linux-gnu-gcc  -O3 -march=native -pipe -fomit-frame-pointer -flto -I/var/tmp/portage/dev-lang/erlang-15.2.2/work/otp_src_R15B02/erts/x86_64-pc-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE  -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS  -Ix86_64-pc-linux-gnu/opt/plain -Ibeam -Isys/unix -Isys/common -Ix86_64-pc-linux-gnu -Ipcre -Ihipe -I../include -I../include/x86_64-pc-linux-gnu -I../include/internal -I../include/internal/x86_64-pc-linux-gnu -c hipe/hipe_mkliterals.c -o obj/x86_64-pc-linux-gnu/opt/plain/hipe_mkliterals.o
In file included from beam/sys.h:47:0,
                 from hipe/hipe_mkliterals.c:29:
sys/unix/erl_unix_sys.h:177:1: error: unknown type name ‘hrtime_t’
make[2]: *** [obj/x86_64-pc-linux-gnu/opt/plain/hipe_mkliterals.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-lang/erlang-15.2.2/work/otp_src_R15B02/erts/emulator'
make[1]: *** [generate] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-lang/erlang-15.2.2/work/otp_src_R15B02/erts/emulator'
make: *** [depend] Error 2
emake failed


Reproducible: Always

Steps to Reproduce:
1. emerge =dev-lang/erlang-15.2.2



# emerge erlang -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] dev-lang/erlang-15.2.2 [15.2.1] USE="hipe java kpoll sctp ssl -compat-ethread -doc -emacs -halfword -odbc -smp -tk -wxwidgets" 0 kB

# emerge --info
Portage 2.1.11.24 (default/linux/amd64/10.0, gcc-4.7.2, glibc-2.15-r3, 3.6.0-gentoo x86_64)
=================================================================
System uname: Linux-3.6.0-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.2
Timestamp of tree: Sun, 07 Oct 2012 16:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.8 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.4
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo openrc webapp-experimental sabayon sunrise x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Intel-SDP"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -flto"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=4.5"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -flto"
LINGUAS="en"
MAKEOPTS="-j5"
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="/var/lib/layman/openrc /var/lib/layman/webapps-experimental /var/lib/layman/sabayon /var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aacs acl acpi aiglx alsa amd64 amr amrnb amrwb animation apache2 apng artworkextra asf aspnet2 asyncns authdaemond avahi avi bash-completion bcmath berkdb bitmap-fonts bluetooth bluray bmp bonjour bzip2 cairo caps ccache cdda cddb cdparanoia cdr chm cli consolekit cracklib crypt cryptsetup css cups curl cxx daap dbus device-mapper dga dirac divx4linux dlloader dovecot-sasl dpms dri dts dv dvb dvd dvdr dvdread enca encode exif faac fam fame fat fbcondecor fbsplash ffmpeg fftw firefox flac fontconfig foomaticdb fortran freetype ftp gaim gd gdbm geoip gif gimpprint glamor gles glib glibc-omitfp glitz glut gnome gphoto2 gpm gsm gstreamer gstreamer10 gtk gtk2 hardenedphp hbci howl howl-compat https iconv idn imagemagick imap imlib innodb ipv6 java java5 jbig joystick jpeg jpeg2k junit kdehiddenvisibility kvm lapack lcms libfame libkms libnotify libsamplerate libusb lirc live lm_sensors lzma lzo mad maildir mdnsresponder-compat mjpeg mmap mms mmx mmxext mng modules mono motif mozilla mozsvg mp3 mpeg mpeg2 mplayer mudflap multilib musepack mysql mythtv ncurses nemesi network nls nptl nptlonly ntfs offensive ofx ogg oggvorbis openal opencl openexr opengl openmp openvg pam pango pcre pdf pdflib perl phonon pic pie png pnp policykit ppd ppds pppd pulseaudio python qt qt3 qt3support qt4 quicktime rar readline resolvconf rtc rtmp samba schroedinger screensaver sctp sdl session sharedmem shout sna sni snmp sox speex spell sqlite sse sse2 sse3 ssl ssse3 suspend2 svg tcpd theora threads tiff tls transcode truetype truetype-fonts type-fonts udev udisks unicode unzip upnp ups usb uxa v4l2 vaapi vcd vdpau videos vorbis vpx wayland webdav webservices wifi wmf wv x264 xa xanim xattr xcb xcomposite xinerama xml xml2 xpm xprint xrandr xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="hda-intel" 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="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 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 auth_digest proxy proxy_ajp proxy_connect proxy_http reqtimeout cgi" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" 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="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" LIRC_DEVICES="userspace" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="jruby ruby19" USERLAND="GNU" VIDEO_CARDS="intel" 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"
USE_PYTHON="2.7 3.2"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Craig Andrews gentoo-dev 2012-10-08 00:20:10 UTC
Created attachment 325962 [details]
build log
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-10-08 11:17:42 UTC
x86_64-pc-linux-gnu-gcc  -O3 -march=native -pipe -fomit-frame-pointer -flto -I/var/tmp/portage/dev-lang/erlang-15.2.2/work/otp_src_R15B02/erts/x86_64-pc-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE  -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS  -Ix86_64-pc-linux-gnu/opt/plain -Ibeam -Isys/unix -Isys/common -Ix86_64-pc-linux-gnu -Ipcre -Ihipe -I../include -I../include/x86_64-pc-linux-gnu -I../include/internal -I../include/internal/x86_64-pc-linux-gnu -c hipe/hipe_mkliterals.c -o obj/x86_64-pc-linux-gnu/opt/plain/hipe_mkliterals.o
In file included from beam/sys.h:47:0,
                 from hipe/hipe_mkliterals.c:29:
sys/unix/erl_unix_sys.h:177:1: error: unknown type name ‘hrtime_t’
make[2]: *** [obj/x86_64-pc-linux-gnu/opt/plain/hipe_mkliterals.o] Error 1
Comment 3 Boris Faure 2012-10-09 21:03:22 UTC
Could you please paste the line written during configure about "checking how to correct for time adjustments..." ?
Comment 4 Craig Andrews gentoo-dev 2012-10-09 21:05:15 UTC
(In reply to comment #3)
> Could you please paste the line written during configure about "checking how
> to correct for time adjustments..." ?

checking how to correct for time adjustments... hrtime

I attached the build log, too.
Comment 5 Boris Faure 2012-10-09 21:45:17 UTC
"checking for gethrtime... yes" seems strange.
Are you using realtime linux?
Could you try to compile the following C code (just gcc tmp.c) ?
int main()
{
    gethrtime();
    return 0;
}
Comment 6 Craig Andrews gentoo-dev 2012-10-09 21:48:50 UTC
(In reply to comment #5)
> "checking for gethrtime... yes" seems strange.
> Are you using realtime linux?
> Could you try to compile the following C code (just gcc tmp.c) ?
> int main()
> {
>     gethrtime();
>     return 0;
> }

$ gcc tmp.c 
/tmp/cc2UCBEe.o: In function `main':
test.c:(.text+0xa): undefined reference to `gethrtime'
collect2: error: ld returned 1 exit status


I didn't expect that. I'm not running real time linux - I'm using 3.6.0-gentoo. I'm attaching my .config
Comment 7 Craig Andrews gentoo-dev 2012-10-09 21:49:17 UTC
Created attachment 326136 [details]
kernel-config-x86_64-3.6.0-gentoo
Comment 8 Mira Ressel 2012-10-10 16:04:12 UTC
Couldn't reproduce this, neither with hardened-sources-3.5.4-r1 nor with gentoo-sources-3.6.0. In both cases, I get

checking for gethrtime... no
checking how to correct for time adjustments... clock_gettime

instead of your

checking for gethrtime... yes
checking how to correct for time adjustments... hrtime


There really seems to be some black autotools magic involved here...
Comment 9 Boris Faure 2012-10-10 16:12:49 UTC
Could you attach the config.log?
Comment 10 Craig Andrews gentoo-dev 2012-10-10 16:24:50 UTC
Created attachment 326200 [details]
config.log

This is /var/tmp/portage/dev-lang/erlang-15.2.2/work/otp_src_R15B02/config.log
Comment 11 Craig Andrews gentoo-dev 2012-11-05 19:20:36 UTC
This problem is reproducible with:
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -flto"
LDFLAGS="${LDFLAGS} -flto"

As well as with:
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -flto -fno-lto"
LDFLAGS="${LDFLAGS} -flto -fno-lto"

However, the problem does not occur with:
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"
LDFLAGS="${LDFLAGS}"

As I understand it, "-flto -fno-lto" should be equivalent to "", so 2 and 3 above should have the same behavior. But they don't!
Comment 12 Boris Faure 2012-11-07 22:54:06 UTC
Looks like a gcc bug.
If you take the following piece of code (as conftest.c):

#include <limits.h>
char gethrtime ();
char (*f) () = gethrtime;
int main () {
return f != gethrtime;
}

then,
'cc -o conftest conftest.c -flto'
will produce an error as expected while
'cc -o bite -O2 bite.c -flto'
will not.
Comment 13 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-12-31 09:29:10 UTC
Boris, perhaps you can file a gcc bug? Closing this as UPSTREAM.
Comment 14 Boris Faure 2013-01-15 21:05:00 UTC
It's not a bug in gcc itself.
It was a bug in autoconf-2.59 that upstream use to generate its configure.
I couldn't reproduce the issue after doing an "autoreconf" with autoconf-2.69.
Should it be added to the ebuild?