HP3000-L Archives

February 2006, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joe Courtney <[log in to unmask]>
Reply To:
Joe Courtney <[log in to unmask]>
Date:
Tue, 21 Feb 2006 16:43:47 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (88 lines)
Bill:  Thanks for the info.  That is helping me understand this a bit 
more.  It seems however, that I still have something wrong.

I see in /usr/include what you mentioned (but that define is specifying the 
keycreate, not _key_create):

#ifdef _PTHREAD_D4
   extern int pthread_keycreate();
#else
   extern int pthread_key_create();
#endif

The runtime is still giving me a pthread_keycreate error (the same w/out 
_PTHREAD_D4.)  I tried removing the -lpthread from the line and I get more 
pthread errors (see below).  I further investigated (using a viewer in 
Windows) the /lib/libpthread.so file and it appears that it contains: 
pthread_key_create.  Is there a way to view a library on the HP3000, it 
seems that the POSIX "ar" command does not give me any info?  Also, is 
there any way to determine what the linker is linking to?  (Like a verbose 
option?)  I tried specifying specific -L parameters, but that just gets me 
more runtime errors.

I don't know if /lib/libpthread.so is the file being linked at compile time 
or runtime or not.  I'm quite confused.  Where do DCEXL.HPDCE.SYS and
OTHREADXL.THREADS.SYS come into play, is there a way to view what is in 
them?  

Unfortunately, I do think I need the threading ability as later I would 
like to port an xmlrpc client and server implementation.

shell/iX> cat hello.cpp
#if !defined _POSIX_SOURCE
#define _POSIX_SOURCE
#endif

#define _PTHREAD_D4

#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <unistd.h>

using namespace std;

int main()
{
        cout << "Hello\n";
        string strCmd = "ls -la >/gcc/test/test.out";
        execl("/bin/sh","sh","-c",strCmd.c_str(),0);
        return 0;
} 

shell/iX> make
g++ hello.cpp -o hello -lstdc++ 
shell/iX> ./hello
UNRESOLVED EXTERNALS: pthread_mutex_lock  (LDRERR 512)
UNRESOLVED EXTERNALS: pthread_mutex_unlock  (LDRERR 512)
UNRESOLVED EXTERNALS: pthread_setspecific  (LDRERR 512)
UNRESOLVED EXTERNALS: pthread_getspecific  (LDRERR 512)
UNRESOLVED EXTERNALS: pthread_keycreate  (LDRERR 512)
UNRESOLVED EXTERNALS: pthread_once  (LDRERR 512)
UNRESOLVED EXTERNALS: thd_fprintf  (LDRERR 512)
 
**** EXEC FUNCTION FAILED; subsys =517; info = 48 
ABORT: /gcc/test/hello 
NM SYS   a.01007770 dbg_abort_trace+$28
[1] + Done(134) ./hello
  50594083      Abort   ./hello
shell/iX>


shell/iX> make
g++ hello.cpp -o hello -lstdc++ -lpthread
shell/iX> ./hello
UNRESOLVED EXTERNALS: pthread_keycreate  (LDRERR 512)
 
**** EXEC FUNCTION FAILED; subsys =517; info = 48 
ABORT: /gcc/test/hello 
NM SYS   a.01007770 dbg_abort_trace+$28
[1] + Done(134) ./hello
  43778187      Abort   ./hello
shell/iX>

Thanks for your time in helping this clueless HP3000 user.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2