Roy Sutton
2006-Oct-15 13:53 UTC
[Wxruby-development] [Fwd: [ wxruby-Bugs-6144 ] error: cast from ‘void*’ to ‘int’ loses precision]
I think we can mark this bug closed and check in the patch. Anyone have any concerns/questions before I do? Roy -------- Original Message -------- Subject: [ wxruby-Bugs-6144 ] error: cast from ?void*? to ?int? loses precision Date: Sun, 15 Oct 2006 08:37:31 -0400 (EDT) From: <noreply at rubyforge.org> To: noreply at rubyforge.org Bugs item #6144, was opened at 2006-10-15 00:04 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=6144&group_id=35 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: error: cast from ?void*? to ?int? loses precision Initial Comment: When compiling on an AMD Athlon64, I get the following error: g++ -c -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -Wall -g -fno-strict-aliasing -O2 -fPIC -Wno-unused-function -I /usr/local/lib/site_ruby/1.8 -I /usr/local/lib/site_ruby/1.8/x86_64-linux -I /usr/local/lib/site_ruby -I /usr/lib/ruby/1.8 -I /usr/lib/ruby/1.8/x86_64-linux -I . -I /home/bma/wxruby2-preview-0.0.36/doc/lib -o obj/wx.o src/wx.cpp src/wx.cpp: In function ?void GcMapPtrToValue(void*, VALUE)?: src/wx.cpp:1636: error: cast from ?void*? to ?int? loses precision src/wx.cpp: In function ?VALUE GcGetValueFromPtr(void*)?: src/wx.cpp:1646: error: cast from ?void*? to ?int? loses precision rake aborted! Command failed with status (1): [g++ -c -I/usr/lib/wx/include/gtk2-unicod...] After googling, it seems that this is a common error when porting from 32-bit to 64-bit platforms. ---------------------------------------------------------------------- Comment By: Benjamin A''Lee (bma) Date: 2006-10-15 12:37 Message: Yes, that works. ---------------------------------------------------------------------- Comment By: Roy Sutton (roys) Date: 2006-10-15 05:41 Message: Unfortunately I can''t test this myself but can you try applying the attached patch to swig/wx.i. Basically change the (int) to (long) in both functions. According to my reading longs should be 64 bits for you. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=6144&group_id=35
Kevin Smith
2006-Oct-16 02:34 UTC
[Wxruby-development] [Fwd: [ wxruby-Bugs-6144 ] error: cast from ‘void*’ to ‘int’ loses precision]
Well, we would check in the patch first, then close the bug. The way you wrote it sounds like the reverse. But I agree that the fix should work. If not, it can be re-opened. Kevin Roy Sutton wrote:> I think we can mark this bug closed and check in the patch. Anyone have > any concerns/questions before I do? > > Roy > > -------- Original Message -------- > Subject: [ wxruby-Bugs-6144 ] error: cast from ?void*? to ?int? loses > precision > Date: Sun, 15 Oct 2006 08:37:31 -0400 (EDT) > From: <noreply at rubyforge.org> > To: noreply at rubyforge.org > > > > Bugs item #6144, was opened at 2006-10-15 00:04 > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=218&aid=6144&group_id=35 > > Category: None > Group: None > Status: Open > Resolution: None > Priority: 3 > Submitted By: Nobody (None) > Assigned to: Nobody (None) > Summary: error: cast from ?void*? to ?int? loses precision > > Initial Comment: > When compiling on an AMD Athlon64, I get the following error: > > g++ -c -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -Wall -g -fno-strict-aliasing -O2 -fPIC -Wno-unused-function -I /usr/local/lib/site_ruby/1.8 -I /usr/local/lib/site_ruby/1.8/x86_64-linux -I /usr/local/lib/site_ruby -I /usr/lib/ruby/1.8 -I /usr/lib/ruby/1.8/x86_64-linux -I . -I /home/bma/wxruby2-preview-0.0.36/doc/lib -o obj/wx.o src/wx.cpp > src/wx.cpp: In function ?void GcMapPtrToValue(void*, VALUE)?: > src/wx.cpp:1636: error: cast from ?void*? to ?int? loses precision > src/wx.cpp: In function ?VALUE GcGetValueFromPtr(void*)?: > src/wx.cpp:1646: error: cast from ?void*? to ?int? loses precision > rake aborted! > Command failed with status (1): [g++ -c -I/usr/lib/wx/include/gtk2-unicod...] > > After googling, it seems that this is a common error when porting from 32-bit to 64-bit platforms. > > ---------------------------------------------------------------------- > > Comment By: Benjamin A''Lee (bma) > Date: 2006-10-15 12:37 > > Message: > Yes, that works. > > ---------------------------------------------------------------------- > > Comment By: Roy Sutton (roys) > Date: 2006-10-15 05:41 > > Message: > Unfortunately I can''t test this myself but can you try applying the attached patch to swig/wx.i. Basically change the (int) to (long) in both functions. According to my reading longs should be 64 bits for you. > > ---------------------------------------------------------------------- > > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=218&aid=6144&group_id=35 > > > > > _______________________________________________ > Wxruby-development mailing list > Wxruby-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-development
Roy Sutton
2006-Oct-16 03:29 UTC
[Wxruby-development] [Fwd: [ wxruby-Bugs-6144 ] error: cast from ‘void*’ to ‘int’ loses precision]
Kevin Smith wrote:> Well, we would check in the patch first, then close the bug. The way you > wrote it sounds like the reverse. But I agree that the fix should work. > If not, it can be re-opened. > >I didn''t mean for ''and'' to imply any time relation between the two items, merely that they both were going to happen. Bug closed. Roy