Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63773 - Compilation of games-puzzle/pingus-0.6.0-r1 failed
Summary: Compilation of games-puzzle/pingus-0.6.0-r1 failed
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:
 
Reported: 2004-09-12 07:02 UTC by Peter `MathFox' Roozemaal
Modified: 2004-09-12 19:24 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 Peter `MathFox' Roozemaal 2004-09-12 07:02:54 UTC
emerge pingus:

if g++ -DHAVE_CONFIG_H -I. -I. -I..   -I/usr/include/libxml2  -O2 -I//usr/include/clanlib-0.6.5 -MT story_screen.o -MD -MP -MF ".deps/story_screen.Tpo" \
  -c -o story_screen.o `test -f 'story_screen.cxx' || echo './'`story_screen.cxx; \
then mv ".deps/story_screen.Tpo" ".deps/story_screen.Po"; \
else rm -f ".deps/story_screen.Tpo"; exit 1; \
fi
story_screen.cxx: In member function `virtual void
   StoryScreenComponent::update(float)':
story_screen.cxx:146: error: no matching function for call to `min(size_t,
   unsigned int&)'
make[3]: *** [story_screen.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/pingus-0.6.0-r1/work/pingus-0.6.0/src'

It must have something to do with amd64 where size_t is 64 bits and int is 32 bits.
Comment 1 Peter `MathFox' Roozemaal 2004-09-12 07:22:23 UTC
BTW, here is a patch that fixes the problem:

--- /root/story_screen.cxx.old  2004-09-12 16:18:41.596208118 +0200
+++ story_screen.cxx    2004-09-12 16:18:54.918143962 +0200
@@ -142,7 +142,7 @@
  
   if (!page_displayed_completly)
     {
-      unsigned int len = static_cast<unsigned int>(20.0f * time_passed);
+      size_t len = static_cast<size_t>(20.0f * time_passed);
       display_text = current_page.text.substr(0, Math::min(current_page.text.length(), len));
  
       if (current_page.text.length() < len)
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2004-09-12 19:24:34 UTC
Ok...fixed in cvs.  Thanks for the patch and bug report.