boost fails to compile with different errors. When upgrading to gcc-4.3.0-20080208
Steps to Reproduce:
1. emerge boost
Portage 18.104.22.168 (default-linux/x86/2007.0, gcc-4.3.0-alpha20080208, glibc-2.6.1-r0, 2.6.22-14-generic i686)
System uname: 2.6.22-14-generic i686 unknown
Timestamp of tree: Sun, 17 Feb 2008 00:00:01 +0000
ccache version 2.4 [enabled]
sys-devel/automake: 1.9.6-r2, 1.10
CFLAGS="-march=athlon-xp -O2 -pipe"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/portage/local/layman/custom-kernels /usr/portage/local/layman/toolchain /usr/local/portage"
USE="7zip X X509 a52 aac aalib acl acpi aim alsa animgif antlr archive asm aspell audiofile bash-completion berkdb bitmap-fonts bjam bonjour boo boost branding bzip2 c++ cairo canna ccache cdaudio cdda cddb cdio cdparanoia cdr cdrom cgi chasen chm chroot cjk clamav clamd cli cpio cpudetection cracklib crypt css curl cvs cxx d dbcp dbus depth32 dga dhcp dict disk-partition dosformat double-precision dri dropmsg dvd dvdarchive dvdchapjump dvdnav dvdr dvdread elf elisp encode enscript extensions extra extras fam fastcgi fat fbcon fbcondecor fbsplash ffmpeg file firefox flash fontconfig fortran gd gdb gdbm gdl gdm gedit gif gimp glade glep glib glitz glsa glut gmail gmp gnome gnomecanvas gpg gpm graphviz grub gstreamer gtk gtkhtml gtkspell gzip hal hddtemp html httpd icons iconv icq id3 id3tag imagemagick imlib imlib2 inifile int64 ipv6 irc isdnlog jpeg jpeg2k lame libedit libgcrypt libnotify libssh2 lua lyrics lzo lzw mad md5sum midi mjpeg mmx mng mono monolithic mp2 mp3 mp4 mp4live mpeg mpeg2 mudflap nautilus ncurses nls nptl nptlonly ntfs odbc offensive ogg opengl openmp openssh openssl pam pcre perl pidgin png portage pppd python raw rc5 readline reflection regex reiser4 reiserfs sdl sdl-image sdl-sound session simplexml slang sms soap sockets socks5 sound spell spl sqlite3 sse ssl subversion swig symlink syslog szip tcpd threads threadsafe threadsonly tools tracker truetype truetype-fonts type1-fonts ui unicode unzip usb valgrind vcd vcdx vim vim-pager vim-syntax vim-with-x vorbis wav wavpack win32codecs wma x86 xforms xhtml xml xmlrpc xorg xpm xrandr xsettings xskatcards xsl xslt xvid yahoo 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 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt 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, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 143702 [details, diff]
Created attachment 143703 [details, diff]
Created attachment 143705 [details, diff]
Created attachment 143707 [details, diff]
fixes bit range
Created attachment 143708 [details, diff]
theres are the patches I found on the boost website submitted by others.
Created attachment 143709 [details]
posted the wrong one which was an html formatted one, now is corrected.
thanks. there are still some errors but i'm working on them now.
Created attachment 143739 [details, diff]
this is a preliminary patch that successfully builds
dev-libs/boost-1.34.1-r2 USE="icu -debug -doc -pyste -tools"
i will need to patch gccxml before i can test USE=pyste and i get a failure with USE=tools that i need to look into. the testsuite probably needs work too. debian and fedora have some build fixes that i didn't seem to need, some of which Keith posted above. i'll have to look into that too.
Sorry I didn't know how to combine the all above patches into a single solid one.
boost is still broken with this patch.
"dirtyepic, with your patch from here boost compile with gcc-4.3, but it doesn't resolve problems with packages that depend on it, eg. tagpy still fails with the same error message as it used to with boost compiled with gcc-4.2.3."
i need to work on this some more soon. it's worth noting that boost svn builds without any problems.
Created attachment 144862 [details, diff]
This is the patch applied by fedora
Ryan's patch from comment #9 fixes the compilation of boost, but at least one other package that depends on boost (glob2-0.9.2) still fails. glob2 needs a patch for boost/date_time/date_facet.hpp in order to compile correctly, or else you'll get some redeclaration errors. (I noticed that patch is included in the Fedora patch from comment #12).
USE="tools" still failed. It took me a while (hours!), but I think I may have found the problem. boost/serialization/collection_traits.hpp is missing a #include <climits>. It uses ULONG_MAX in an #ifdef. Since ULONG_MAX is being used in an #ifdef, gcc did not throw any errors about it being undeclared, but instead other things were being erroneously #defined because of the miscalculation.
I'm going to attach a patch that combines all of the previous patches, including the patch for collection_traits.hpp. Aside from missing includes, the other patches on this bug modified some references (boost::mpl::next, instead of just next). I do not know if they are required or not, but I included them. As a test, I just finished recompiling all packaged depending on boost on my system, and they all compiled just fine.
Created attachment 145187 [details, diff]
Patch for boost-1.34.1 to compile with gcc-4.3
This patch allows me to compile boost-1.34.1 with USE="tools".
Thanks Neil. I think those are pieces that were missing. A couple things were fixed a little differently upstream but the end result is the same. I've added your patch to the gcc-porting overlay.
boost-1.34.1-r1 also fails at compile time.
(In reply to comment #14)
> Created an attachment (id=145187) 
> Patch for boost-1.34.1 to compile with gcc-4.3
> This patch allows me to compile boost-1.34.1 with USE="tools".
It seems to works for me on ~amd64
sorry people, but I'm not going to fix boost-1.34.1, but you should use boost-1.35.0 with gcc-4.3.x (which compiles with a couple of patches).
*** Bug 219586 has been marked as a duplicate of this bug. ***
*** Bug 217577 has been marked as a duplicate of this bug. ***
*** Bug 246259 has been marked as a duplicate of this bug. ***
*** Bug 252371 has been marked as a duplicate of this bug. ***
*** Bug 253362 has been marked as a duplicate of this bug. ***
*** Bug 258638 has been marked as a duplicate of this bug. ***
Thanks to Ryan Hill, patch boost-1.34.1-gcc-4.3.patch really help me to compile boost-1.34.1-r2