Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 257823 - net-fs/davfs2 issue with gcc 4.3.3 (_FORTIFY_SOURCE)
Summary: net-fs/davfs2 issue with gcc 4.3.3 (_FORTIFY_SOURCE)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
: 259003 272263 (view as bug list)
Depends on:
Blocks: fortify-source
  Show dependency tree
 
Reported: 2009-02-05 21:26 UTC by Darren Dale
Modified: 2009-06-02 20:26 UTC (History)
4 users (show)

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


Attachments
Fix for compiling with gcc-4.3 (davfs2-1.3.0-gcc-4.3.3-patch.patch,506 bytes, patch)
2009-02-06 15:36 UTC, Mike Mullen
Details | Diff
Fixed early patch for compiling on gcc-4.3 (davfs2-1.3.0-gcc-4.3.3-patch.patch,506 bytes, patch)
2009-02-06 15:44 UTC, Mike Mullen
Details | Diff
patch to use only 0666 as mode (open-O_CREAT-needs-mode.patch,463 bytes, patch)
2009-02-15 10:45 UTC, DarkNRG
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Dale 2009-02-05 21:26:21 UTC
net-fs/davfs2 will not compile on my system, which I recently upgraded to use gcc-4.3.3 and glibc-2.9_p20081201-r1:

x86_64-pc-linux-gnu-gcc -DPROGRAM_NAME=\"mount.davfs\" -DDAV_SYS_CONF_DIR=\"/etc/davfs2\" -DDAV_SYS_RUN=\"/var/run/mount.davfs\" -DDAV_SYS_CACHE=\"/var/cache/davfs2\" -DDAV_SECRETS=\"secrets\" -DDAV_CONFIG=\"davfs2.conf\" -DDAV_CERTS_DIR=\"certs\" -DDAV_CLICERTS_DIR=\"private\" -DDAV_DATA_DIR=\"/usr/share/davfs2\" -DLOCALEDIR=\"/usr/share/locale\" -DDAV_USER=\"davfs2\" -DDAV_GROUP=\"davfs2\" -DHAVE_CONFIG_H -I. -I..    -Wall -O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -I/usr/include/neon -MT webdav.o -MD -MP -MF .deps/webdav.Tpo -c -o webdav.o webdav.c
x86_64-pc-linux-gnu-gcc -DPROGRAM_NAME=\"mount.davfs\" -DDAV_SYS_CONF_DIR=\"/etc/davfs2\" -DDAV_SYS_RUN=\"/var/run/mount.davfs\" -DDAV_SYS_CACHE=\"/var/cache/davfs2\" -DDAV_SECRETS=\"secrets\" -DDAV_CONFIG=\"davfs2.conf\" -DDAV_CERTS_DIR=\"certs\" -DDAV_CLICERTS_DIR=\"private\" -DDAV_DATA_DIR=\"/usr/share/davfs2\" -DLOCALEDIR=\"/usr/share/locale\" -DDAV_USER=\"davfs2\" -DDAV_GROUP=\"davfs2\" -DHAVE_CONFIG_H -I. -I..    -Wall -O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -I/usr/include/neon -MT umount_davfs.o -MD -MP -MF .deps/umount_davfs.Tpo -c -o umount_davfs.o umount_davfs.c
webdav.c: In function 'log_writer':
webdav.c:1427: warning: format not a string literal and no format arguments
mv -f .deps/dav_fuse7.Tpo .deps/dav_fuse7.Po
In function 'open',
    inlined from 'block_writer' at webdav.c:1516:
