public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Can't profile g++ program
@ 2003-12-16 20:46 lrtaylor
  0 siblings, 0 replies; 4+ messages in thread
From: lrtaylor @ 2003-12-16 20:46 UTC (permalink / raw)
  To: LAssinovsky, gcc-help

The pthreads library is "libpthread.so" (singular rather than plural).  Are you really linking against libpthreads, or was that just a typo?  If you are, try using -lpthread instead.  IIRC, it seems to me that libthread (no p) is used for Solaris threads (that is, native SunOS threading), and I thought it was independent of pthread.  So, it seems to me that your program should not normally have libthread as a dependency and shouldn't be loading it.  Not sure what to say beyond that, though...

Good luck,
Lyle

-----Original Message-----
From: Assinovsky, Lev [mailto:LAssinovsky@algorithm.aelita.com]
Sent: Tuesday, December 16, 2003 4:49 AM
To: lrtaylor; gcc-help@gcc.gnu.org
Subject: RE: Can't profile g++ program


g++ -pg -g  tst.cpp -o tst -lpthreads

----
Lev Assinovsky
Aelita Software Corporation
O&S InTrust Framework Division, Team Leader
ICQ# 165072909


> -----Original Message-----
> From: lrtaylor@micron.com [mailto:lrtaylor@micron.com]
> Sent: Monday, December 15, 2003 8:31 PM
> To: Assinovsky, Lev; gcc-help@gcc.gnu.org
> Subject: RE: Can't profile g++ program
> 
> 
> What was the command line you used to link your program?
> 
> Lyle
> 
> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
> Behalf Of Assinovsky, Lev
> Sent: Monday, December 15, 2003 5:53 AM
> To: gcc-help@gcc.gnu.org
> Subject: Can't profile g++ program
> 
> 
> Hello all!
> To my surprise I can't use option -pg 
> when linking with -lpthreads.
> Program crashing in libthreads (not in libpthreads) during 
> initialization:
> 

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

* RE: Can't profile g++ program
@ 2003-12-16 11:49 Assinovsky, Lev
  0 siblings, 0 replies; 4+ messages in thread
From: Assinovsky, Lev @ 2003-12-16 11:49 UTC (permalink / raw)
  To: lrtaylor, gcc-help

g++ -pg -g  tst.cpp -o tst -lpthreads

----
Lev Assinovsky
Aelita Software Corporation
O&S InTrust Framework Division, Team Leader
ICQ# 165072909


> -----Original Message-----
> From: lrtaylor@micron.com [mailto:lrtaylor@micron.com]
> Sent: Monday, December 15, 2003 8:31 PM
> To: Assinovsky, Lev; gcc-help@gcc.gnu.org
> Subject: RE: Can't profile g++ program
> 
> 
> What was the command line you used to link your program?
> 
> Lyle
> 
> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
> Behalf Of Assinovsky, Lev
> Sent: Monday, December 15, 2003 5:53 AM
> To: gcc-help@gcc.gnu.org
> Subject: Can't profile g++ program
> 
> 
> Hello all!
> To my surprise I can't use option -pg 
> when linking with -lpthreads.
> Program crashing in libthreads (not in libpthreads) during 
> initialization:
> 

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

* RE: Can't profile g++ program
@ 2003-12-15 17:30 lrtaylor
  0 siblings, 0 replies; 4+ messages in thread
From: lrtaylor @ 2003-12-15 17:30 UTC (permalink / raw)
  To: LAssinovsky, gcc-help

What was the command line you used to link your program?

Lyle

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Assinovsky, Lev
Sent: Monday, December 15, 2003 5:53 AM
To: gcc-help@gcc.gnu.org
Subject: Can't profile g++ program


Hello all!
To my surprise I can't use option -pg 
when linking with -lpthreads.
Program crashing in libthreads (not in libpthreads) during 
initialization:

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

* Can't profile g++ program
@ 2003-12-15 12:54 Assinovsky, Lev
  0 siblings, 0 replies; 4+ messages in thread
From: Assinovsky, Lev @ 2003-12-15 12:54 UTC (permalink / raw)
  To: gcc-help

Hello all!
To my surprise I can't use option -pg 
when linking with -lpthreads.
Program crashing in libthreads (not in libpthreads) during 
initialization:
(gdb) bt
#0  0xdf96ce40 in _sigoff () from /usr/lib/libthread.so.1
#1  0xdf96a4f9 in mutex_unlock () from /usr/lib/libthread.so.1
#2  0x08055182 in sbrk ()
#3  0x08050b9a in monstartup ()
#4  0x08050ec9 in internal_mcount ()
#5  0x0806d91d in sys ()
#6  0xdf967635 in _init386 () from /usr/lib/libthread.so.1
#7  0xdf9785fa in _init () from /usr/lib/libthread.so.1
#8  0xdfae965c in ?? ()
#9  0xdfaf1ce3 in ?? ()
#10 0xdfae30ba in ?? ()


My env:
Solaris Intel 2.8,
gcc -v
Reading specs from /opt/AESgcc/lib/gcc-lib/i386-pc-solaris2.8/3.2/specs
Configured with: /export/home/Ext/Archive/gcc-3.2/configure --prefix=/opt/AESgcc --disable-multilib --enable-threads=posix --enable-languages=c,c++ --with-gnu-ld --with-ld=/usr/local/bin/ld --with-gnu-as -with-as=/usr/local/bin/as
Thread model: posix
gcc version 3.2

Any suggestions?
Thanks in advance!
----
Lev Assinovsky
Aelita Software Corporation

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

end of thread, other threads:[~2003-12-16 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-16 20:46 Can't profile g++ program lrtaylor
  -- strict thread matches above, loose matches on Subject: below --
2003-12-16 11:49 Assinovsky, Lev
2003-12-15 17:30 lrtaylor
2003-12-15 12:54 Assinovsky, Lev

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).