public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* __cxa_pure_virtual
@ 2001-11-22 23:54 Sinisa Milivojevic
  2001-11-23  2:59 ` __cxa_pure_virtual Nathan Sidwell
  2001-11-30  6:58 ` __cxa_pure_virtual Sinisa Milivojevic
  0 siblings, 2 replies; 12+ messages in thread
From: Sinisa Milivojevic @ 2001-11-22 23:54 UTC (permalink / raw)
  To: gcc


Hi!

Sorry for bothering you.

Please CC: a reply to me as I am not a member of the list.

Is there a way of compiling a C++ file, which does not contain any
references to STL classes, so that resultant object file will have no
references to the above symbol, defined in pure.cc of libstdc++.

This is a problem in 3.0[1,2]

I have tried using gcc for CXX, setting -fno-rtti -fno-exceptions, but
still libstdc++ has to be linked in , due to the above symbol.

Any solution or work-around ??


Many thanks in advance.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <sinisa@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-22 23:54 __cxa_pure_virtual Sinisa Milivojevic
@ 2001-11-23  2:59 ` Nathan Sidwell
  2001-11-23  3:42   ` __cxa_pure_virtual Sinisa Milivojevic
  2001-11-30  9:10   ` __cxa_pure_virtual Nathan Sidwell
  2001-11-30  6:58 ` __cxa_pure_virtual Sinisa Milivojevic
  1 sibling, 2 replies; 12+ messages in thread
From: Nathan Sidwell @ 2001-11-23  2:59 UTC (permalink / raw)
  To: sinisa; +Cc: gcc

Sinisa Milivojevic wrote:
> Is there a way of compiling a C++ file, which does not contain any
> references to STL classes, so that resultant object file will have no
> references to the above symbol, defined in pure.cc of libstdc++.
Other than by providing definitions of all your abstract functions, no.

> Any solution or work-around ??
You can also link with libsupc++, which contains just the C++ runtime
support routines without the std lib stuff. Or you could define that
symbol explicitly to the linker
	--defsym __cxa_pure_virtual=0
(or, if invoked via gcc)
	-Wl,--defsym -Wl __cxa_pure_virtual=0

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23  2:59 ` __cxa_pure_virtual Nathan Sidwell
@ 2001-11-23  3:42   ` Sinisa Milivojevic
  2001-11-23 15:24     ` __cxa_pure_virtual Phil Edwards
                       ` (2 more replies)
  2001-11-30  9:10   ` __cxa_pure_virtual Nathan Sidwell
  1 sibling, 3 replies; 12+ messages in thread
From: Sinisa Milivojevic @ 2001-11-23  3:42 UTC (permalink / raw)
  To: nathan; +Cc: gcc

Nathan Sidwell writes:
> 
> > Any solution or work-around ??
> You can also link with libsupc++, which contains just the C++ runtime
> support routines without the std lib stuff. Or you could define that
> symbol explicitly to the linker
> 	--defsym __cxa_pure_virtual=0
> (or, if invoked via gcc)
> 	-Wl,--defsym -Wl __cxa_pure_virtual=0
> 
> nathan
> 
> -- 
> Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
>          'But that's a lie.' - 'Yes it is. What's your point?'
> nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
> 

Thanks. Exactly what I needed. 

I guess I can find libsupc++ on ftp.gnu.org ???

I will try other recommandations too.

Thanks again.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <sinisa@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23  3:42   ` __cxa_pure_virtual Sinisa Milivojevic
@ 2001-11-23 15:24     ` Phil Edwards
  2001-11-30 11:35       ` __cxa_pure_virtual Phil Edwards
  2001-12-01  4:54       ` __cxa_pure_virtual Sinisa Milivojevic
  2001-11-23 15:37     ` __cxa_pure_virtual Alexandre Oliva
  2001-11-30  9:21     ` __cxa_pure_virtual Sinisa Milivojevic
  2 siblings, 2 replies; 12+ messages in thread
From: Phil Edwards @ 2001-11-23 15:24 UTC (permalink / raw)
  To: Sinisa Milivojevic; +Cc: nathan, gcc

On Fri, Nov 30, 2001 at 07:24:50PM +0200, Sinisa Milivojevic wrote:
> 
> I guess I can find libsupc++ on ftp.gnu.org ???

It's part of GCC 3.0.  If you compiled a C++ compiler, then it should be
possible to only type

    g++ -o a.out ......  -lsupc++

while linking.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23  3:42   ` __cxa_pure_virtual Sinisa Milivojevic
  2001-11-23 15:24     ` __cxa_pure_virtual Phil Edwards
@ 2001-11-23 15:37     ` Alexandre Oliva
  2001-11-30 11:45       ` __cxa_pure_virtual Alexandre Oliva
  2001-12-01  4:56       ` __cxa_pure_virtual Sinisa Milivojevic
  2001-11-30  9:21     ` __cxa_pure_virtual Sinisa Milivojevic
  2 siblings, 2 replies; 12+ messages in thread
From: Alexandre Oliva @ 2001-11-23 15:37 UTC (permalink / raw)
  To: sinisa; +Cc: nathan, gcc

On Nov 30, 2001, Sinisa Milivojevic <sinisa@mysql.com> wrote:

> I guess I can find libsupc++ on ftp.gnu.org ???

It's created as part of the libstdc++ built procedure.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 12+ messages in thread

* __cxa_pure_virtual
  2001-11-22 23:54 __cxa_pure_virtual Sinisa Milivojevic
  2001-11-23  2:59 ` __cxa_pure_virtual Nathan Sidwell
