[PVFS-users] Linking Problem to libpvfs.a under glibc-2.1.2
Phil Carns
pcarns@hubcap.clemson.edu
Thu, 12 Oct 2000 12:04:37 -0400 (EDT)
Hi Jeff,
Since you are using native pvfs calls (pvfs_open rather than open, for
example), you can get around this by linking against libminipvfs.a. It is
a simpler library that only includes pvfs_XXX calls. It is located
in the /usr/lib/ directory so the command line would just be:
gcc test.o -o test -lminipvfs -lm
That being said, it seems like the way that you were previously doing it
with the full pvfs library should have worked, however. What version of
pvfs are you using? Did you build it from source, or is it an rpm?
thanks,
-Phil
> Hello,
>
> I'm trying to link a simple code to test using
> PVFS. It's a Redhat 6.0 system, but upgraded
> to glibc-2.1.2. The link statement looks like,
>
> gcc test.o -o test -L/usr/pvfs/lib -lpvfs -lm
>
> and I get the following error messages:
>
> test.o: In function `main':
> test.o(.text+0x8e): undefined reference to `pvfs_open'
> /usr/pvfs/lib/libpvfs.a(getdents.o): In function `__getdents':
> /usr/src/redhat/BUILD/pvfs/glibc2_1_2/glibc-2.1.2/dirent/../sysdeps/unix/sysv/linux/getdents.c:84:
> undefined reference to `pvfs_getdents'
> collect2: ld returned 1 exit status
>
> It appears that I'm missing something. Could
> someone help out? (Rob, I though posting to
> the list would help other people besides me
> :) ).
>
> Thanks,
>
> Jeff
>
> P.S. I'm attaching the code. But be warned
> that my C is VERY rusty so I know there
> are bugs in it.
>
>
>