Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 498794 - app-crypt/mit-krb5-1.12.1 - sendto_kdc.c:380:56: error: ‘curtime’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
Summary: app-crypt/mit-krb5-1.12.1 - sendto_kdc.c:380:56: error: ‘curtime’ may be used...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kerberos Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 14:30 UTC by Jura
Modified: 2014-03-26 10:38 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,276.70 KB, text/plain)
2014-01-21 14:32 UTC, Jura
Details
Build fix for mit-krb5-1.12.1 (mit-krb5-1.12.1_uninitialized.patch,644 bytes, patch)
2014-02-04 11:27 UTC, Andreas Steinmetz
Details | Diff
uninitialized.patch (uninitialized.patch,457 bytes, patch)
2014-03-18 14:30 UTC, Ed Catmur
Details | Diff
krb5-1.12.1-Wuninitialized-initializations.patch (krb5-1.12.1-Wuninitialized-initializations.patch,1.03 KB, patch)
2014-03-18 19:28 UTC, Victor Roman Archidona
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jura 2014-01-21 14:30:44 UTC
Failed to emerge app-crypt/mit-krb5-1.12.1

Reproducible: Always

Steps to Reproduce:
1.emerge -av1 app-crypt/mit-krb5
2.ERROR: app-crypt/mit-krb5-1.12.1::gentoo failed (compile phase): emake failde
3.



Portage 2.2.8 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.17, 3.6.12-pf x86_64)
=================================================================
System uname: Linux-3.6.12-pf-x86_64-Pentium-R-_Dual-Core_CPU_E5200_@_2.50GHz-with-gentoo-2.2
KiB Mem:     8180972 total,    336356 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of tree: Mon, 20 Jan 2014 18:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.3
dev-util/cmake:           2.8.12.1-r3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo masterlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -finline-functions"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.0/conf /usr/share/maven-bin-2.2/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -finline-functions"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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/masterlay"
USE="X a52 aac acl acpi alsa amd64 amr apng auto-hinter avahi berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dconf dri dts dvd dvdr emboss encode exif extras faac faad fam ffmpeg firefox flac foomaticdb fortran gdbm gif gpm gtk gtk3 iconv id3tag jpeg lame lcms libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nm-applet nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio python qt3support readline samba sdl session spell sse sse2 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb video vim vim-syntax vorbis vpx wxwidgets x264 xcb xinerama xml xv xvid zlib zsh zsh-completion" ABI_X86="64" ALSA_CARDS="hda-intel" 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 author" 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 ublox 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" LINGUAS="ru" NETBEANS_MODULES="ide java" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Jura 2014-01-21 14:32:00 UTC
Created attachment 368330 [details]
build.log
Comment 2 Ben Kohler gentoo-dev 2014-01-25 20:51:16 UTC
This seems to be caused by -finline-functions in CFLAGS... normally I'd say INVALID for goofy CFLAGS, but that one is in -O3 and I *think* I've been told that -O3 build bugs are valid.

Anyway, you can work around this issue by removing that from CFLAGS.  The maintainers can decide if this is a valid bug or not.
Comment 3 sulfinu 2014-01-28 09:43:55 UTC
Nope, I have pretty reasonable flags an still see almost the same problem:

x86_64-pc-linux-gnu-gcc -fPIC -DSHARED -DHAVE_CONFIG_H  -I../../include -I../../include  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -I/usr/include/et -march=native -Os -pipe -fno-strict-aliasing -fno-strict-overflow -Wall -Wcast-align -Wshadow -Wmissing-prototypes -Wno-format-zero-length -Woverflow -Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare -Werror=uninitialized -Werror=pointer-arith -Werror=declaration-after-statement -Werror-implicit-function-declaration -pthread -c packet.c -o packet.so.o && mv -f packet.so.o packet.so
packet.c: In function 'krad_packet_new_request':
packet.c:270:5: error: 'id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1: some warnings being treated as errors
make[2]: *** [packet.so] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-crypt/mit-krb5-1.12.1/work/krb5-1.12.1/src/lib/krad'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-crypt/mit-krb5-1.12.1/work/krb5-1.12.1/src/lib'
make: *** [all-recurse] Error 1
 * ERROR: app-crypt/mit-krb5-1.12.1::gentoo failed (compile phase):
 *   emake failed


