Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 228457

Summary: net-nds/openldap-2.3.41-r1 / gcc-4.3.1 - getpeereid.c:52: error: storage size of ‘peercred’ isn’t known
Product: Gentoo Linux Reporter: Gasper Azman <gazman>
Component: [OLD] LibraryAssignee: Gentoo LDAP project <ldap-bugs>
Status: RESOLVED FIXED    
Severity: major CC: Sectoid_GGV
Priority: High    
Version: 2006.0   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 225459    

Description Gasper Azman 2008-06-20 06:53:51 UTC
trying to emerge openldap-2.3.41-r1 fails for me, with the annoying error of
## snippet
cc -O3 -march=native -pipe -finline-functions -I../../include        -I../../include       -c -o fetch.o fetch.c
fetch.c: In function ‘ldif_open_url’:
fetch.c:52: warning: assignment discards qualifiers from pointer target type
cc -O3 -march=native -pipe -finline-functions -I../../include        -I../../include       -c -o setproctitle.o setproctitle.c
cc -O3 -march=native -pipe -finline-functions -I../../include        -I../../include       -c -o getpeereid.o getpeereid.c
getpeereid.c: In function ‘getpeereid’:
getpeereid.c:52: error: storage size of ‘peercred’ isn’t known
make[2]: *** [getpeereid.o] Error 1
## end snippet



Reproducible: Always

Steps to Reproduce:
Try to emerge net-nds/openldap-2.3.41-r1 with USE=minimal



Emerge info:

Portage 2.1.5.6 (default/linux/x86/2008.0/developer, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r4 i686)
=================================================================
System uname: 2.6.25-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Timestamp of tree: Fri, 20 Jun 2008 01:00:02 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=native -pipe -finline-functions"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
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/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O3 -march=native -pipe -finline-functions"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="collision-protect cvs digest distlocks fixpackages multilib-strict parallel-fetch sandbox sfperms sign splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.inode.at/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://de-mirror.org/distro/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US"
LC_ALL="en_US.utf8"
LDFLAGS=""
LINGUAS="en sl"
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/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa asf bash-completion berkdb bidi bluetooth browserplugin bzip2 cairo ccache cddb cdr cdrom cjk cli cracklib crypt css cups curl dba dbus directfb divx4linux dlloader dri dts dvd dvdr dvdread eds encode evo fam fame fbcon ffmpeg firefox flac fortran freetype ftp gd gdbm gif gimpprint git gkrellm glx gpm gstreamer gtk gtk2 hal iconv imap isdnlog jack java javascript jikes jpeg kde kdeenablefinal kdehiddenvisibility kdexdeltas kerberos ldap libcaca libnotify live logitech-mouse mad maildir mailwrapper matroska midi mikmod mime mmap mmx mmxext mozilla mp3 mp4 mpeg mplayer mtrr mudflap musepack musicbrainz nas ncurses nls no-old-linux nptl nptlonly nsplugin nvidia ogg oggvorbis opengl openmp opera pam pcre pdf perl pic png ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection sblive screen sdl session skins sndfile snmp spell spl sse sse2 ssl startup-notification stream subtitles subversion svg tcpd tga theora threads tiff truetype unicode usb utf8 vcd vim-syntax vorbis win32codecs wmf x x86 xcomposite xinerama xml xml2 xorg xpm xulrunner xv xvid zlib" ALSA_CARDS="emu10k1" 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 authn_default authn_file authz_user autoindex cache dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident info log_config logio mem_cache mime mime_magic negotiation setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sl" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Gasper Azman 2008-06-20 06:55:18 UTC
I just tried to emerge openldap again, this time with USE='-minimal' and the bug still occurred.
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2008-06-20 15:50:04 UTC
This is really a glibc-2.8 bug. struct ucred is now guarded by USE_GNU. Fixed by append-flagging -D_GNU_SOURCE. Lazy fix, upstream will deal with this later. Hope nobody minds.

+  20 Jun 2008; Peter Alfredsen <loki_val@gentoo.org>
+  openldap-2.3.41-r1.ebuild:
+  Add -D_GNU_SOURCE for using struct ucred. Bug 228457.
+

pa@loki ~/gentoo-cvs/gentoo-x86/net-nds/openldap $ cvs diff
Index: openldap-2.3.41-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.3.41-r1.ebuild,v
retrieving revision 1.1
diff -u -b -B -r1.1 openldap-2.3.41-r1.ebuild
--- openldap-2.3.41-r1.ebuild   21 May 2008 18:23:20 -0000      1.1
+++ openldap-2.3.41-r1.ebuild   20 Jun 2008 15:44:20 -0000
@@ -235,6 +235,9 @@
 src_compile() {
        local myconf

+       #Fix for glibc-2.8 and ucred. Bug 228457.
+       append-flags -D_GNU_SOURCE
+
        # HDB is only available with BerkDB
        myconf_berkdb='--enable-bdb --enable-ldbm-api=berkeley --enable-hdb=mod'
        myconf_gdbm='--disable-bdb --enable-ldbm-api=gdbm --disable-hdb'
Comment 3 Sectoid 2008-06-20 22:58:07 UTC
Compilation still fails when custom CFLAGS is set in make.conf.

brujah openldap # emerge --info
Portage 2.2_rc1 (default-linux/x86/2007.0/desktop, gcc-4.2.4, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r4-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-glibc2.0
Timestamp of tree: Fri, 20 Jun 2008 16:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r12, 2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
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.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -mtune=pentium4 -march=pentium4 -msse -msse2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O3 -mtune=pentium4 -march=pentium4 -msse -msse2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.prz.rzeszow.pl http://gentoo.po.opole.pl http://gentoo.ynet.sk/pub http://mirror.aiya.ru/pub/gentoo/ http://ftp.citkit.ru/pub/Linux/gentoo http://gentoo.gg3.net/  http://gentoo.channelx.biz/ "
LANG="en_US.UTF-8"
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/my"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl acpi aim alsa ao apache2 audiofile bash-completion berkdb bluetooth bzip2 cairo caps cddb cdparanoia cdr cli cracklib crypt ctype cups curl curlwrappers d dbus dga dri dts dv dvd dvdr dvdread eds emacs emboss encode evo exif fam fbcon ffmpeg fftw firefox flac foomaticdb ftp gd gdbm ggi gif glut gmp gnutls gphoto2 gpm gps graphviz gsl gstreamer gtk guile hal howl iconv icq idn ieee1394 imagemagick imap imlib inifile innodb ipv6 isdnlog jabber jack java javascript jbig jpeg jpeg2k kde kdehiddenvisibility kerberos ladspa lame lash lcms ldap leim lesstif libcaca libnotify libsamplerate libwww lirc lm_sensors mad maildir mailwrapper matroska mbox memlimit mhash midi mikmod mime mmap mmx mng modplug motif mp3 mpeg mpi mplayer msn mudflap mule musepack musicbrainz mysql nas ncurses netcdf nls nntp nptl nptlonly nsplugin ocaml ogg openal openexr opengl openmp osc oscar pam pcmcia pcntl pcre pda pdf perl png portaudio posix ppds pppd pulseaudio python qt3 qt3support qt4 quicktime rdesktop readline recode reflection samba sasl sdl session sharedmem simplexml skey slang slp sndfile snmo soap sockets sox speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification svg symlink syslog sysvipc szip tcl tcpd tetex theora threads tidy tiff tk truetype unicode usb vhosts vorbis wifi win32codecs wmf x264 x86 xattr xcomposite xface xine xinerama xinetd xml xmlrpc xorg xosd xpm xscreensaver xsl xv xvid yahoo 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" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="ati"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS