home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / aix / 12892 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.4 KB

  1. Path: sparky!uunet!noc.near.net!ceylon!roger.gte.com!mbr0
  2. From: mbr0@roger.gte.com (Mark Rosenthal)
  3. Newsgroups: comp.unix.aix
  4. Subject: Program hangs when linked without shared libraries
  5. Message-ID: <5040@ceylon.gte.com>
  6. Date: 29 Dec 92 02:25:30 GMT
  7. Sender: news@ceylon.gte.com
  8. Organization: GTE Laboratories
  9. Lines: 26
  10.  
  11.  
  12. I am trying to debug a program which is crashing.  When I ask dbx for
  13. a stack trace, the addresses shown for library routines do not make
  14. sense.  I believe this is due to dbx not being able to decipher
  15. addresses in shared libraries.  Therefore, I have tried to link with
  16. non-shared libraries.  I followed the directions in the 'ld' man page,
  17. and used the following arguments (to 'cc' actually):
  18.  
  19.     cc -o <output_file> -bnso -bI:/lib/syscalls.exp ... <lots of .o files>
  20.         <lots of -l arguments>
  21.  
  22. This caused 'ld' to complain about an undefined symbol that it had never
  23. needed when linking with shared libraries.  I added the argument
  24. '-liconv' to resolve this problem and 'ld' produced an executable for
  25. me.
  26.  
  27. However when I tried to run the executable, it appeared to hang.  It
  28. used 45 minutes of CPU time (as reported by 'ps') before I finally
  29. gave up and killed the process.  The code contains a number of
  30. printf()s followed by fflush(stdout)s in its initialization routine.
  31. The messages never appeared on stdout, so it appears that the program
  32. did not even get as far as entering its initialization routine.
  33.  
  34. Any ideas?
  35.  
  36.     mbr@gte.com
  37.