Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > qtruby compilation error

Reply
Thread Tools

qtruby compilation error

 
 
Jochen Immendörfer
Guest
Posts: n/a
 
      07-13-2004
Hi,

I am trying to compile qtruby. Unfortunally it failed with the following error
message:

Qt.cpp: In function `VALUE initialize_qt(int, VALUE*, VALUE)':
Qt.cpp:1145: error: ISO C++ forbids cast to non-reference type used as lvalue
make[5]: *** [Qt.lo] Fehler 1

Maybe this is due to the gcc version I am using? It's gcc 3.4.1. Well, I
thought I'll give it a try on my other box running slackware 10.0 with gcc
3.3.4. But here, ./configure can't find my X includes -- I tried to pass an
option to point there directly, but still the same. Maybe this is since
slackware 10.0 ships with x11-6.7.0? Hm, I thought it should be compatible to
XF86...

Has anyone managed to compile qtruby? Any idea how I could do it as well?

regards,
jochen


 
Reply With Quote
 
 
 
 
Paul Brannan
Guest
Posts: n/a
 
      07-13-2004
On Wed, Jul 14, 2004 at 01:40:23AM +0900, Jochen Immendörfer wrote:
> Hi,
>
> I am trying to compile qtruby. Unfortunally it failed with the following error
> message:
>
> Qt.cpp: In function `VALUE initialize_qt(int, VALUE*, VALUE)':
> Qt.cpp:1145: error: ISO C++ forbids cast to non-reference type used as lvalue
> make[5]: *** [Qt.lo] Fehler 1
>


I'm not a qtruby developer and I don't have Qt 3.2, so I can't check any
of this, but it looks like a bug.

Lines 1144-1145 read:

smokeruby_object * p = 0;
Data_Get_Struct(temp_obj, smokeruby_object, (void *) p);

And this expands to:

smokeruby_object * p = 0;
Check_Type(temp_obj, T_DATA); (void *) p = (smokeruby_object*)DATA_PTR(temp_obj);

Which is not valid C++ (older versions of g++ accept it, but neither
como nor g++ 3.4 does).

There's really no good reason I can think of for the cast to void*,
anyway. You should submit a bug report.

Paul



 
Reply With Quote
 
 
 
 
Jochen Immendörfer
Guest
Posts: n/a
 
      07-13-2004
Thank you two for answering.

I already had the intention of submitting a bug report, but -- I just couldn't
find such a possibility at rubyforge. Am I just blind? If you know where to
submit a bug report, please tell me and I'll do.

Btw. I removed the cast to void* from line 1145 and it did actually compile
after then..

But trying

require 'Qt'

in irb produces a segmentation fault

regards,
jochen



Am Dienstag 13 Juli 2004 19:14 schrieb Paul Brannan:
> On Wed, Jul 14, 2004 at 01:40:23AM +0900, Jochen Immendörfer wrote:
> > Hi,
> >
> > I am trying to compile qtruby. Unfortunally it failed with the following
> > error message:
> >
> > Qt.cpp: In function `VALUE initialize_qt(int, VALUE*, VALUE)':
> > Qt.cpp:1145: error: ISO C++ forbids cast to non-reference type used as
> > lvalue make[5]: *** [Qt.lo] Fehler 1

>
> I'm not a qtruby developer and I don't have Qt 3.2, so I can't check any
> of this, but it looks like a bug.
>
> Lines 1144-1145 read:
>
> smokeruby_object * p = 0;
> Data_Get_Struct(temp_obj, smokeruby_object, (void *) p);
>
> And this expands to:
>
> smokeruby_object * p = 0;
> Check_Type(temp_obj, T_DATA); (void *) p =
> (smokeruby_object*)DATA_PTR(temp_obj);
>
> Which is not valid C++ (older versions of g++ accept it, but neither
> como nor g++ 3.4 does).
>
> There's really no good reason I can think of for the cast to void*,
> anyway. You should submit a bug report.
>
> Paul




 
Reply With Quote
 
Jochen Immendörfer
Guest
Posts: n/a
 
      07-13-2004
Ok, I did one more try. This time on my notebook -- same distribution like
before same gcc version (Arch Linux, gcc 3.4.1). Cast to void* removed from
line 1145. Here it worked. Without segmentation fault. Nice. But I still
don't know where to submit a bug report

regards,
jochen



Am Dienstag 13 Juli 2004 19:32 schrieb Jochen Immendörfer:
> Thank you two for answering.
>
> I already had the intention of submitting a bug report, but -- I just
> couldn't find such a possibility at rubyforge. Am I just blind? If you know
> where to submit a bug report, please tell me and I'll do.
>
> Btw. I removed the cast to void* from line 1145 and it did actually compile
> after then..
>
> But trying
>
> require 'Qt'
>
> in irb produces a segmentation fault
>
> regards,
> jochen
>
> Am Dienstag 13 Juli 2004 19:14 schrieb Paul Brannan:
> > On Wed, Jul 14, 2004 at 01:40:23AM +0900, Jochen Immendörfer wrote:
> > > Hi,
> > >
> > > I am trying to compile qtruby. Unfortunally it failed with the
> > > following error message:
> > >
> > > Qt.cpp: In function `VALUE initialize_qt(int, VALUE*, VALUE)':
> > > Qt.cpp:1145: error: ISO C++ forbids cast to non-reference type used as
> > > lvalue make[5]: *** [Qt.lo] Fehler 1

