Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: c632692@cclabs.missouri.edu (Vepa V Sirish)
Subject: Re: Q: OSF1 -lpthreads -> core - why ?
Date: 1996/04/03	[thread overview]
Message-ID: <4jsm22$18u6@news.missouri.edu> (raw)
In-Reply-To: 4js6bu$gai@news1.relcom.eu.net

Yury July (july@Gemini.relcom.EU.net) wrote:
: Here's my stupid program:
:  
:  main(){
:    printf("hello\n");   
:  }
:     
: Should work, isn't it ?
: However, when linked with -lpthreads it coredumps!
:      
: gdb says:
:      Program terminated with signal 11, Segmentation fault.
:      Reading symbols from /usr/shlib/libpthreads.so...done.
:      Reading symbols from /usr/shlib/libdce.so...done.
:      Reading symbols from /usr/shlib/libc.so...done.
:      Reading symbols from /usr/shlib/libmach.so...done.
:      Reading symbols from /usr/shlib/libc_r.so...done.
:      #0  0x3ff805188ec in port_allocate () at ./mach_user.c:6039
:       
: OS version is still OSF1 V3.2 17 alpha.
: Did I missed something or the reason is wrong release,
: or lack of options in kernel configuration ?
:        
: Many thanks in advance.

: --
: Regards,
: Yury July

--

Well, here is my program, and take a look at the compiler options i 
supplied. It ran fine for me.  And this was executed on a DCE Alpha 
OSF/1 V3.2. do not ask me about all these compiler options/linker 
options. They have worked for me for a long time (1 1/2 yrs).  
I understand, the order in which the libs are linked is very important. 
Hope this helps
/v$


csdeca [131] [7:53pm] [/usr/users/c632692/test] > cat hello.script
Script started on Tue Apr 02 19:50:39 1996
csdeca [101] [7:50pm] [/usr/users/c632692/test] >
csdeca [101] [7:50pm] [/usr/users/c632692/test] > hello.sh
#! /bin/sh -v
cat hello.c
#include <pthread.h>
#include <stdio.h>

main(){
printf("hello world\n");
}

cc hello.c
ls -al
total 37
drwx--x--x   2 c632692  grad         512 Apr  2 19:50 .
drwxr-xr-x  28 c632692  grad        2048 Apr  2 19:43 ..
-rwx--x--x   1 c632692  grad       32768 Apr  2 19:50 a.out
-rw-------   1 c632692  grad          76 Apr  2 19:44 hello.c
-rw-------   1 c632692  grad           0 Apr  2 19:50 hello.script
-rwx------   1 c632692  grad         168 Apr  2 19:50 hello.sh
a.out
hello world

cc hello.c -Dalpha  -D_SHARED_LIBRARIES -D_REENTRANT -w -ldce -lpthreads 
-lc_r - lmach -lm

 ls -al
total 165
drwx--x--x   2 c632692  grad         512 Apr  2 19:50 .
drwxr-xr-x  28 c632692  grad        2048 Apr  2 19:43 ..
-rwx--x--x   1 c632692  grad      155648 Apr  2 19:50 a.out
-rw-------   1 c632692  grad          76 Apr  2 19:44 hello.c
-rw-------   1 c632692  grad           0 Apr  2 19:50 hello.script
-rwx------   1 c632692  grad         168 Apr  2 19:50 hello.sh

a.out
hello world


csdeca [102] [7:50pm] [/usr/users/c632692/test] > exit
exit

script done on Tue Apr 02 19:51:00 1996
csdeca [132] [7:55pm] [/usr/users/c632692/test] >  


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!   Vepa V Sirish                                                    !
!   1205 University Avenue, #236    Columbia, MO 65201               !
!   sirish@csdeca.cs.missouri.edu    573-874-8720 (R)                !
!   \o/   \o        __|    \ /     |__        o _  \o/  _ o          !
!    |    /\   __\o   \o    |    o/    o/__   /\    |    /\  \__/    !
!  _/_\__|_\__/)_|____(_\__/o\__/_)____|__(\__/_|__/_\__|_\__/ /o    ! 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<



  reply	other threads:[~1996-04-03  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-02  5:00 Q: OSF1 -lpthreads -> core - why ? Yury July
1996-04-03  5:00 ` Vepa V Sirish [this message]
1996-04-03  5:00   ` Thomas Hopfner
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox