home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / solaris / 426 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.5 KB

  1. Xref: sparky comp.unix.solaris:426 comp.windows.x:20402 comp.unix.programmer:5741
  2. Path: sparky!uunet!usc!elroy.jpl.nasa.gov!ames!sun-barr!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!gday.Eng.Sun.COM!maslen
  3. From: maslen@gday.Eng.Sun.COM (Thomas Maslen)
  4. Newsgroups: comp.unix.solaris,comp.windows.x,comp.unix.programmer
  5. Subject: Re: Solaris 2: how do I get rid of -lucb ?
  6. Date: 19 Dec 1992 01:12:52 GMT
  7. Organization: Sun Microsystems Inc., Mountain View, CA
  8. Lines: 35
  9. Message-ID: <lj4tokINN3a2@exodus.Eng.Sun.COM>
  10. References: <1992Dec18.094738.15038@sunbim.be> <1992Dec18.133818.19160@walter.bellcore.com>
  11. NNTP-Posting-Host: gday
  12. Keywords: SVR4, shared libraries, Solaris 2
  13.  
  14. dana@dino.bellcore.com (Dana Chee) writes:
  15. >In article <1992Dec18.094738.15038@sunbim.be>, db@sunbim.be (Danny Backx) writes:
  16. ...
  17. >|> I am using Solaris 2.* on my SPARC, and many of the home-brew applications
  18. >|> I have compiled on it (with Motif, Xt, and Xlib libraries) have the habit
  19. >|> of trying to load libucb at run time.
  20. >|> 
  21. >|> What happens in fact is I compile the applications with commands like this :
  22. >|>     cc -o prog *.o -lXm -lXt -lX11
  23. >|> without any references to /usr/ucbinclude or /usr/ucblib around. That is, I
  24. >|> do NOT have an LD_LIBRARY_PATH or an LD_RUN_PATH set, and none of the sources
  25. >|> require /usr/ucbinclude.
  26. >|> 
  27. >|> When after linking I use "ldd" on the executable, it will tell me that the
  28. >|> UCB library is linked in. E.g.
  29. ...
  30. >    What compiler are you using?  If its the one in /usr/ucb/cc,
  31. >then you are getting the expected behaviour.  /usr/ucb/cc is a shell
  32. >script that adds -lucb -lsocket -lnsl -lelf -laio to your load path
  33. >and /usr/ucbinclude to your include path.  What you probably want to
  34. >do is get gcc, this will remove any of the above.  (I've not tried
  35. >running /usr/ucb/cc without doing the above, since its designed to
  36. >compile things in compatability mode).  The Cygnus distribution is
  37. >available anon ftp from uunet, or you can get the source and build it
  38. >yourself.
  39.  
  40. Let me try to disentangle the two threads in this paragraph... yes, as Dana
  41. notes, it sounds as though the shell is finding /usr/ucb/cc on your path
  42. before it finds the real compiler.  However, this is mostly orthogonal to the
  43. issue of whether you use SunPro's cc, gcc, or any other compiler.  (I say 
  44. "mostly" because the /usr/ucb/cc script works "out of the box" with SunPro's
  45. cc, whereas last time I looked it needed some tweaks to work with gcc).
  46.  
  47. Thomas Maslen                    
  48. maslen@eng.sun.com                My opinions, not Sun(Soft)'s
  49.