Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258295 - sys-fs/avfs fails to build with gcc-4.3.3 ( DFORTIFY_SOURCE=2 )
Summary: sys-fs/avfs fails to build with gcc-4.3.3 ( DFORTIFY_SOURCE=2 )
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Peter Hyman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: fortify-source
  Show dependency tree
 
Reported: 2009-02-09 04:56 UTC by Boney McCracker
Modified: 2009-03-01 20:09 UTC (History)
2 users (show)

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


Attachments
patch which 'll solve the bug (missing 3nde argument to open call) (avfs-0.9.8-gcc43_fix_open_missing_mode.patch,413 bytes, patch)
2009-02-09 13:00 UTC, Romain Perier (RETIRED)
Details | Diff
new ebuild revision (including epatch call in src_compile subroutine) (avfs-0.9.8-r1.ebuild,1.66 KB, text/plain)
2009-02-09 13:01 UTC, Romain Perier (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boney McCracker 2009-02-09 04:56:30 UTC
Fails to compile.

Reproducible: Always

Steps to Reproduce:
# emerge avfs

Actual Results:  
emerge log attached.  The error is:

In function 'open',
    inlined from 'do_unrar' at urar.c:590,
    inlined from 'rar_open' at urar.c:631:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments


This happens on two machines (Pentium III and Pentium IV).

~ # emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r1-i686-Pentium_III_-Coppermine-with-glibc2.0
Timestamp of tree: Sun, 08 Feb 2009 07:45:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
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/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo http://gentoo.osuosl.org/ http://open-systems.ufl.edu/mirrors/gentoo "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1,--hash-style=gnu"
LINGUAS="en_US 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/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 acl acpi alsa berkdb bzip2 cairo caps cdr cli cracklib crypt cups dbus dri dvd dvdread eds encode esd evo exif ffmpeg flac fortran gdbm gif gnome gnome-keyring gpm gstreamer gtk hal iconv ieee1394 imagemagick java jpeg libnotify logrotate mad midi mmx mp3 mpeg mudflap nautilus ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds python quicktime readline reflection samba sdl session spell spl sse ssl startup-notification svg sysfs threads tiff truetype unicode usb userlocales vorbis win32codecs x86 xml xorg xulrunner xv zlib" ALSA_CARDS="emu10k1" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LINGUAS="en_US en" USERLAND="GNU" VIDEO_CARDS="nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Romain Perier (RETIRED) gentoo-dev 2009-02-09 12:59:14 UTC
Issue is simple, the problem is caused by "warn_unused_result" attribute provided by gcc 4.3 on severals POSIX function (as open or write for example), when O_CREAT mode flags is specified a third is needed to explicitly says file permissions to open.

in attachment, please find a patch which'll solve the problem, and a new revision of the ebuild including this patch.
Comment 2 Romain Perier (RETIRED) gentoo-dev 2009-02-09 13:00:24 UTC
Created attachment 181430 [details, diff]
patch which 'll solve the bug (missing 3nde argument to open call)
Comment 3 Romain Perier (RETIRED) gentoo-dev 2009-02-09 13:01:22 UTC
Created attachment 181431 [details]
new ebuild revision (including epatch call in src_compile subroutine)
Comment 4 Boney McCracker 2009-02-09 21:57:25 UTC
Patch and ebuild work for me.

Thank you kindly, sir.

Leaving open for maintainer.
Comment 5 Romain Perier (RETIRED) gentoo-dev 2009-02-10 10:35:06 UTC
happy to helped you ;)
Comment 6 Patrick Lauer gentoo-dev 2009-03-01 20:09:40 UTC
+*avfs-0.9.8-r1 (01 Mar 2009)
+
+  01 Mar 2009; Patrick Lauer <patrick@gentoo.org>
+  +files/avfs-0.9.8-gcc43_fix_open_missing_mode.patch,
+  +avfs-0.9.8-r1.ebuild:
+  Fix for gcc 4.3.3 / fortify_sources. Patch by Romain Perier.