This may be something with my system but it's fails to compile netplug 1.2.9-r2, 1.2.9-r3, and 1.2.9-r4. Everything else updated/compiled fine. Reproducible: Always Steps to Reproduce: 1.emerge netplug 2. 3. Actual Results: cc -O2 -mtune=i686 -pipe -Wall -Werror -std=gnu99 -DNP_ETC_DIR='"/etc/netplug"' -DNP_SCRIPT_DIR='"/etc/netplug.d"' -DNP_VERSION='"1.2.9"' -c -o main.o main.c cc1: warnings being treated as errors main.c: In function 'child_handler': main.c:164: error: ignoring return value of 'write', declared with attribute warn_unused_result make: *** [main.o] Error 1 Expected Results: netplug compiles successfully. Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.18 i686) ================================================================= System uname: Linux-2.6.18-i686-Intel-R-_Celeron-R-_CPU_2.40GHz-with-glibc2.0 Timestamp of tree: Sat, 07 Feb 2009 00:00:01 +0000 app-shells/bash: 3.2_p48 dev-lang/python: 2.4.3-r1, 2.5.4-r2 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.12 sys-apps/sandbox: 1.3.2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 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="i486-pc-linux-gnu" CFLAGS="-O2 -mtune=i686 -pipe" CHOST="i486-pc-linux-gnu" CONFIG_PROTECT="/etc /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -mtune=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,-O1" 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" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl apache2 berkdb bzip2 cli cracklib crypt curl curlwrappers dri encode examples exif fortran ftp gd gdbm gif gpm iconv isdnlog jpeg midi ming mpeg mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl php png pppd python readline reflection session soap sockets speex spl ssl sysfs taglib tcpd theora unicode v4l x86 xml xorg xvid zip 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 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
I see someone added "(gcc 4.3.3 _FORTIFY_SOURCE problem)" to the title. So is this a dup? Where should I be looking in order to get this fixed? I googled _FORTIFY_SOURCE but didn't find much. I also looked at the other two bugs with similar _FORTIFY_SOURCE markings and didn't figure it out. Thanks for your help.
Please find in attachment a patch which fixs issue and the new ebuild including patch. The problem appended because write POSIX function is declared with attribute "warn_unused_result", causing following warning "main.c:164: error: ignoring return value of 'write', declared with attribute warn_unused_result", and because the sources are compiled with -Werror CFLAGS all warnings are treated as an error, so emerge failed. in patch: i just get the return value of write, i checked if this last was not an error (!= -1) otherwises daemon stops with log_error message.
Created attachment 181231 [details, diff] netplug-1.2.9-warn_unused_result_write_call.patch
Created attachment 181232 [details] the new ebuild which applying patch
Thanks Perier, The patch+ebuild you provided did the trick.
(In reply to comment #5) > Thanks Perier, The patch+ebuild you provided did the trick. > cool, happy to helped you ;). @gentoo dev: the patch seems correct ? (syntaxically)
Created attachment 183200 [details] Remove -Werror Removing the -Werror in the Makefile fix the probs.
+ 01 Mar 2009; Patrick Lauer <patrick@gentoo.org> + +files/netplug-1.2.9-remove-werror.patch, + +files/netplug-1.2.9-warn_unused_result_write_call.patch, + +netplug-1.2.9-r5.ebuild: + Fix for gcc 4.3.3 / fortify_sources, remove -Werror from Makefile. Patches + by Romain Perier and Magnus Granberg.