home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / sun / misc / 5132 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.9 KB  |  46 lines

  1. Newsgroups: comp.sys.sun.misc
  2. Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!ames!elroy.jpl.nasa.gov!euclid.JPL.NASA.GOV!pjs
  3. From: pjs@euclid.JPL.NASA.GOV (Peter J. Scott)
  4. Subject: _MAIN_ undefined
  5. Message-ID: <1992Nov6.225941.2375@elroy.jpl.nasa.gov>
  6. Sender: news@elroy.jpl.nasa.gov (Usenet)
  7. Nntp-Posting-Host: euclid.jpl.nasa.gov
  8. Reply-To: pjs@euclid.jpl.nasa.gov
  9. Organization: Jet Propulsion Laboratory, NASA/Caltech
  10. Date: Fri, 6 Nov 1992 22:59:41 GMT
  11. Lines: 33
  12.  
  13. I get this error from ld when I use -Bstatic but not when I don't.
  14. This is an IPX running 4.1.2 and I have Fortran 1.4.1.  Here's what happens:
  15.  
  16. f77 -o xodp.e lnktim.f -Bstatic xodp.o files.o list.o io.o y.tab.o templ.o namelist.o cwd.o resources.o -O -pipe -D_NO_PROTO /usr/nav/lib/libWc.a /usr/nav/lib/libXmp.a /usr/nav/lib/libXnav.a -lXm -lXmu -lXt -lX11 -ll -L/usr/lib/X11 -cg89 -libmil
  17. lnktim.f:
  18.         lnktim:
  19. ld: Undefined symbol
  20.    _MAIN_
  21. Compilation failed
  22.  
  23. Yet, it produces an executable that works just fine (touch wood).
  24.  
  25. Sun Support told me to apply the 100332-06 jumbo patch but that didn't
  26. make any difference.  The problem is in the link phase, it seems, from
  27. using the -V flag:
  28.  
  29. [...]
  30. version-id of "/bin/ld":                             Unknown
  31. /bin/ld -dc -dp -e start -u _MAIN_ -X -L/usr/lib/X11 -o xodp.e /usr/lang/SC1.0.1/crt0.o /usr/lang/SC1.0.1/cg89/_crt1.o -L/usr/lang/SC1.0.1/cg89 -L/usr/lang/SC1.0.1 lnktim.o -Bstatic xodp.o files.o list.o io.o y.tab.o templ.o namelist.o cwd.o resources.o /usr/nav/lib/libWc.a /usr/nav/lib/libXmp.a /usr/nav/lib/libXnav.a -lXm -lXmu -lXt -lX11 -ll -lF77 -lm -lc
  32. ld: Undefined symbol
  33.    _MAIN_
  34.  
  35. You might think that the "-u _MAIN_" above is a dead giveaway, but in
  36. fact it's still there when the -Bstatic is removed, but then I don't
  37. get the error.
  38.  
  39. Any ideas?
  40.  
  41. -- 
  42. This is news.  This is your       |    Peter Scott, NASA/JPL/Caltech
  43. brain on news.  Any questions?    |    (pjs@euclid.jpl.nasa.gov)
  44.  
  45.  
  46.