My environment:
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.18-r1, 3.12.7-gentoo x86_64)
=================================================================
System uname: Linux-3.12.7-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_W3550_@_3.07GHz-with-gentoo-2.2
KiB Mem:     8164464 total,   3348516 free
KiB Swap:    8000364 total,   8000228 free
Timestamp of tree: Sat, 25 Jan 2014 15:45:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.3
dev-util/cmake:           2.8.12.1-r4
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.12 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo CZC20509P3
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -Os -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -Os -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --quiet-build n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/     http://ftp.uni-erlangen.de/pub/mirrors/gentoo/  http://ftp.halifax.rwth-aachen.de/gentoo/        http://distfiles.gentoo.org/"
LANG="ro_RO"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acpi ads alsa amd64 apng audiofile bash-completion branding bzip2 cairo cdda clucene consolekit cracklib crypt cups curl cxx dbus declarative dga directfb dri drm dts dvd dvdr encode exif fam fbcon ffmpeg firefox flac foomaticdb ftp gbm gdbm gif gs iconv imagemagick imap ipv6 jabber java6 javascript jbig jce jingle jpeg jpeg2k kde kipi kontact lcms ldap libkms libnotify live lm_sensors lzma lzo mad mime minizip mmx mmxext mng modules mp3 mp4 mpeg msn multilib mysql ncurses nls nptl nsplugin ogg openexr opengl openssl pam pango pcre pdf pdfimport pg-intdatetime phonon plasma png policykit posix ppds qt3support qt4 quicktime rdesktop readline scanner sdl semantic-desktop session sharedmem sip sockets speex spell sse sse2 sse3 ssl ssse3 startup-notification subversion svg tcpd theora threads tidy tiff truetype udev udisks unicode upower usb v8 vcd video vlc vnc voice vorbis wmf wxwidgets x264 xcb xcomposite xinerama xml xorg xpm xscreensaver xv xvid yahoo zip zlib" ABI_X86="64" 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" 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 author" 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 ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ro en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="ricoh" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 4 Ben Kohler gentoo-dev 2014-01-28 15:17:22 UTC
Someone much more qualified than myself will have to figure out exactly which flags are triggering this, but I believe you can reproduce/workaround this by manipulating CFLAGS.

-Os fail
-O1 success
-O2 success
-O3 fail
-O3 -fno-inline-functions success
Comment 5 Denis Dupeyron (RETIRED) gentoo-dev 2014-01-30 20:01:45 UTC
In my opinion the issue is more due to the presence of -Werror=uninitialized than with your choice of CFLAGS. As you noted, -O3 implies -finline-functions, and -O3 is a reasonnable flag, even if not always optimal.

All those -Werror compile options need to be stripped from the build system.

Denis.
Comment 6 Andreas Steinmetz 2014-02-04 11:27:32 UTC
Created attachment 369520 [details, diff]
Build fix for mit-krb5-1.12.1

Oh well, new ebuilds should be tested with -O3 or the -Werror stuff stripped from the ebuild.
Comment 7 Ed Catmur 2014-03-18 14:30:34 UTC
Created attachment 372942 [details, diff]
uninitialized.patch

The problem appears to be that gcc doesn't realize that gettimeofday is guaranteed to set errno to non-zero on failure.  Sticking an assert in fixes the issue at source.
Comment 8 Victor Roman Archidona 2014-03-18 19:28:49 UTC
Created attachment 372968 [details, diff]
krb5-1.12.1-Wuninitialized-initializations.patch

There are more places which reports the same failure. The attached patch applied over the current ~app-crypt/mit-krb5 allows it to be built.
Comment 9 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2014-03-22 17:30:51 UTC
I can confirm the patch from #8 fixes my build problems.
Comment 10 Eray Aslan gentoo-dev 2014-03-26 10:38:42 UTC
Fixed without revbump.

+  26 Mar 2014; Eray Aslan <eras@gentoo.org>
+  +files/mit-krb5-1.12_warn_cflags.patch, mit-krb5-1.12.1.ebuild:
+  Do not build with -Werror - bug #498794
+