* [PATCH] xfstests: fix dbtest build
@ 2008-11-03 23:04 Eric Sandeen
2008-11-12 10:04 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2008-11-03 23:04 UTC (permalink / raw)
To: xfs mailing list
At least on my x86_64 RHEL5 box, if gdbm-devel is installed, then the
xfstests build fails with:
gcc dbtest.c -o dbtest -g -O2 -DDEBUG -I../include -DVERSION=\"1.0.0\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall ../lib/.libs/libtest.a
dbtest.c: In function 'InitDbmLookup':
dbtest.c:147: warning: cast from pointer to integer of different size
dbtest.c:198: warning: cast from pointer to integer of different size
/tmp/ccuekqxe.o: In function `CleanupDbmLookup':
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:304: undefined reference to `dbm_close'
/tmp/ccuekqxe.o: In function `DoDbmLookup':
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:220: undefined reference to `dbm_fetch'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:264: undefined reference to `dbm_fetch'
/tmp/ccuekqxe.o: In function `InitDbmLookup':
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:146: undefined reference to `dbm_open'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:179: undefined reference to `dbm_store'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:192: undefined reference to `dbm_close'
/root/cvs/xfs-cmds-build/xfstests/src/dbtest.c:197: undefined reference to `dbm_open'
collect2: ld returned 1 exit status
gmake[1]: *** [dbtest] Error 1
make: *** [default] Error 2
This patch fixes it for me, but my userspace-fu is weak; does this look ok?
Thanks,
-Eric
Index: xfs-cmds-build/xfstests/aclocal.m4
===================================================================
--- xfs-cmds-build.orig/xfstests/aclocal.m4
+++ xfs-cmds-build/xfstests/aclocal.m4
@@ -197,8 +197,8 @@ AC_DEFUN([AC_PACKAGE_WANT_NDBM],
AC_DEFUN([AC_PACKAGE_WANT_GDBM],
[ AC_CHECK_HEADERS([gdbm/ndbm.h], [ have_db=true ], [ have_db=false ])
- if test $have_db = true -a -f ${libexecdir}${libdirsuffix}/libgdbm.a; then
- libgdbm="${libexecdir}${libdirsuffix}/libgdbm.a"
+ if test $have_db = true; then
+ libgdbm="-lgdbm"
fi
AC_SUBST(libgdbm)
AC_SUBST(have_db)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xfstests: fix dbtest build
2008-11-03 23:04 [PATCH] xfstests: fix dbtest build Eric Sandeen
@ 2008-11-12 10:04 ` Christoph Hellwig
2008-11-12 15:55 ` Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2008-11-12 10:04 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs mailing list
On Mon, Nov 03, 2008 at 05:04:32PM -0600, Eric Sandeen wrote:
> At least on my x86_64 RHEL5 box, if gdbm-devel is installed, then the
> xfstests build fails with:
Still doesn't build even with libgdbm-dev installed on debian, despite
having a /usr/include/gdbm.h. Even when manually including that one it
doesn't define DBM. Which of the three headers does actually get used
on RHEL?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfstests: fix dbtest build
2008-11-12 10:04 ` Christoph Hellwig
@ 2008-11-12 15:55 ` Eric Sandeen
0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2008-11-12 15:55 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs mailing list
Christoph Hellwig wrote:
> On Mon, Nov 03, 2008 at 05:04:32PM -0600, Eric Sandeen wrote:
>> At least on my x86_64 RHEL5 box, if gdbm-devel is installed, then the
>> xfstests build fails with:
>
> Still doesn't build even with libgdbm-dev installed on debian, despite
> having a /usr/include/gdbm.h. Even when manually including that one it
> doesn't define DBM. Which of the three headers does actually get used
> on RHEL?
>
hm, looks like:
checking gdbm/ndbm.h usability... yes
checking gdbm/ndbm.h presence... yes
checking for gdbm/ndbm.h... yes
and include/config.h winds up as:
/* Define to 1 if you have the <gdbm/ndbm.h> header file. */
#define HAVE_GDBM_NDBM_H 1
...
/* Define to 1 if you have the <ndbm.h> header file. */
/* #undef HAVE_NDBM_H */
and:
[root@host xfstests]# locate gdbm/ndbm.h
/usr/include/gdbm/ndbm.h
[root@host xfstests]# rpm -qf /usr/include/gdbm/ndbm.h
gdbm-devel-1.8.0-26.2.1
[root@bear-05 xfstests]#
-Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-12 16:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-03 23:04 [PATCH] xfstests: fix dbtest build Eric Sandeen
2008-11-12 10:04 ` Christoph Hellwig
2008-11-12 15:55 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox