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

Bug 319781

Summary: sys-libs/readline-6.1 compile fails with -fstack-protector
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED NEEDINFO    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description ernsteiswuerfel archtester 2010-05-14 22:26:07 UTC
sys-libs/readline-6.1 compile fails with -fstack-protector. compile using CFLAGS without "-fstack-protector" works.

Reproducible: Always

Actual Results:  
checking for sys/stropts.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
make -j4 
x86_64-pc-linux-gnu-gcc -c -I. -I. -D_GNU_SOURCE    -pipe -Os -mtune=amdfam10 -march=amdfam10 -fstack-protector rlfe.c
x86_64-pc-linux-gnu-gcc -c -I. -I. -D_GNU_SOURCE    -pipe -Os -mtune=amdfam10 -march=amdfam10 -fstack-protector pty.c
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,-z,now -Wl,-z,relro -Wl,--sort-common -Wl,--as-needed -Wl,-S -L. -o rlfe rlfe.o pty.o -lreadline -lhistory -lcurses 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [rlfe] Error 1
 * ERROR: sys-libs/readline-6.1 failed:
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 3263:  Called die



(chroot) sysresccd linux # emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop/gnome, gcc-4.3.4, glibc-2.10.1-r1, 2.6.33.03-alt153-amd64 x86_64)
=================================================================
System uname: Linux-2.6.33.03-alt153-amd64-x86_64-AMD_Athlon-tm-_II_X3_405e_Processor-with-gentoo-1.12.13
Timestamp of tree: Fri, 14 May 2010 21:30:20 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -Os -mtune=amdfam10 -march=amdfam10 -fstack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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"
CXXFLAGS="-pipe -Os -mtune=amdfam10 -march=amdfam10 -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,-z,now -Wl,-z,relro -Wl,--sort-common -Wl,--as-needed -Wl,-S"
LINGUAS="de en"
MAKEOPTS="-j4"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups custom-cflags custom-cxxflags cxx dbus dirac djvu dri dts dvd dvdr eds emboss enca encode evo exif fam firefox flac fortran gdbm gdu gif gnome gnome-keyring gnutls gstreamer gtk hal iconv ipv6 ithreads java5 java6 jbig jpeg jpeg2k lcms libnotify libsamplerate live lzma mad matroska mikmod mmap mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls no-old-linux nptl nptlonly nsplugin ogg ogm opengl openmp pam pango pcre pdf perl png policykit ppds pppd pulseaudio python qt3support readline reflection rle schroedinger sdl session smp speex spell spl sse sse2 sse3 ssl startup-notification svg sysfs tcpd theora threads tiff truetype unicode usb vorbis wmf x264 xcb xml xmp xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" RUBY_TARGETS="ruby18" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="fbdev 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2010-05-20 02:55:16 UTC
works fine for me.  it also makes no sense since the main() symbol is always defined in the rlfe.c file.

verify the main symbol exists in rlfe.o in the build dir.  if it does, try dropping some of your extraneous/useless LDFLAGS.
Comment 2 ernsteiswuerfel archtester 2010-05-26 06:06:20 UTC
ahm well.. if I drop the extraneous/useless "-fstack-protector" in my LDFLAGS it compiles well. Just as I said in the summary.