Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Not linking due to undefined reference to gpfs_fcntl #15

Open
mrobbert opened this Issue · 1 comment

2 participants

@mrobbert

ior isn't building on my system due to some missing GPFS symbols. Here are the errors:

mpicc -g -O2 -o ior ior.o utilities.o parse_options.o aiori-POSIX.o aiori-MPIIO.o -lm
aiori-POSIX.o: In function gpfs_access_end':
/u/mx/co/mrobbert/ior/src/aiori-POSIX.c:165: undefined reference to
gpfs_fcntl'
aiori-POSIX.o: In function gpfs_access_start':
/u/mx/co/mrobbert/ior/src/aiori-POSIX.c:141: undefined reference to
gpfs_fcntl'
aiori-POSIX.o: In function gpfs_free_all_locks':
/u/mx/co/mrobbert/ior/src/aiori-POSIX.c:118: undefined reference to
gpfs_fcntl'
collect2: ld returned 1 exit status

I was able to get it to link properly by adding -lgpfs to the link lines. I can try to work up a patch, but it looks like this would need to be changed in the Autoconf files and I don't have much experience with those.

@roblatham00

OK, thanks. So your configure script is finding gpfs_fcntl.h? On Blue Gene, the gpfs.h and gpfs_fcntl.h headers were in non-default locations, so I assumed folks would be changing CPPFLAGS, LIBS, and LDFLAGS, as they have to do for HDF5.

Here's a simple change to the configure script, but it still needs one to set LDFLAGS if the gpfs libraries are installed anywhere odd (as they are on Blue Gene):

roblatham00@ccb94fc

@roblatham00 roblatham00 referenced this issue from a commit in roblatham00/ior
@roblatham00 roblatham00 Add gpfs libraries if needed
Last commit introduced gpfs_fcntl operations, depending if gpfs.h and
gpfs_fcntl.h were found.  These routines need the gpfs library.  This
configure check will bring in libgpfs -- you will still need to set
LDFLAGS and CPPFLAGS if gpfs is installed in some non-default locaiton
(as it is on Blue Gene).
ccb94fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.