Subject: Working on Netatalk 1.5.0 package - dlopen issues
To: None <,>
From: David Rankin <>
List: tech-pkg
Date: 01/03/2002 22:16:03
I've been working on a Netatalk 1.5.0 package on my NetBSD/sparc 1.5.2
box, but I've run into a problem. For afpd, "mod_load" uses dlopen and
dlsym. I've already found one problem I've patched in the process, but 
I've found that the following code:

#define mod_symbol(a, b) dlsym(a, b)


   if ((mod->uam_fcn = mod_symbol(module, buf)) == NULL) {
        syslog(LOG_ERR, "uam_load(%s): mod_symbol error for symbol %s: %s",
               mod_error() );
        goto uam_load_err;


Jan  3 20:03:26 rumpole afpd[1672]: uam: loading (/usr/pkg/libexec/netatalk/uams/
Jan  3 20:03:26 rumpole afpd[1672]: uam_load( mod_symbol error for symbol uams_clrtxt: Undefined symbol "_uams_clrtxt"

I can confirm buf == "uams_clrtxt". A test program I've written confirms
that uams_clrtxt is exported correctly. I cannot confirm any cc option that
is forcing the _ in front of buf in afpd.

Anyone have any suggestions as to why afpd is sticking _uams_clrtxt
in place of uams_clrtxt in the middle of dlsym? I'd greatly appreciate it.

As before, if you want to try out the package, a copy is at , but it's not
ready for prime time yet.


David W. Rankin, Jr.     Christian, Husband, Father, and UNIX Sysadmin. 
   "We're the technical experts. We were hired so that management could
    ignore our recommendations and tell us how to do our jobs."
       -- Mike Andrews in <eUJE5.880$>