Subject: Sol7/asun213/AFS35 "renamefile" linking error?

From: "Paul T Hirose" <[email-masked]>
Date: Wed, 26 Jan 2000 16:06:57 -0800 (PST)

In short...

Solaris 7 (32bit), netatalk-1.4b2+asun2.1.3, AFS-3.5.  Make compiles and
links everything 'cept etc/afpd/afpd.  This is built using gcc 2.95.2
The error I get is:
   ld: fatal: symbol `renamefile' is multiply defined:
           (file file.o and file /local/afs/afsws/lib/afs/util.a(fileutil.o));
   ld: fatal: File processing errors. No output written to afpd
Any ideas on how to fix this?

In a bit more detail:
I've tried just commenting out .../afs/util.a from etc/afpd/Makefile but
that doesn't work.  I was gonna commentout renamefile in etc/afpd/file.c
but I figure that's probly not a good idea, since I dunno what arguments
or return values the renamefile function in .../afs/util.a has or returns.

On a related-tangent:
This error does *not* exist in the "pre-asun2.1.4-35" code, which compiles
and links everything cleanly.  However, when running 2.1.4-35, I get an
error "uam_load(uams_clrtxt.so)" which I've narrowed down to
etc/afpd/uam.c, line 36 (which in turn uses mod_open, which in turn I
think, is just a call to dlopen).  I just dunno anything about using
dynamic libs so I really dunno how to debug past this.

Any ideas on getting 213 or 214-35 are appreciated.
Thanks,
PH

-- 
Paul Hirose          : [email-masked] : Sysadm Motto: rm -fr /my/life
1035 Academic Surge  : Programmer/Analyst   : Backup Motto  : rm -fr /
One Shields Avenue   : Fax   (530) 752-4465 :-------------------------------
Davis, CA 95616-8770 : Voice (530) 752-7181 : rec.pets.cat.anecdotes \(^_^)/

---

From: andrew morgan <[email-masked]>
Date: Wed, 26 Jan 2000 17:12:58 -0800 (PST)

> dynamic libs so I really dunno how to debug past this.

Adrian, how about adding a call to 'dlerror' and sending the output to
syslog when loading uams?  I found this useful when I was debugging my uam
code for papd...

Speaking of which, I've got uam support working with some hard-coded
values and only for uams_pam.c.  I need to write some wrapper functions to
clean it up and then add the xxx_printer functions to the other uams.  I
should have something fairly complete in a few weeks.

Paul, if you look at the man page for dlerror, you can probably figure out
how to add more useful error messages for loading uams.  Basically, add
the following line in uam.c, after the mod_open call fails and is logged
to syslog:

syslog(LOG_ERR, "uam_load (%s): %s", name, dlerror());

	Andy

---

From: a sun <[email-masked]>
Date: Wed, 26 Jan 2000 18:06:03 -0800

sure. actually, you should use mod_error().

neato. re: the dlopen problem, it usually a sign of one of the
following:
	1) improper flags set for module compilation
	2) improper flags set for afpd compilation.
	3) uninstalled modules

in your case, i suspect #3. make sure you've installed the uam
modules. if you don't do a make install, that's likely to be the case,
especially since the install process will create symlinks to the
appropriate uam. hmm. you probably should get pre-37b. that has some
fixes for solaris in there.

-a