/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
mv -f .deps/umount_davfs.Tpo .deps/umount_davfs.Po
x86_64-pc-linux-gnu-gcc -Wall -O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer -I/usr/include/neon  -Wl,-O1 -o umount.davfs umount_davfs.o  -Wl,-O1 -lneon -lz -lssl -lcrypto -ldl -lxml2 -lz -lm
make[2]: *** [webdav.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/cache.Tpo .deps/cache.Po
mv -f .deps/mount_davfs.Tpo .deps/mount_davfs.Po
make[2]: Leaving directory `/var/tmp/portage/net-fs/davfs2-1.3.3/work/davfs2-1.3.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-fs/davfs2-1.3.3/work/davfs2-1.3.3'
make: *** [all] Error 2




Reproducible: Always

Steps to Reproduce:




$ emerge --info
Portage 2.2_rc23 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r1-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_275-with-gentoo-2.0.0
Timestamp of tree: Thu, 05 Feb 2009 17:00:01 +0000
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.6.1
dev-util/cmake:      2.6.2-r1
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.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19, 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="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer"
CHOST="x86_64-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/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -mtune=k8 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j5"
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/layman/soor-overlay /usr/local/portage/layman/devnull /usr/local/portage/layman/science /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aac acl acpi alsa amd64 apache2 atlas avahi bash-completion berkdb blas bluetooth bookmarks branding bzip2 cairo cblas cdr cli cracklib crypt ctype cups dbus dirac doc dri dvd dvdr dvdread eds emacs emboss encode esd evo examples f77 fam fftw firefox foomativdb fortran gdbm gfortran gif gimpprint glitz gpm gstreamer gtk hal iconv imagemagick imap isdnlog ivman java jpeg jpeg2k kde kdrive kpathsea lapack latex ldap libnotify lzo mad mdnsresponder-compat midi mikmod mime mmap mmx mozbranding mozilla mozsvg mp3 mpeg mplayer mudflap multilib multislot mysql ncurses newspr nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl pertty pic png postgres ppds pppd python qt3 qt3support qt4 quicktime readline reflection rss samba sdl session spell spl sse sse2 ssl startup-notification subversion svg symlink sysfs tcltk tcpd tetex threads tiff tk transparency truetype ubuntu umfpack unicode usb v4l v4l2 vorbis webdav webkit winbind xcomposite xfs xft xml xorg xulrunner xv zeroconf zlib" ALSA_CARDS="ali5451 als4000atiixp 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="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia vga nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Mullen 2009-02-06 15:36:06 UTC
Created attachment 181166 [details, diff]
Fix for compiling with gcc-4.3
Comment 2 Mike Mullen 2009-02-06 15:36:19 UTC
Here's a patch for the issue.  O_CREAT is asking for another argument, I've supplied it with 0666.  Should be fine.  I also tried this on gcc-4.4 without the patch and it compiles fine.  
Comment 3 Mike Mullen 2009-02-06 15:44:28 UTC
Created attachment 181168 [details, diff]
Fixed early patch for compiling on gcc-4.3

Must of still been asleep had the patch backwards.  This is tested working now.
Comment 4 Mike Mullen 2009-02-06 15:46:10 UTC
Patch compiles clean on gcc 4.1.2, 4.3, and 4.4
Comment 5 Serkan Kaba (RETIRED) gentoo-dev 2009-02-14 22:30:22 UTC
*** Bug 259003 has been marked as a duplicate of this bug. ***
Comment 6 DarkNRG 2009-02-15 10:45:43 UTC
Created attachment 182107 [details, diff]
patch to use only 0666 as mode

Why do you put O_TRUNC into the third argument together with the mode?
Maybe the appended patch is a better approach.
Comment 7 Magnus Granberg gentoo-dev 2009-02-27 22:33:17 UTC
(In reply to comment #3)
> Created an attachment (id=181168) [edit]
> Fixed early patch for compiling on gcc-4.3
> 
> Must of still been asleep had the patch backwards.  This is tested working now.
> 
Your patch is wrong it don't have 0666 in mode.
DarkNRG patch looks okey for me but i would use IRUSR|IWUSR and add more if needed.

Comment 8 Patrick Lauer gentoo-dev 2009-03-01 19:51:33 UTC
+  01 Mar 2009; Patrick Lauer <patrick@gentoo.org>
+  +files/fortify_sources_fix.patch, davfs2-1.3.3.ebuild:
+  Fix for gcc 4.3.3 / fortify_sources, closes #257823. Patch by
+  <DarkNRG@gmx.de>
Comment 9 Sebastian Luther (few) 2009-06-02 20:26:14 UTC
*** Bug 272263 has been marked as a duplicate of this bug. ***