@ 2001-11-30  6:58 ` Sinisa Milivojevic
  1 sibling, 0 replies; 12+ messages in thread
From: Sinisa Milivojevic @ 2001-11-30  6:58 UTC (permalink / raw)
  To: gcc

Hi!

Sorry for bothering you.

Please CC: a reply to me as I am not a member of the list.

Is there a way of compiling a C++ file, which does not contain any
references to STL classes, so that resultant object file will have no
references to the above symbol, defined in pure.cc of libstdc++.

This is a problem in 3.0[1,2]

I have tried using gcc for CXX, setting -fno-rtti -fno-exceptions, but
still libstdc++ has to be linked in , due to the above symbol.

Any solution or work-around ??


Many thanks in advance.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <sinisa@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23  2:59 ` __cxa_pure_virtual Nathan Sidwell
  2001-11-23  3:42   ` __cxa_pure_virtual Sinisa Milivojevic
@ 2001-11-30  9:10   ` Nathan Sidwell
  1 sibling, 0 replies; 12+ messages in thread
From: Nathan Sidwell @ 2001-11-30  9:10 UTC (permalink / raw)
  To: sinisa; +Cc: gcc

Sinisa Milivojevic wrote:
> Is there a way of compiling a C++ file, which does not contain any
> references to STL classes, so that resultant object file will have no
> references to the above symbol, defined in pure.cc of libstdc++.
Other than by providing definitions of all your abstract functions, no.

> Any solution or work-around ??
You can also link with libsupc++, which contains just the C++ runtime
support routines without the std lib stuff. Or you could define that
symbol explicitly to the linker
	--defsym __cxa_pure_virtual=0
(or, if invoked via gcc)
	-Wl,--defsym -Wl __cxa_pure_virtual=0

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23  3:42   ` __cxa_pure_virtual Sinisa Milivojevic
  2001-11-23 15:24     ` __cxa_pure_virtual Phil Edwards
  2001-11-23 15:37     ` __cxa_pure_virtual Alexandre Oliva
@ 2001-11-30  9:21     ` Sinisa Milivojevic
  2 siblings, 0 replies; 12+ messages in thread
From: Sinisa Milivojevic @ 2001-11-30  9:21 UTC (permalink / raw)
  To: nathan; +Cc: gcc

Nathan Sidwell writes:
> 
> > Any solution or work-around ??
> You can also link with libsupc++, which contains just the C++ runtime
> support routines without the std lib stuff. Or you could define that
> symbol explicitly to the linker
> 	--defsym __cxa_pure_virtual=0
> (or, if invoked via gcc)
> 	-Wl,--defsym -Wl __cxa_pure_virtual=0
> 
> nathan
> 
> -- 
> Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
>          'But that's a lie.' - 'Yes it is. What's your point?'
> nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
> 

Thanks. Exactly what I needed. 

I guess I can find libsupc++ on ftp.gnu.org ???

I will try other recommandations too.

