Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146153 - games-action/maelstrom-3.0.6-r1 fails to compile (not 64-bit clean?)
Summary: games-action/maelstrom-3.0.6-r1 fails to compile (not 64-bit clean?)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 117482
  Show dependency tree
 
Reported: 2006-09-03 09:29 UTC by Randall Nortman
Modified: 2006-10-25 13:55 UTC (History)
3 users (show)

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


Attachments
emerge --info (emerge--info,2.58 KB, text/plain)
2006-09-03 09:31 UTC, Randall Nortman
Details
ebuild that applies patch (maelstrom-3.0.6-r1.ebuild,1.87 KB, application/octet-stream)
2006-09-29 19:30 UTC, Richard Benjamin Voigt
Details
patch error and all warnings (maelstrom-gcc41.patch,1.24 KB, patch)
2006-09-29 19:31 UTC, Richard Benjamin Voigt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Randall Nortman 2006-09-03 09:29:57 UTC
I just updated to gcc-4.1.1 and rebuilt world, but maelstrom failed to compile:

x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"Maelstrom\" -DVERSION=\"3.0.6\"  -I. -I.      -pipe -O2 -pipe -O2 -I/usr/include/SDL -D_REENTRANT -I.. -I../netlogic -I../screenlib -I../maclib -DLIBDIR=\"/usr/share/games/Maelstrom\" -c SDL_FrameBuf.cpp
SDL_FrameBuf.cpp: In member function 'void FrameBuf::AddDirtyRect(SDL_Rect*)':
SDL_FrameBuf.cpp:851: error: cast from 'SDL_Rect*' to 'int' loses precision
SDL_FrameBuf.cpp:851: error: cast from 'SDL_Rect*' to 'int' loses precision
SDL_FrameBuf.cpp:852: error: cast from 'SDL_Rect*' to 'int' loses precision
make[1]: *** [SDL_FrameBuf.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/maelstrom-3.0.6-r1/work/Maelstrom-3.0.6/screenlib'

Looks to me like this is an unsafe 64-bit pointer -> 32-bit integer cast.  I'm not sure why previous versions of gcc would have accepted this, but clearly I managed to build it before on this system.
Comment 1 Randall Nortman 2006-09-03 09:31:42 UTC
Created attachment 95851 [details]
emerge --info
Comment 2 Pacho Ramos gentoo-dev 2006-09-05 13:32:18 UTC
Same problem here after updating to gcc 4.1 and trying to compile it using this gcc version.
Comment 3 Richard Benjamin Voigt 2006-09-29 19:30:05 UTC
Patched it and it now works for me, providing a patch file and ebuild to throw into your PORTAGE_OVERLAY

If PORTAGE_OVERLAY is /usr/local/portage then you will need:
(Copied from /usr/portage)
/usr/local/portage/games-action/maelstrom/files/maelstrom-3.0.6-r1-security.patch
/usr/local/portage/games-action/maelstrom/files/maelstrom-gcc34.patch
(Provided here)
/usr/local/portage/games-action/maelstrom/files/maelstrom-gcc41.patch
/usr/local/portage/games-action/maelstrom/maelstrom-3.0.6-r1.ebuild
(Run "ebuild /usr/local/portage/games-action/maelstrom/maelstrom-3.0.6-r1.ebuild digest")
/usr/local/portage/games-action/maelstrom/Manifest
/usr/local/portage/games-action/maelstrom/files/digest-maelstrom-3.0.6-r1
Comment 4 Richard Benjamin Voigt 2006-09-29 19:30:50 UTC
Created attachment 98422 [details]
ebuild that applies patch

/usr/local/portage/games-action/maelstrom/maelstrom-3.0.6-r1.ebuild
Comment 5 Richard Benjamin Voigt 2006-09-29 19:31:30 UTC
Created attachment 98423 [details, diff]
patch error and all warnings

/usr/local/portage/games-action/maelstrom/files/maelstrom-gcc41.patch
Comment 6 Richard Benjamin Voigt 2006-09-29 19:44:16 UTC
Just submitted patch upstream as well.
Comment 7 Tupone Alfredo gentoo-dev 2006-10-25 13:55:37 UTC
Fix is in portage. Thanks for report and patch