Unable to run a simple threaded program on AIX


 
Thread Tools Search this Thread
Operating Systems AIX Unable to run a simple threaded program on AIX
# 1  
Old 06-07-2010
Unable to run a simple threaded program on AIX

Hi,
I am unable to run a simple C++ threaded program on the AIX 5.3 platform. It says
Code:
exec(): 0509-036 Cannot load program ./sendClient because of the following errors: 
rtld: 0712-001 Symbol __pthread was referenced
      from module sendClient(), but a runtime definition
      of the symbol was not found.

We are trying to run this executable built using xlC. It is built on an AIX 5.3 machine and is being tried to run on another AIX 5.3 machine. It works smoothly on the machine where it is built but not on the target machine. But I need to run on the target AIX 5.3 box. Below are some useful information on the box where it is built and works OK.
Code:
$> oslevel -s
5300-07-06-0844
$> lslpp -l | grep -i "Compiler"
  vac.C                      8.0.0.0  COMMITTED  IBM XL C Compiler
  vac.aix50.lib              8.0.0.0  COMMITTED  IBM XL C Compiler Libraries
  vac.html.common.search     8.0.0.0  COMMITTED  IBM XL C Compiler
  vac.html.en_US.C           8.0.0.0  COMMITTED  IBM XL C Compiler
  vac.include                8.0.0.0  COMMITTED  IBM XL C Compiler Include
  vac.lib                    8.0.0.0  COMMITTED  IBM XL C Compiler Libraries
  vac.man.en_US              8.0.0.0  COMMITTED  IBM XL C Compiler Man
  vac.msg.en_US.C            8.0.0.0  COMMITTED  IBM XL C Compiler Messages -
  vacpp.cmp.core             8.0.0.0  COMMITTED  IBM XL C/C++ Compiler
  vacpp.cmp.include          8.0.0.0  COMMITTED  IBM XL C/C++ Compiler Include
  vacpp.cmp.rte              8.0.0.0  COMMITTED  IBM XL C/C++ Compiler
  vacpp.man.en_US            8.0.0.0  COMMITTED  IBM XL C/C++ Compiler Man
  vacpp.msg.en_US.cmp.core   8.0.0.0  COMMITTED  IBM XL C/C++ Compiler
  vacpp.samples.ansicl       8.0.0.0  COMMITTED  IBM XL C/C++ Compiler ANSI
  xlhelp.com                 3.0.1.0  COMMITTED  XL Compiler Information Center
  xlhelp.html.en_US          3.0.1.0  COMMITTED  XL Compiler Common
  vac.C                      8.0.0.0  COMMITTED  IBM XL C Compiler
  vacpp.cmp.core             8.0.0.0  COMMITTED  IBM XL C/C++ Compiler
$>  ldd sendClient
sendClient needs:
         /opt/OMMS/BES/lib/liborb_pr.a
         /opt/OMMS/BES/lib/libvdlog_pr.a
         /opt/OMMS/BES/lib/libvport_pr.a
         /opt/OMMS/BES/lib/liblmgr.a
         /opt/OMMS/BES/lib/libcosnm_pr.a
         /usr/vacpp/lib/libC.a(shr.o)
         /usr/vacpp/lib/libC.a(ansi_32.o)
Cannot find      /usr/lib/libpthreads.a(shr_comm.o)
         /usr/lib/libpthreads.a(shr_xpg5.o)
         /usr/lib/libc.a(shr.o)
         /usr/lib/librtl.a(shr.o)
         /usr/vacpp/lib/libC.a(shr2.o)
         /usr/lib/libpthread.a(shr_comm.o)
         /usr/lib/libpthread.a(shr_xpg5.o)
         /usr/lib/libc_r.a(shr.o)
         /usr/vacpp/lib/libC.a(ansicore_32.o)
         /usr/vacpp/lib/libC.a(shrcore.o)
         /usr/vacpp/lib/libC.a(shr3.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)
$>

All these libraries are available in the build system where it works. I am just unable to make out any solution and it has hit a major roadblock. May I please request your guidance to resolve this issue ?

Many thanks
Asutosh

Last edited by pludi; 06-07-2010 at 07:59 AM.. Reason: code tags, please...
# 2  
Old 06-07-2010
Your problem might stem from different sources:

- maybe your environment is wrong. What is
Code:
echo $LD_LIBRARY_PATH

showing?

-maybe the necessary library is not installed. What is the output of
Code:
lslpp -h bos.rte.lipthreads

I hope this helps.

bakunin
# 3  
Old 06-08-2010
Thank you for your reply. Below are the outputs you asked for. The results below are shown for the build system where it works very fine.
Code:
/home/ciimsmig: echo $LD_LIBRARY_PATH

/home/ciimsmig: 
/home/ciimsmig: lslpp -h bos.rte.lipthreads
lslpp: 0504-132  Fileset bos.rte.lipthreads not installed.
/home/ciimsmig:

# 4  
Old 06-09-2010
You have to install the fileset "bos.rte.lipthreads", because it contains the library you are missing. As this is a shared library you have to have it installed on the system you use to compile the software as well as the system(s) you want your software to run at.

If you need to set the environment variable i mentioned is not sure yet. install the package first and try to run your software. Most likely this will cure your problem anyway.