Thanks again.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <sinisa@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23 15:24     ` __cxa_pure_virtual Phil Edwards
@ 2001-11-30 11:35       ` Phil Edwards
  2001-12-01  4:54       ` __cxa_pure_virtual Sinisa Milivojevic
  1 sibling, 0 replies; 12+ messages in thread
From: Phil Edwards @ 2001-11-30 11:35 UTC (permalink / raw)
  To: Sinisa Milivojevic; +Cc: nathan, gcc

On Fri, Nov 30, 2001 at 07:24:50PM +0200, Sinisa Milivojevic wrote:
> 
> I guess I can find libsupc++ on ftp.gnu.org ???

It's part of GCC 3.0.  If you compiled a C++ compiler, then it should be
possible to only type

    g++ -o a.out ......  -lsupc++

while linking.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23 15:37     ` __cxa_pure_virtual Alexandre Oliva
@ 2001-11-30 11:45       ` Alexandre Oliva
  2001-12-01  4:56       ` __cxa_pure_virtual Sinisa Milivojevic
  1 sibling, 0 replies; 12+ messages in thread
From: Alexandre Oliva @ 2001-11-30 11:45 UTC (permalink / raw)
  To: sinisa; +Cc: nathan, gcc

On Nov 30, 2001, Sinisa Milivojevic <sinisa@mysql.com> wrote:

> I guess I can find libsupc++ on ftp.gnu.org ???

It's created as part of the libstdc++ built procedure.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23 15:24     ` __cxa_pure_virtual Phil Edwards
  2001-11-30 11:35       ` __cxa_pure_virtual Phil Edwards
@ 2001-12-01  4:54       ` Sinisa Milivojevic
  1 sibling, 0 replies; 12+ messages in thread
From: Sinisa Milivojevic @ 2001-12-01  4:54 UTC (permalink / raw)
  To: pedwards; +Cc: nathan, gcc

Phil Edwards writes:
> 
> It's part of GCC 3.0.  If you compiled a C++ compiler, then it should be
> possible to only type
> 
>     g++ -o a.out ......  -lsupc++
> 
> while linking.
> 
> 
> Phil
> 

Thank you, I found it out myself pretty fast !!

Small explanation.  We (from MySQL) do not like linking in any code
which has any form of C++ exceptions, as we found out too many
problems with our multi-threaded server on high load on many different
platforms. 

Therefore, I have resolved the above symbol in the manner suggested by
Nathan (thanks again). 

Then I had to resolve missing new / delete operators, which I did by
writting my own set of operators, without any use of exceptions or any
other symbol defined in libsupc++.

So far, all works just fine, thank you !!

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <sinisa@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: __cxa_pure_virtual
  2001-11-23 15:37     ` __cxa_pure_virtual Alexandre Oliva
  2001-11-30 11:45       ` __cxa_pure_virtual Alexandre Oliva
@ 2001-12-01  4:56       ` Sinisa Milivojevic
  1 sibling, 0 replies; 12+ messages in thread
From: Sinisa Milivojevic @ 2001-12-01  4:56 UTC (permalink / raw)
  To: aoliva; +Cc: nathan, gcc

Alexandre Oliva writes:
> On Nov 30, 2001, Sinisa Milivojevic <sinisa@mysql.com> wrote:
> 
> > I guess I can find libsupc++ on ftp.gnu.org ???
> 
> It's created as part of the libstdc++ built procedure.
> 
> -- 
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me
> 

Thank you I found it out myself pretty soon.

Small explanation.  We (from MySQL) do not like linking in any code
which has any form of C++ exceptions, as we found out too many
problems with our multi-threaded server on high load on many different
platforms. 

Therefore, I have resolved the above symbol in the manner suggested by
Nathan (thanks again). 

Then I had to resolve missing new / delete operators, which I did by
writting my own set of operators, without any use of exceptions or any
other symbol defined in libsupc++.


-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <sinisa@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2001-12-01 12:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-22 23:54 __cxa_pure_virtual Sinisa Milivojevic
2001-11-23  2:59 ` __cxa_pure_virtual Nathan Sidwell
2001-11-23  3:42   ` __cxa_pure_virtual Sinisa Milivojevic
2001-11-23 15:24     ` __cxa_pure_virtual Phil Edwards
2001-11-30 11:35       ` __cxa_pure_virtual Phil Edwards
2001-12-01  4:54       ` __cxa_pure_virtual Sinisa Milivojevic
2001-11-23 15:37     ` __cxa_pure_virtual Alexandre Oliva
2001-11-30 11:45       ` __cxa_pure_virtual Alexandre Oliva
2001-12-01  4:56       ` __cxa_pure_virtual Sinisa Milivojevic
2001-11-30  9:21     ` __cxa_pure_virtual Sinisa Milivojevic
2001-11-30  9:10   ` __cxa_pure_virtual Nathan Sidwell
2001-11-30  6:58 ` __cxa_pure_virtual Sinisa Milivojevic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).