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

Bug 233447

Summary: [PATCH] games-puzzle/krystaldrop-0.7.2: fails to compile with gcc 4.3.1
Product: Gentoo Linux Reporter: Jabari R. Roberts <tECHIDNA>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 198121    
Attachments: Patch to fix building with GCC 4.3.1
Ebuild that includes the above patch.

Description Jabari R. Roberts 2008-07-31 04:06:41 UTC
krystaldrop-0.7.2 fails to compile due to it needing
#include <algorithm>
defined for its transform function.

I also had to fix the new strictness of the transform function (which is used to lowercase all filenames).

Patch and new ebuild to follow.

Here's the error:
~~~~~~~~~~~~~~~~~~~~~~~~

g++ -Wall -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/libxml2 -DCFGDIR="\"/etc\"" -DBINDIR="\"/usr/share/games/krystaldrop\"" -O2 -DNDEBUG -DACC_ZLIB_SUPPORT -o KDpp/Resources/ResourceSet.o -c KDpp/Resources/ResourceSet.cpp
g++ -Wall -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/libxml2 -DCFGDIR="\"/etc\"" -DBINDIR="\"/usr/share/games/krystaldrop\"" -O2 -DNDEBUG -DACC_ZLIB_SUPPORT -o KDpp/Tools/FilePath.o -c KDpp/Tools/FilePath.cpp
KDpp/Resources/ArchiveManager.cpp: In static member function ‘static void KD_ArchiveManager::NormalizeSuffix(std::string&)’:
KDpp/Resources/ArchiveManager.cpp:41: error: ‘transform’ was not declared in this scope
make[1]: *** [KDpp/Resources/ArchiveManager.o] Error 1
make[1]: *** Waiting for unfinished jobs....
KDpp/Tools/FilePath.cpp: In member function ‘void KD_FilePath::ComputePath(const std::string&)’:
KDpp/Tools/FilePath.cpp:169: error: ‘transform’ was not declared in this scope
KDpp/Tools/FilePath.cpp: In member function ‘std::string KD_FilePath::GetFileExtension() const’:
KDpp/Tools/FilePath.cpp:283: error: ‘transform’ was not declared in this scope
make[1]: *** [KDpp/Tools/FilePath.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/games-puzzle/krystaldrop-0.7.2/work/krystaldrop/Sources'
make: *** [all] Error 2
 * ERROR: games-puzzle/krystaldrop-0.7.2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2273:  Called games_src_compile
 *             environment, line 1295:  Called die
 * The specific snippet of code:
 *           emake || die "emake failed"
 *  The die message:
 *   emake failed
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/games-puzzle/krystaldrop-0.7.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/games-puzzle/krystaldrop-0.7.2/temp/environment'.

Reproducible: Always

Steps to Reproduce:
1. emerge krystaldrop




My emerge --info:

Chaos-X3 ~ # emerge --info
Portage 2.2_rc4 (default/linux/x86/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo i686)
=================================================================
System uname: Linux-2.6.26-gentoo-i686-AMD_Athlon-tm-_XP_3000+-with-glibc2.0
Timestamp of tree: Wed, 30 Jul 2008 03:23:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US ja"
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"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/layman/sunrise /usr/local/portage/layman/science"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="16bit-indices 3dnow 3dnowext R X Xaw3d a52 aac aalib accessibility acl acpi activefilter ada addbookmarks additions adplug aio akode alias alisp allegro alsa amr amrnb amrwb anthy ao applet aqua_theme ares arts artswrappersuid artworkextra aspell async asyncns atmo audiofile autoreplace avahi bash-completion bdf beagle berkdb bidi big-tables binfilter bittorrent bl blender-game bluetooth bookmarks branding bzip2 cairo calendar caps carbone_theme cdaudio cdda cddb cdio cdparanoia cdr cgc cgraph charconv chardet chicken chm cjk cli clisp connectionstatus consolekit contactnotes cracklib crypt cscope css cups curl cvs cxx dbus dc1394 deprecated device-mapper devil dga dhcp dia directfb discouraged disk-partition divx djbfft djvu doc double-precision dri dts dv dvd dvdr dvdread dvi dynamic eap-tls eb eds elliptic emboss emf emovix enca encode epydoc esd evo examples exif expat extra-cardsets extraengine extrafilters extras fam fame fat fbcon ffmpeg fftw finger flac flash fluidsynth fontconfig foomaticdb fortran fpx freetts ftp galois gcdmaster gd gdbm gedit ggi gif gimp git glib glitz gmedia gmp gnokii gnome gnomecd gnutls gopher gphoto2 gpm grammar graphviz gs gsm gstreamer gtk gtkhtml guile hal hardcoded-tables hdri hfs highlight history howl-compat hpn ical iconv icu id3tag idn ieee1394 imagemagick imlib immqt-bc inkjar inotify ipod ipv6 irc irrlicht isdnlog jabber jack jai java java6 javascript jbig jce jmf joystick jpeg jpeg2k jsapi justify kcal kde kdehiddenvisibility kerberos kig-scripting kipi ladspa lame lapack lash latex lcms ldap libcaca libgcrypt libgda libnotify libsamplerate libssh2 libwww live lm_sensors log4j logitech-mouse loop-aes lua lzma lzo m17n-lib mad math matroska max-idx-128 mbrola md5sum mdnsresponder-compat midi mikmod mime mjpeg mmap mmx mmxext mng modplug mono moonlight motif mp2 mp3 mpeg mplayer mtp mudflap musepack musicbrainz mysql mzscheme nas ncurses nemesi netjack network networking networkmanager new-clx nls nntp nowlistening nptl nptlonly nsplugin ntfs nuv objc objc++ objc-gc ocaml offensive ogg ole openal openexr opengl openmp oss ots pam pari parse-clocks pascal pccts pcre pda pdf perforce perl physfs pike pkcs11 plotutils png pnm portaudio postscript povray ppds pppd pth pulseaudio python qt3 qt3support qt4 quicktime rar rdesktop readline real realmedia reflection reiserfs remote remoteosd replytolist rle rtc rtsp ruby samba sasl scanner scrobbler sdk sdl sdl-image session shout sid skins slang slp sms sndfile solver soundex source speex spell spl sqlite sqlite3 srt sse ssl startup-notification statistics stream subtitles subversion svg svm swat symlink sysfs syslog t1lib taglib tb4 tcl tcpd teletext test-programs tetex texteffect tga themes theora thesaurus threads threadsafe thunderbird tiff timidity tk toolbar tools translator truetype tta twolame unicode usb utils v4l v4l2 vboxwebsrv vcd vcdx vidix vim-pager vim-syntax vim-with-x vlm vorbis wavpack webpresence wifi win32codecs winpopup wma wmf wmp wordperfect wxwindows x264 x86 xanim xattr xcomposite xerces-c xext xft xine xinerama xml xmldoclet xmp xorg xosd xpm xqilla xscreensaver xulrunner xv xvid xvmc yahoo yv12 zeroconf 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="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US ja" USERLAND="GNU" VIDEO_CARDS="nvidia nv fbdev v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jabari R. Roberts 2008-07-31 04:11:15 UTC
Created attachment 161801 [details, diff]
Patch to fix building with GCC 4.3.1

A lot of inspiration from this patch came from bug 226857 (since the issues are roughly the same) and from http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13.html
Comment 2 Jabari R. Roberts 2008-07-31 04:12:00 UTC
Created attachment 161803 [details]
Ebuild that includes the above patch.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2008-07-31 04:22:01 UTC
in portage.

thanks for the bug report and patch.