If you need help for installing packages under AIX refer to the man page of "installp" or "geninstall" respectively.

I hope this helps.

bakunin
# 5  
Old 06-10-2010
Thank you very much. Please let that be installed on the target system. I will report the findings.
# 6  
Old 06-15-2010
Hi,
I got all the relevant information needed. First of all there was a typo error in the string we were looking at. That's why it was not showing. It is libpthreads and NOT lipthreads. Am I right ? With that, I get the following -
-----------BUILD system -------------------
$ lslpp -h bos.rte.libpthreads
Fileset Level Action Status Date Time
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.rte.libpthreads
5.3.0.0 COMMIT COMPLETE 09/15/08 14:59:13
5.3.0.40 COMMIT COMPLETE 09/19/08 20:01:28
5.3.0.51 COMMIT COMPLETE 02/02/10 16:48:15
5.3.0.64 COMMIT COMPLETE 02/02/10 18:39:54
5.3.7.3 APPLY COMPLETE 02/02/10 20:30:45
$

----------- TARGET SYSTEM ---------------
$ lslpp -h bos.rte.libpthreads
Fileset Level Action Status Date Time
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.rte.libpthreads
5.3.0.50 COMMIT COMPLETE 05/18/10 10:41:05


Will you please help in finding the root cause ? Thank you.
# 7  
Old 07-01-2010
Can someone help me out now ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to run Sed in AIX

Hi All, I've wrote a script to truncate newline characters in a text file. Could you please help me in figuring out the issue :confused: for file in $Filelist; do echo $file; FileName=`basename $file`; sed 's/^M//g' $file> "${file}"2; mv "${file}"2 "${file}"; sed '1d' "${file}"... (5 Replies)
Discussion started by: udayakumar
5 Replies

2. Shell Programming and Scripting

Help with simple program. (beginner)

Hey all, Writing a program that searches for a username and if they are online creates a 'beep' and sends the username and date to a log file. the error i am getting is: paul.obrien16@aisling:~/os$ bash checklogin : command not found Enter username paul.obrien16 ': not a valid... (2 Replies)
Discussion started by: sexyladywall
2 Replies

3. Programming

Can someone compile and run a program on AIX 6.1 please?

Hi, I have a program which collects performance data from AIX. It works fine on older releases (< 5.3) but I fail to get data from /proc. I would really appreciate it if someone could compile (using ANSI compat C compiler), run the program (for 30-40 minutes) on AIX 6.1 and send me the... (2 Replies)
Discussion started by: StuBob
2 Replies

4. UNIX for Dummies Questions & Answers

Help needed to run simple java program in linux

Hi guys , This is the first time i m running java application inside linux. i have installed jdk-6u20-linux-i586-rpm.bin jre-6u20-linux-i586-rpm.bin in my linux machine. and set JAVA_HOME and JRE_HOME variables respectively. # echo $JAVA_HOME /usr/java/jdk1.6.0_20/ # echo $JRE_HOME... (6 Replies)
Discussion started by: pinga123
6 Replies

5. Shell Programming and Scripting

simple program help required

The circumfrence of a circle is #!/usr/bin/perl print 2 * 3.141592654 * 12.50 \n"; # pi= 3.141592654 # r= 12.50 I need a simple program showing me all the steps..to modify the above to prompt for and accept a radius from the person running the... (3 Replies)
Discussion started by: Q2wert
3 Replies

6. Programming

Xlib simple program.

I don't know if it is right to ask you this. Can someone help me write a simple Xlib program,with button on it,and all that button do is switch 2 messages. I have tried and tried,but never get past Hello World. Can someone help me please? ---------- Post updated at 10:17 PM ---------- Previous... (2 Replies)
Discussion started by: megane16v
2 Replies

7. UNIX for Dummies Questions & Answers

Unable to run program, Permission denied

Hi All, I am working on Solaris Sparc 9 and I developed application and in that I want to open any file when any action is happened but when I am trying to do the same.I am getting the error -- "Error launching /test.txt", "", "Process.execAndWait", "java.io.IOException: Cannot run... (0 Replies)
Discussion started by: smartgupta
0 Replies

8. Programming

AIX 5.3 64-bit program crashes with AIX 5.1

I have an AIX 64-bit program which uses following from AIX5.3 /usr/lib/libc.a(shr_64.o) /usr/lib/libpthread.a(shr_xpg5_64.o) /home/jeet_xp/export/power/usr/lib/libsarpc.a(shr.o) /unix /usr/lib/libcrypt.a(shr_64.o) /usr/lib/libc_r.a(shr_64.o) ... (3 Replies)
Discussion started by: jeet_xp
3 Replies

9. AIX

multi threaded program is hanging

I have a Multithreaded program which is hanging on AIX. OS Version: AIX 5.2 and thread library version : 5.2.0.75 We Initiate the process with 50 threads..when we are disconnecting from the process it hangs.There is lots of other stuff involved here.I am just sending the piece of the problem with... (0 Replies)
Discussion started by: hikrishn
0 Replies

10. Programming

QUESTION...simple program?

I am new to the unix/linux environment. AND........ I need to create a mini shell..that displays prompt (i.e., READY:$), accepts a command from std-in, and prints the command and any parameters passed to it. HELP!!!! (8 Replies)
Discussion started by: jj1814
8 Replies
Login or Register to Ask a Question