Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 290210 - Nagios-Plugin uses -fno-stack-protector-all and fails to build with GCC-4.3.4
Summary: Nagios-Plugin uses -fno-stack-protector-all and fails to build with GCC-4.3.4
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Tobias Scherbaum (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-23 08:36 UTC by Richard Scott
Modified: 2009-12-31 09:50 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Scott 2009-10-23 08:36:44 UTC
Whe building Nagios-Plugins with GCC-4.3.4 (following an upgrade from GCC-3.4.6) I get this error:

check_ldap.c:391: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
mv -f .deps/check_ldap.Tpo .deps/check_ldap.Po
i686-pc-linux-gnu-gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap  -I/usr/include -I/usr/include/mysql  -I/usr/include/mysql -march=i686 -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 -fno-stack-protector-all -march=native -O2 -pipe -fomit-frame-pointer -MT check_mysql-check_mysql.o -MD -MP -MF .deps/check_mysql-check_mysql.Tpo -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c
cc1: error: unrecognized command line option "-fno-stack-protector-all"
make[2]: *** [check_mysql-check_mysql.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/check_ide_smart.Tpo .deps/check_ide_smart.Po
make[2]: Leaving directory `/var/tmp/portage/net-analyzer/nagios-plugins-1.4.13-r1/work/nagios-plugins-1.4.13/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-analyzer/nagios-plugins-1.4.13-r1/work/nagios-plugins-1.4.13'
make: *** [all] Error 2

My gcc-config is this:

# gcc-config -l
 [1] i686-pc-linux-gnu-3.4.6
 [2] i686-pc-linux-gnu-3.4.6-hardenednopie
 [3] i686-pc-linux-gnu-3.4.6-hardenednopiessp
 [4] i686-pc-linux-gnu-3.4.6-hardenednossp
 [5] i686-pc-linux-gnu-3.4.6-vanilla
 [6] i686-pc-linux-gnu-4.3.4 *
 [7] i686-pc-linux-gnu-4.3.4-hardenednopie
 [8] i686-pc-linux-gnu-4.3.4-vanilla

Here's my emerge info:

# emerge --info
Portage 2.1.6.13 (hardened/linux/x86/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.28-hardened-r9 i686)
=================================================================
System uname: Linux-2.6.28-hardened-r9-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-gentoo-1.12.11.1
Timestamp of tree: Tue, 20 Oct 2009 23:20:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p28
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://128.61.111.11/pub/gentoo http://128.61.111.9/pub/gentoo ftp://91.121.124.139/gentoo-distfiles/"
LC_ALL="C"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/opt/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 apm berkdb bzip2 cli cracklib crypt curl curlwrappers dri gd gdbm gif gmp gpm hardened iconv idn innodb isdnlog jpeg libg++ libwww modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl php pic png pppd python readline reflection session snmp spl ssl svga sysfs tcpd tetex tiff truetype urandom winbind x86 xml xml2 xorg 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" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 imstt intel   mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage   siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware         voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS






Reproducible: Always

Steps to Reproduce:
1. install gcc-4.3.4
2. emerge nagios-plugins
Comment 1 Richard Scott 2009-10-23 08:37:40 UTC
The problem is the -fno-stack-protector-all flag as apparently this isn't supported after GCC-4.1
Comment 2 Wormo (RETIRED) gentoo-dev 2009-10-28 06:45:52 UTC
Thanks for reporting back the answer, guess we can close this bug then.
Comment 3 Wormo (RETIRED) gentoo-dev 2009-10-28 06:49:04 UTC
Sorry, I misinterpreted your second comment at first. Now I see that you didn't have -fno-stack-protector-all in your CFLAGS, so nagios-plugins must have enabled it...

Comment 4 Richard Scott 2009-10-28 10:01:22 UTC
(In reply to comment #3)
> Sorry, I misinterpreted your second comment at first. Now I see that you didn't
> have -fno-stack-protector-all in your CFLAGS, so nagios-plugins must have
> enabled it...
> 

I'm not entirely sure where it is enabled... some systems have re-compiled ok, and a couple have this error.

Perhaps its a feature of Gentoo and I need to emerge -e system && emerge -e world again! :-(
Comment 5 Tobias Scherbaum (RETIRED) gentoo-dev 2009-12-31 09:50:17 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Sorry, I misinterpreted your second comment at first. Now I see that you didn't
> > have -fno-stack-protector-all in your CFLAGS, so nagios-plugins must have
> > enabled it...
> > 
> 
> I'm not entirely sure where it is enabled... some systems have re-compiled ok,
> and a couple have this error.

Probably it's because of the hardened toolchain you're using.

I fail to reproduce this on some hardened boxes, though.

Can you please re-test with 1.4.14-r1 and re-open this bug if this issue still exists?