Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 114761 - libtorrent-0.8.0 fails to compile with gcc-3.4.4-hardened
Summary: libtorrent-0.8.0 fails to compile with gcc-3.4.4-hardened
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL: http://mail-index.netbsd.org/pkgsrc-b...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-07 08:24 UTC by Marcin Deranek
Modified: 2005-12-07 14:39 UTC (History)
0 users

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 Marcin Deranek 2005-12-07 08:24:12 UTC
I'm trying to compile libtorrent-0.8.0 and it fails with the following error
(with gcc-3.3.6-hardened I had no problems):

make[3]: Entering directory
`/var/tmp/portage/libtorrent-0.8.0/work/libtorrent-0.8.0/src/download'
/bin/sh ../../libtool --mode=compile --tag=CXX i686-pc-linux-gnu-g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I../..    -march=pentium3 -Os -pipe
-DNDEBUG   -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include   -c -o
available_list.lo available_list.cc
mkdir .libs
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I../..
-march=pentium3 -Os -pipe -DNDEBUG -I/usr/include/sigc++-2.0
-I/usr/lib/sigc++-2.0/include -c available_list.cc  -fPIC -DPIC -o
.libs/available_list.o
/bin/sh ../../libtool --mode=compile --tag=CXX i686-pc-linux-gnu-g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I../..    -march=pentium3 -Os -pipe
-DNDEBUG   -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include   -c -o
choke_manager.lo choke_manager.cc
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I../..
-march=pentium3 -Os -pipe -DNDEBUG -I/usr/include/sigc++-2.0
-I/usr/lib/sigc++-2.0/include -c choke_manager.cc  -fPIC -DPIC -o
.libs/choke_manager.o
/bin/sh ../../libtool --mode=compile --tag=CXX i686-pc-linux-gnu-g++
-DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I../..    -march=pentium3 -Os -pipe
-DNDEBUG   -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include   -c -o
connection_list.lo connection_list.cc
 i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I../..
-march=pentium3 -Os -pipe -DNDEBUG -I/usr/include/sigc++-2.0
-I/usr/lib/sigc++-2.0/include -c connection_list.cc  -fPIC -DPIC -o
.libs/connection_list.o
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/bits/stl_algo.h: In function
`_RandomAccessIterator std::find_if(_RandomAccessIterator,
_RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with
_RandomAccessIterator =
__gnu_cxx::__normal_iterator<torrent::PeerConnectionBase**,
std::vector<torrent::PeerConnectionBase*,
std::allocator<torrent::PeerConnectionBase*> > >, _Predicate =
rak::equal_t<torrent::PeerInfo, std::const_mem_fun_t<const torrent::PeerInfo&,
torrent::PeerConnectionBase> >]':
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3/bits/stl_algo.h:292:
internal compiler error: in sweep_string_variable, at protector.c:1158
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into
/var/tmp/portage/libtorrent-0.8.0/temp/ccEdq4Mb.out file, please attach this to
your bugreport.
make[3]: *** [connection_list.lo] Error 1
make[3]: Leaving directory
`/var/tmp/portage/libtorrent-0.8.0/work/libtorrent-0.8.0/src/download'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/libtorrent-0.8.0/work/libtorrent-0.8.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/libtorrent-0.8.0/work/libtorrent-0.8.0'
make: *** [all] Error 2


Reproducible: Always
Steps to Reproduce:
1.emerge libtorrent
2.wait for the error
3.

Actual Results:  
emerge returns an error

Expected Results:  
package should be merged

ftp ~ # emerge --info
Portage 2.0.51.22-r3 (hardened/x86/2.6, gcc-3.4.4, glibc-2.3.5-r2,
2.6.14-hardened-r1 i686)
=================================================================
System uname: 2.6.14-hardened-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.13
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -Os -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -Os -pipe"
DISTDIR="/var/tmp/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo
ftp://mirror.nutsmaas.nl/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
PKGDIR="/var/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib accessibility acpi adns alsa apache2 apm audiofile avi
bash-completion bcmath berkdb bidi bindist bmp bzip2 bzlib cdparanoia cpdflib
crypt cscope ctype cups curl curlwrappers dio divx4linux dlloader dv dvb encode
evo exif expat fam fbcon fdftk ffmpeg fftw flac flatfile foomaticdb ftp gb gd
gdbm gif ginac glut gmp gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml
guile hardened hardenedphp iconv idn imagemagick imlib ipv6 javascript jikes
jpeg lcms lesstif libcaca libedit libgda libwww lm_sensors m17n-lib mad maildir
matroska mbox mcal memlimit mhash mikmod mime mmap mmx mng mono motif mozilla
mp3 mpeg mpi msession multilib ncurses nls nptl offensive ogg oggvorbis opengl
osc pam pcntl pcre pda pdflib perl pic plotutils png portaudio posix ppds python
readline recode scanner sdl session sharedmem shorten simplexml slang sndfile
snmp sockets socks5 sox speex spell sqlite sse ssl svg sysvipc szip tcltk tcpd
test theora threads tidy tiff truetype udev unicode usb userlocales vcd videos
vorbis win32codecs wmf wxwindows x86 xine xinerama xml xml2 xmlrpc xmms xosd xpm
xprint xsl xv xvid yaz zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LINGUAS, MAKEOPTS
Comment 1 solar (RETIRED) gentoo-dev 2005-12-07 08:39:59 UTC
I'm able to reproduce this problem with gcc-3.4.4
Being that the problem is in the c++ handling of ssp you will need to merge the
pkg in question with -fno-stack-protector

I was able to merge it here using the following command.

env CXXFLAGS="-O2 -mtune=i686 -g3 -fforce-addr -fno-stack-protector" \
 emerge libtorrent
Comment 2 Marcin Deranek 2005-12-07 12:05:52 UTC
Yes, adding '-fno-stack-protector' to CXXFLAGS fixes the problem, but are there
any chances for the real fix ?
Comment 3 solar (RETIRED) gentoo-dev 2005-12-07 14:04:48 UTC
I'm highly doubtful that this ICE will be fixed ever.
gcc-3.4.x is almost not supported upstream anymore.
gcc-4.x reintroduces ssp but it's been contorted to the point 
where it's almost undesirable to want to use at this point in time.
I'd suggest snagging a copy of my bashrc and setting up a set of local 
package.cflags and appending the desired flag for this pkg and any other c++ 
package that you see failing with the sweep_string_variable ICE.
Comment 4 Marcin Deranek 2005-12-07 14:39:32 UTC
Undertood - thanks for reply.
Personally I can live with that..