Coda File System

Re: Coda Compile Problem.

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Thu, 31 Jan 2002 14:34:27 -0500
On Thu, Jan 31, 2002 at 12:29:30AM -0500, Victor wrote:
> > On Wed, Jan 30, 2002 at 09:06:29PM -0500, Victor wrote:
> > > But I am still getting this error:
> > >
> > ...
> > > getsecret.o(.text+0x1f2): undefined reference to `rpc2_NextRandom'
> > > collect2: ld returned 1 exit status
> >
> > You are compiling against rpc2-1.9 instead of rpc2-1.13. Although 9
> > sorts lower in the list than 13, it's not the latest version.
> 
> Nope, I am using 1.13. I got it from the CODA ftp site. No other rpc2
> package is installed. Checked /lib and /usr/lib and /usr/local/lib. Not rpc2
> libs there. The only one is 1.13 in /usr/coda (and I specify this path in
> the configure line).
>
> > > gcc -fno-exceptions -o dirtest -L/usr/coda/lib -L/usr/coda/lib -L/usr/coda/lib dirtest.o libcodadir.a ../util/libutil.a /usr/home/victord/CODA/coda-5.3.17/lib-src/base/libbase.a -lrds -lseg -lrvmlwp -llwp -lreadline -ltermcap

Now that you mention it, the link line doesn't include -lrpc2 because
dirtest shouldn't even be using any functions from 'getsecret', so why
is the linker complaining?

What version of gcc are you using? Adding $(LIBRPC2) to the LIBS :=
variable in the makefile will fix it, but I'm not sure why we would need
to do that.

Jan
Received on 2002-01-31 14:34:29