Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Not linking due to undefined reference to gpfs_fcntl #15

Open
mrobbert opened this issue Dec 6, 2013 · 6 comments · Fixed by hpc/ior#3
Open

Not linking due to undefined reference to gpfs_fcntl #15

mrobbert opened this issue Dec 6, 2013 · 6 comments · Fixed by hpc/ior#3

Comments

@mrobbert
Copy link

mrobbert commented Dec 6, 2013

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 togpfs_fcntl'
aiori-POSIX.o: In function gpfs_access_start': /u/mx/co/mrobbert/ior/src/aiori-POSIX.c:141: undefined reference togpfs_fcntl'
aiori-POSIX.o: In function gpfs_free_all_locks': /u/mx/co/mrobbert/ior/src/aiori-POSIX.c:118: undefined reference togpfs_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
Copy link

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/ior@ccb94fc

@Keeper-of-the-Keys
Copy link

Was this ever fixed?
The status 'merged' would suggets it was but I am still failing to build IOR...
Thanks!

@doctaweeks
Copy link

@Keeper-of-the-Keys are you building master? Can you post the error you're getting?

@Keeper-of-the-Keys
Copy link

Building master, includes the merge above.

mpicc -I/home/Keeper of the Keys/Lustre/2.8/lustre-2.8.0/lustre/include/ -I/usr/lpp/mmfs/include/ -L/home/Keeper of the Keys/Lustre/2.8/lustre-2.8.0/lustre/include/ -L/usr/lpp/mmfs/include/ -o ior ior.o utilities.o parse_options.o aiori-POSIX.o aiori-MPIIO.o -lm
aiori-POSIX.o: In function gpfs_free_all_locks': aiori-POSIX.c:(.text+0x68): undefined reference to gpfs_fcntl'
aiori-POSIX.o: In function gpfs_access_start': aiori-POSIX.c:(.text+0x19b): undefined reference to gpfs_fcntl'
aiori-POSIX.o: In function gpfs_access_end': aiori-POSIX.c:(.text+0x2c5): undefined reference to gpfs_fcntl'

I don't mind disabling GPFS but there seems to be no --without-gpfs option as far as I can tell.... (although it would be nice to be able to compare the different filesystems we have with the same benchmark)

@Keeper-of-the-Keys
Copy link

Turns out I had two issues:

  1. Some of my include paths were wrong
  2. The configure script does not add -lgpfs to the CFLAGS when it detects GPFS support.

I do think that there should also be some form of --without-gpfs though....

@chrissamuel
Copy link

The configure script does not add -lgpfs to the CFLAGS when it detects GPFS support.

I've just been caught by this, so it would be handy rather than just have a default non-working build on a system with GPFS installed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants