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

Bug 439188

Summary: sys-process/audit fails to build on ia64
Product: Gentoo Linux Reporter: Raúl Porcel (RETIRED) <armin76>
Component: New packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: ia64
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: http://sourceware.org/bugzilla/show_bug.cgi?id=762
https://bugs.gentoo.org/show_bug.cgi?id=480218
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 418395    
Attachments: build.log
audit-2.1.3-ia64-compile-fix.patch

Description Raúl Porcel (RETIRED) gentoo-dev 2012-10-21 18:06:10 UTC
Created attachment 327092 [details]
build.log

Portage 2.1.11.9 (default/linux/ia64/10.0/desktop, gcc-4.5.3, glibc-2.15-r2, 3.3.8-gentoo ia64)
=================================================================
System uname: Linux-3.3.8-gentoo-ia64-31-with-gentoo-2.1
Timestamp of tree: Sat, 20 Oct 2012 16:00:02 +0000
app-shells/bash:          4.2_p37
dev-lang/python:          2.5.4-r4, 2.6.8, 2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo x-portage
Installed sets: @system
ACCEPT_KEYWORDS="ia64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="ia64-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="ia64-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
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"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles n
ws parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org ftp://ftp.osuosl.org/pub/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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="/usr/local/portage"
SYNC="rsync://bobolink.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus dri dts dvdr encode exif fam firefox flac fortran fts3 gdbm gif gpm gtk ia64 iconv ipv6 jpeg lcms mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml xulrunner xv xvid zlib" 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" 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="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" 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 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" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vesa radeon" 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, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Raúl Porcel (RETIRED) gentoo-dev 2012-10-21 18:06:53 UTC
Relevant part:
/usr/include/asm/fpu.h:57:8: error: redefinition of 'struct ia64_fpreg'
/usr/include/bits/sigcontext.h:32:8: note: originally defined here


Here they talk about it: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538916
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2012-10-21 18:08:10 UTC
FYI stable version also fails, so i believe its a toolchain issue...
Comment 3 SpanKY gentoo-dev 2012-10-22 02:26:56 UTC
(In reply to comment #1)

this is "to be expected" when it comes to ia64 and trying to include kernel ptrace headers.  either don't include the kernel ptrace headers (stick to the C library ones), or employ this hack:

#ifdef __ia64__ /* what a pos */
# define ia64_fpreg FU_ia64_fpreg
# define pt_all_user_regs FU_pt_all_user_regs
#endif
#ifdef HAVE_ASM_PTRACE_H
# include <asm/ptrace.h>
#endif
#ifdef HAVE_LINUX_PTRACE_H
# include <linux/ptrace.h>
#endif
#undef FU_ia64_fpreg
#undef FU_pt_all_user_regs
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-12-18 21:04:38 UTC
Created attachment 332688 [details, diff]
audit-2.1.3-ia64-compile-fix.patch

vapier:
your fix doesn't work. I attached it here for good measure.
I also tried including it right after #include "config.h" in each of the affected files.

Here's the full trace of the conflicting definitions.
audit-2.2.2/src/auditd-dispatch.c:#include <signal.h>
audit-2.2.2/src/auditd-dispatch.c:#include "libaudit.h"
audit-2.2.2/src/auditd-event.c:#include <signal.h>
audit-2.2.2/src/auditd-event.c:#include "libaudit.h"
audit-2.2.2/src/auditd-reconfig.c:#include <signal.h>
audit-2.2.2/src/auditd-reconfig.c:#include "libaudit.h"
audit-2.2.2/src/auditd-sendmail.c:#include <signal.h>
audit-2.2.2/src/auditd-sendmail.c:#include "libaudit.h"
audit-2.2.2/src/auditd.c:#include <signal.h>
audit-2.2.2/src/auditd.c:#include "libaudit.h"
audit-2.2.2/src/ausearch.c:#include <signal.h>
audit-2.2.2/src/ausearch.c:#include "libaudit.h"

audit-2.2.2/lib/libaudit.h:#include <linux/audit.h>

/usr/include/linux/audit.h: #include <linux/ptrace.h>
/usr/include/linux/ptrace.h:#include <asm/ptrace.h>
/usr/include/asm/ptrace.h:#include <asm/fpu.h>
/usr/include/asm/fpu.h:struct ia64_fpreg {

/usr/include/signal.h:# include <bits/sigcontext.h>
/usr/include/bits/sigcontext.h:struct ia64_fpreg
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-12-18 21:05:10 UTC
Another fix I tried that failed:

#ifdef __ia64__
# include <linux/types.h>
# define __ASSEMBLY__
# include <asm/fpu.h>
# undef __ASSEMBLY__
#endif
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-12-22 01:53:59 UTC
Moved to upstream glibc bugzilla:
http://sourceware.org/bugzilla/show_bug.cgi?id=762
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-12-22 03:36:50 UTC
Fixed in 2.1.3-r1 now with a absolutely ridiculous patch to avoid asm/fpu.h and take the other definition instead.
Comment 8 SpanKY gentoo-dev 2012-12-24 01:39:04 UTC
(In reply to comment #6)

i'm technically the ia64/glibc maintainer upstream now ;)