> >
> > I'm not a qtruby developer and I don't have Qt 3.2, so I can't check any
> > of this, but it looks like a bug.
> >
> > Lines 1144-1145 read:
> >
> > smokeruby_object * p = 0;
> > Data_Get_Struct(temp_obj, smokeruby_object, (void *) p);
> >
> > And this expands to:
> >
> > smokeruby_object * p = 0;
> > Check_Type(temp_obj, T_DATA); (void *) p =
> > (smokeruby_object*)DATA_PTR(temp_obj);
> >
> > Which is not valid C++ (older versions of g++ accept it, but neither
> > como nor g++ 3.4 does).
> >
> > There's really no good reason I can think of for the cast to void*,
> > anyway. You should submit a bug report.
> >
> > Paul




 
Reply With Quote
 
Alexander Kellett
Guest
Posts: n/a
 
      07-13-2004
On Wed, Jul 14, 2004 at 02:32:36AM +0900, Jochen Immend?rfer wrote:
> require 'Qt'
>
> in irb produces a segmentation fault


whats the backtrace?

cheers,
Alex


 
Reply With Quote
 
Alexander Kellett
Guest
Posts: n/a
 
      07-13-2004
On Wed, Jul 14, 2004 at 02:54:22AM +0900, Jochen Immend?rfer wrote:
> Ok, I did one more try. This time on my notebook -- same distribution like
> before same gcc version (Arch Linux, gcc 3.4.1). Cast to void* removed from
> line 1145. Here it worked. Without segmentation fault. Nice. But I still
> don't know where to submit a bug report


umm you could submit them to me i guess (or kde-)
any difference between the two installs? one has a kde install the other not?

Alex


 
Reply With Quote
 
Jochen Immendörfer
Guest
Posts: n/a
 
      07-13-2004
irb(main):001:0> require 'Qt'
/usr/lib/ruby/site_ruby/1.8/i686-linux/qtruby.so: [BUG] Segmentation fault
ruby 1.8.2 (2004-07-10) [i686-linux]

Speicherzugriffsfehler

That's all I get. (for those who don't understand german:
Speicherzugriffsfehler means segmentation fault)




Am Dienstag 13 Juli 2004 20:24 schrieb Alexander Kellett:
> On Wed, Jul 14, 2004 at 02:32:36AM +0900, Jochen Immend?rfer wrote:
> > require 'Qt'
> >
> > in irb produces a segmentation fault

>
> whats the backtrace?
>
> cheers,
> Alex



 
Reply With Quote
 
Jochen Immendörfer
Guest
Posts: n/a
 
      07-13-2004
Am Dienstag 13 Juli 2004 20:26 schrieb Alexander Kellett:
> On Wed, Jul 14, 2004 at 02:54:22AM +0900, Jochen Immend?rfer wrote:
> > Ok, I did one more try. This time on my notebook -- same distribution
> > like before same gcc version (Arch Linux, gcc 3.4.1). Cast to void*
> > removed from line 1145. Here it worked. Without segmentation fault. Nice.
> > But I still don't know where to submit a bug report

>
> umm you could submit them to me i guess (or kde-)
> any difference between the two installs? one has a kde install the other
> not?
>
> Alex


ok, should I still submit a report to you or did you already hear about
it? )

Both machines have a minimal kde installation. I think both installs should be
very similar. At least the important packages are the same. Same version
everywhere. kde version is 3.2.3, qt is 3.3.2.

Do you need more informations?

regards,
jochen


 
Reply With Quote
 
Alexander Kellett
Guest
Posts: n/a
 
      07-13-2004
On Wed, Jul 14, 2004 at 03:29:33AM +0900, Jochen Immend?rfer wrote:
> irb(main):001:0> require 'Qt'
> /usr/lib/ruby/site_ruby/1.8/i686-linux/qtruby.so: [BUG] Segmentation fault
> ruby 1.8.2 (2004-07-10) [i686-linux]
>
> Speicherzugriffsfehler
>
> That's all I get. (for those who don't understand german:
> Speicherzugriffsfehler means segmentation fault)


can you run in gdb?
backtrace is reallllly needed

Alex


 
Reply With Quote
 
Jochen Immendörfer
Guest
Posts: n/a
 
      07-13-2004
hm.. I'm sorry to say so, but I don't now how to do this. If you tell me what
I exactly have to do, I'll give my best

>
> can you run in gdb?
> backtrace is reallllly needed
>
> Alex



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(debian) compilation of qt4-qtruby : help needed for cmake lolveley Ruby 1 05-29-2009 07:17 AM
Compilation error with seperate compilation C__chp C++ 4 02-15-2008 03:57 PM
QtRuby - Error German Alberto Gimenez Silva Ruby 0 07-17-2007 12:45 PM
Strange error: QtRuby and AR (sqlite3) Hans Fugal Ruby 4 10-19-2005 02:45 AM
qtruby and ms windows Jochen Immendörfer Ruby 1 07-14-2004 10:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57