Joe Eykholt wrote:
> Hi all,
> 
> I'm trying to install and run libhbalinux.  I had it working,
> but it didn't seem to ever use libpciacess() or find any HBAs,
> due to a failure of readlink on /sys/class/fc_host/hostX since
> that's a directory and not a symlink.
> 
> I think the intent must have been to read /sys/class/fc_host/hostX/device.
> I don't see how that ever worked, or any change that obviously
> broke it.  The kernel hasn't changed that from a link to a
> directory recently, as far as I can tell.
> 
> So, I fixed that, but now I'm getting a failure to load
> libpciaccess which results in the symbol pci_system_init()
> not getting found.
> 
> Can anyone tell me what I might be doing wrong?  I've
> run ldconfig.  I've linked libhbalinux against libpciaccess.
> 
> Here's the patch (cut/paste, not applicable):
> 
> diff --git a/lport.c b/lport.c
> index 5e8802f..897604f 100644
> --- a/lport.c
> +++ b/lport.c
> @@ -163,6 +163,7 @@ sysfs_scan(struct dirent *dp, void *arg)
>       struct adapter_info *ap;
>       struct port_info *pp;
>       char host_dir[80], hba_dir[80], drv_dir[80];
> +     char dev_dir[128];
>       char ifname[20], buf[256];
>       char *driverName;
>       int data[32], rc, i;
> @@ -225,10 +226,12 @@ sysfs_scan(struct dirent *dp, void *arg)
>               goto skip;
> 
>       /*
> -      * See if host_dir is a PCI device directory
> +      * See if <host_dir>/device is a PCI device directory
>        * If not, try it as a net device.
>        */
> -     i = readlink(host_dir, buf, sizeof(buf) - 1);
> +     snprintf(dev_dir, sizeof(dev_dir),
> +             SYSFS_HOST_DIR "/%s/device", dp->d_name);
> +     i = readlink(dev_dir, buf, sizeof(buf) - 1);
>       if (i < 0)
>               goto skip;
>       buf[i] = '\0';
> 
> ---
> Here's the error I get:
> 
> # ./fcoeadm -i
> ./fcoeadm: symbol lookup error: /usr/lib64/libhbalinux.so.2: undefined 
> symbol: pci_system_init

I figured out my linking problem.  I needed to specify libpciaccess.la (not .so)
in the environment variable PCIACCESS_LIBS.

        Joe

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to