Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > non-virtual thunk is?

Reply
Thread Tools

non-virtual thunk is?

 
 
Obnoxious User
Guest
Posts: n/a
 
      07-03-2007
On Tue, 03 Jul 2007 17:40:54 +0000, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Can you explain what a non-virtual thunk is? I have been getting
> this error when trying to link libraries that I have built with
> optimization.
>
>


DéjÃ* vu.

http://lists.apple.com/archives/unix.../msg00108.html

--
Obnoxious User
 
Reply With Quote
 
 
 
 
contactmayankjain@gmail.com
Guest
Posts: n/a
 
      07-03-2007
Can you explain what a non-virtual thunk is? I have been getting
this error when trying to link libraries that I have built with
optimization.




--
Regards
Mayank Jain
Niksun
9818390836
www.mayankjain.110mb.com

 
Reply With Quote
 
 
 
 
jjds101@yahoo.com
Guest
Posts: n/a
 
      07-03-2007
On Jul 3, 1:40 pm, "(E-Mail Removed)"
<(E-Mail Removed)> wrote:
> Can you explain what a non-virtual thunk is? I have been getting
> this error when trying to link libraries that I have built with
> optimization.
>

By any chance, does this happen specifically when you change -Os to -
O3 when building
the libraries? Just a shot in the dark...

 
Reply With Quote
 
contactmayankjain@gmail.com
Guest
Posts: n/a
 
      07-05-2007
On Jul 4, 12:42 am, (E-Mail Removed) wrote:
> On Jul 3, 1:40 pm, "(E-Mail Removed)"<contactmayankj...@gm ail.com> wrote:
> > Can you explain what a non-virtual thunk is? I have been getting
> > this error when trying to link libraries that I have built with
> > optimization.

>
> By any chance, does this happen specifically when you change -Os to -
> O3 when building
> the libraries? Just a shot in the dark...


Hi

Thanks a lot for the try

When I was building on 64-bit machine I got the error "Non virtual
thunk".
So we added an optimization flag "-O2" to our makefiles, compiled all
the libraries as well as the code again and we got rid of this error.
But JI got a new error of "virtual memory exhausted: Cannot allocate
memory".
Then we added "-O1" flag after "-O2" (-O2 -O1) flag in the makefiles,
rebuild everything and we were able to build out code as well as the
package.

Now the binaries that I have build are running fine but when I try to
debug these binaries with gdb , the gdb gives the error
warning: Unable to get location for thread creation breakpoint:
generic

error [New LWP 100106] Cannot find thread, Thread ID=1, generic error

Regards
Mayank Jain
Niksun
9818390836
www.mayankjain.110mb.com

 
Reply With Quote
 
=?ISO-8859-1?Q?Erik_Wikstr=F6m?=
Guest
Posts: n/a
 
      07-05-2007
On 2007-07-05 14:23, (E-Mail Removed) wrote:
> On Jul 4, 12:42 am, (E-Mail Removed) wrote:
>> On Jul 3, 1:40 pm, "(E-Mail Removed)"<contactmayankj...@gm ail.com> wrote:
>> > Can you explain what a non-virtual thunk is? I have been getting
>> > this error when trying to link libraries that I have built with
>> > optimization.

>>
>> By any chance, does this happen specifically when you change -Os to -
>> O3 when building
>> the libraries? Just a shot in the dark...

>
> Hi
>
> Thanks a lot for the try
>
> When I was building on 64-bit machine I got the error "Non virtual
> thunk".
> So we added an optimization flag "-O2" to our makefiles, compiled all
> the libraries as well as the code again and we got rid of this error.
> But JI got a new error of "virtual memory exhausted: Cannot allocate
> memory".
> Then we added "-O1" flag after "-O2" (-O2 -O1) flag in the makefiles,
> rebuild everything and we were able to build out code as well as the
> package.


We are moving a bit off topic here, more help should be sought in groups
for the GNU toolchain (gcc and gdb).

I seem to recall that gcc goes with the last option when there are
conflicts, so you can skip the -O2.

> Now the binaries that I have build are running fine but when I try to
> debug these binaries with gdb , the gdb gives the error
> warning: Unable to get location for thread creation breakpoint:
> generic
>
> error [New LWP 100106] Cannot find thread, Thread ID=1, generic error


Have you compiled in debug symbols, useed the latest version of gdb and
gcc? My experience is that optimisations and debugging often don't play
well together, so try turning of optimisations when debugging.

--
Erik Wikström
 
Reply With Quote
 
contactmayankjain@gmail.com
Guest
Posts: n/a
 
      07-07-2007
On Jul 5, 9:17 pm, Erik Wikström <(E-Mail Removed)> wrote:
> On 2007-07-05 14:23, (E-Mail Removed) wrote:
>
>
>
> > On Jul 4, 12:42 am, (E-Mail Removed) wrote:
> >> On Jul 3, 1:40 pm, "(E-Mail Removed)"<contactmayankj...@gm ail.com> wrote:
> >> > Can you explain what a non-virtual thunk is? I have been getting
> >> > this error when trying to link libraries that I have built with
> >> > optimization.

>
> >> By any chance, does this happen specifically when you change -Os to -
> >> O3 when building
> >> the libraries? Just a shot in the dark...

>
> > Hi

>
> > Thanks a lot for the try

>
> > When I was building on 64-bit machine I got the error "Non virtual
> > thunk".
> > So we added an optimization flag "-O2" to our makefiles, compiled all
> > the libraries as well as the code again and we got rid of this error.
> > But JI got a new error of "virtual memory exhausted: Cannot allocate
> > memory".
> > Then we added "-O1" flag after "-O2" (-O2 -O1) flag in the makefiles,
> > rebuild everything and we were able to build out code as well as the
> > package.

>
> We are moving a bit off topic here, more help should be sought in groups
> for the GNU toolchain (gcc and gdb).
>
> I seem to recall that gcc goes with the last option when there are
> conflicts, so you can skip the -O2.
>
> > Now the binaries that I have build are running fine but when I try to
> > debug these binaries with gdb , the gdb gives the error
> > warning: Unable to get location for thread creation breakpoint:
> > generic

>
> > error [New LWP 100106] Cannot find thread, Thread ID=1, generic error

>
> Have you compiled in debug symbols, useed the latest version of gdb and
> gcc? My experience is that optimisations and debugging often don't play
> well together, so try turning of optimisations when debugging.
>
> --
> Erik Wikström


Thanks a lot
I am using the latest version of GCC and GDB and this issue happened
when I am porting my code on 64 bit machine. When I turn off the
optimization flag it is giving the error of non virtual thunk as I
explained earlier.
I agree with you that its not safe and recommended to use both
optimization and debugging flag at the same time. But as I am not able
to compile my code without optimization flag. Can you suggest any
solution to this problem.

Regards

Mayank Jain
9818390836
www.mayankjain.110mb.com



 
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
non-virtual thunk to H323RasPDU::~H323RasPDU(): discarded in section `.gnu.linkonce.t._ZN10H323RasPDUD1Ev' contactmayankjain@gmail.com C++ 1 07-07-2007 03:53 PM
non-virtual thunk is? contactmayankjain@gmail.com C++ 1 07-03-2007 05:45 PM
non-virtual thunk contactmayankjain@gmail.com C++ 2 07-03-2007 05:37 AM
thunk.exe inf file missing =?Utf-8?B?aGFtbWll?= Windows 64bit 3 11-30-2005 10:23 PM
Re: generic thunk code fails jmueto C++ 0 12-17-2004 03:02 PM



Advertisments