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