[CentOS] Building xfsprogs can't find valid UUID library

Sat Dec 5 18:43:09 UTC 2009
C Linus Hicks <linush at verizon.net>

On CentOS 5.3 x86_64, I'm trying to build
xfsprogs-2.9.4-1.el5.centos.x86_64 with -ggdb so I can use it with gdb
and examine the data structures when using xfs_db. I've installed the
src rpm as a non-root user and when I run rpmbuild -bc during
the ./configure I get the error:

.
.
.
checking uuid.h usability... no
checking uuid.h presence... no
checking for uuid.h... no
checking sys/uuid.h usability... no
checking sys/uuid.h presence... no
checking for sys/uuid.h... no
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking for uuid_compare... no
checking for uuid_compare in -luuid... no

FATAL ERROR: could not find a valid UUID library.
Install the Universally Unique Identifiers library package.
error: Bad exit status from /var/tmp/rpm-tmp.42904 (%build)


However, I found that /lib64/libuuid.so.1.2 (provided by
e2fsprogs-libs-1.39-20.el5.x86_64) does exist and using nm -D shows an
entry point for uuid_compare:

000000385a6015e0 T uuid_compare

Then I did:

strings ld.so.cache | grep uuid
libuuid.so.1
/lib64/libuuid.so.1
libuuid.so.1
/lib/libuuid.so.1
libuuid.so
/usr/lib/libuuid.so

And /lib64/libuuid.so.1 is a symbolic link to /lib64/libuuid.so.1.2.

The only hit on Google that looked interesting was from 2006:

http://oss.sgi.com/archives/xfs/2006-03/msg00425.html

Can anybody tell me what's going wrong and how to fix it?
Thanks for your help.
Linus