* xfstests configure error with xfsprogs v4.5-rc1
@ 2016-02-22 3:03 ` Eryu Guan
0 siblings, 0 replies; 10+ messages in thread
From: Eryu Guan @ 2016-02-22 3:03 UTC (permalink / raw)
To: xfs; +Cc: fstests
Hi,
After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
because of configure error:
checking xfs/xfs.h usability... no
checking xfs/xfs.h presence... yes
configure: WARNING: xfs/xfs.h: present but cannot be compiled
configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
configure: WARNING: xfs/xfs.h: see the Autoconf documentation
configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
checking for xfs/xfs.h... no
FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
Run "make install-qa" from the xfsprogs source.
and config.log showed:
configure:4543: checking xfs/xfs.h usability
configure:4543: ccache gcc -c -g -O2 conftest.c >&5
In file included from /usr/include/xfs/xfs.h:37:0,
from conftest.c:73:
/usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
typedef off64_t xfs_off_t;
^
configure:4543: $? = 1
It's the change made by commit cb898f157f84 ("linux.h: Use off64_t
instead of loff_t") introduced this error. If I do the following
modifications xfstests compiles without errors:
diff --git a/include/linux.h b/include/linux.h
index cc0f70c..d66436c 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -142,7 +142,7 @@ platform_discard_blocks(int fd, uint64_t start, uint64_t len)
#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
#define EFSBADCRC EBADMSG /* Bad CRC detected */
-typedef off64_t xfs_off_t;
+typedef __off64_t xfs_off_t;
typedef __uint64_t xfs_ino_t;
typedef __uint32_t xfs_dev_t;
typedef __int64_t xfs_daddr_t;
But I'm not sure if it's a proper fix.
Thanks,
Eryu
^ permalink raw reply related [flat|nested] 10+ messages in thread
* xfstests configure error with xfsprogs v4.5-rc1
@ 2016-02-22 3:03 ` Eryu Guan
0 siblings, 0 replies; 10+ messages in thread
From: Eryu Guan @ 2016-02-22 3:03 UTC (permalink / raw)
To: xfs; +Cc: fstests
Hi,
After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
because of configure error:
checking xfs/xfs.h usability... no
checking xfs/xfs.h presence... yes
configure: WARNING: xfs/xfs.h: present but cannot be compiled
configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
configure: WARNING: xfs/xfs.h: see the Autoconf documentation
configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
checking for xfs/xfs.h... no
FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
Run "make install-qa" from the xfsprogs source.
and config.log showed:
configure:4543: checking xfs/xfs.h usability
configure:4543: ccache gcc -c -g -O2 conftest.c >&5
In file included from /usr/include/xfs/xfs.h:37:0,
from conftest.c:73:
/usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
typedef off64_t xfs_off_t;
^
configure:4543: $? = 1
It's the change made by commit cb898f157f84 ("linux.h: Use off64_t
instead of loff_t") introduced this error. If I do the following
modifications xfstests compiles without errors:
diff --git a/include/linux.h b/include/linux.h
index cc0f70c..d66436c 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -142,7 +142,7 @@ platform_discard_blocks(int fd, uint64_t start, uint64_t len)
#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
#define EFSBADCRC EBADMSG /* Bad CRC detected */
-typedef off64_t xfs_off_t;
+typedef __off64_t xfs_off_t;
typedef __uint64_t xfs_ino_t;
typedef __uint32_t xfs_dev_t;
typedef __int64_t xfs_daddr_t;
But I'm not sure if it's a proper fix.
Thanks,
Eryu
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
2016-02-22 3:03 ` Eryu Guan
@ 2016-02-22 3:24 ` Dave Chinner
-1 siblings, 0 replies; 10+ messages in thread
From: Dave Chinner @ 2016-02-22 3:24 UTC (permalink / raw)
To: Eryu Guan; +Cc: xfs, fstests
On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> Hi,
>
> After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> because of configure error:
>
> checking xfs/xfs.h usability... no
> checking xfs/xfs.h presence... yes
> configure: WARNING: xfs/xfs.h: present but cannot be compiled
> configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> checking for xfs/xfs.h... no
>
> FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> Run "make install-qa" from the xfsprogs source.
>
> and config.log showed:
>
> configure:4543: checking xfs/xfs.h usability
> configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> In file included from /usr/include/xfs/xfs.h:37:0,
> from conftest.c:73:
> /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> typedef off64_t xfs_off_t;
> ^
> configure:4543: $? = 1
That would seem like a system library problem in that it doesn't
define off64_t through stdio.h. What distro are you compiling on?
Also, if you set _GNU_SOURCE, does it then compile? e.g. see
m4/package_libcdev.m4 for how to test whether code compiles under
certain defines.
If it does compile with _GNU_SOURCE being set, then all that needs
to be is to update the autoconf rule.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
@ 2016-02-22 3:24 ` Dave Chinner
0 siblings, 0 replies; 10+ messages in thread
From: Dave Chinner @ 2016-02-22 3:24 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests, xfs
On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> Hi,
>
> After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> because of configure error:
>
> checking xfs/xfs.h usability... no
> checking xfs/xfs.h presence... yes
> configure: WARNING: xfs/xfs.h: present but cannot be compiled
> configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> checking for xfs/xfs.h... no
>
> FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> Run "make install-qa" from the xfsprogs source.
>
> and config.log showed:
>
> configure:4543: checking xfs/xfs.h usability
> configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> In file included from /usr/include/xfs/xfs.h:37:0,
> from conftest.c:73:
> /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> typedef off64_t xfs_off_t;
> ^
> configure:4543: $? = 1
That would seem like a system library problem in that it doesn't
define off64_t through stdio.h. What distro are you compiling on?
Also, if you set _GNU_SOURCE, does it then compile? e.g. see
m4/package_libcdev.m4 for how to test whether code compiles under
certain defines.
If it does compile with _GNU_SOURCE being set, then all that needs
to be is to update the autoconf rule.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
2016-02-22 3:24 ` Dave Chinner
@ 2016-02-22 8:00 ` Eryu Guan
-1 siblings, 0 replies; 10+ messages in thread
From: Eryu Guan @ 2016-02-22 8:00 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs, fstests
On Mon, Feb 22, 2016 at 02:24:50PM +1100, Dave Chinner wrote:
> On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> > Hi,
> >
> > After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> > because of configure error:
> >
> > checking xfs/xfs.h usability... no
> > checking xfs/xfs.h presence... yes
> > configure: WARNING: xfs/xfs.h: present but cannot be compiled
> > configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> > configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> > configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> > configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> > checking for xfs/xfs.h... no
> >
> > FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> > Run "make install-qa" from the xfsprogs source.
> >
> > and config.log showed:
> >
> > configure:4543: checking xfs/xfs.h usability
> > configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> > In file included from /usr/include/xfs/xfs.h:37:0,
> > from conftest.c:73:
> > /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> > typedef off64_t xfs_off_t;
> > ^
> > configure:4543: $? = 1
>
> That would seem like a system library problem in that it doesn't
> define off64_t through stdio.h. What distro are you compiling on?
It's a RHEL7.2 box.
> Also, if you set _GNU_SOURCE, does it then compile? e.g. see
> m4/package_libcdev.m4 for how to test whether code compiles under
> certain defines.
Okay, I'll go through the m4 files and test around.
Thanks,
Eryu
>
> If it does compile with _GNU_SOURCE being set, then all that needs
> to be is to update the autoconf rule.
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
@ 2016-02-22 8:00 ` Eryu Guan
0 siblings, 0 replies; 10+ messages in thread
From: Eryu Guan @ 2016-02-22 8:00 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, xfs
On Mon, Feb 22, 2016 at 02:24:50PM +1100, Dave Chinner wrote:
> On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> > Hi,
> >
> > After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> > because of configure error:
> >
> > checking xfs/xfs.h usability... no
> > checking xfs/xfs.h presence... yes
> > configure: WARNING: xfs/xfs.h: present but cannot be compiled
> > configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> > configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> > configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> > configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> > checking for xfs/xfs.h... no
> >
> > FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> > Run "make install-qa" from the xfsprogs source.
> >
> > and config.log showed:
> >
> > configure:4543: checking xfs/xfs.h usability
> > configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> > In file included from /usr/include/xfs/xfs.h:37:0,
> > from conftest.c:73:
> > /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> > typedef off64_t xfs_off_t;
> > ^
> > configure:4543: $? = 1
>
> That would seem like a system library problem in that it doesn't
> define off64_t through stdio.h. What distro are you compiling on?
It's a RHEL7.2 box.
> Also, if you set _GNU_SOURCE, does it then compile? e.g. see
> m4/package_libcdev.m4 for how to test whether code compiles under
> certain defines.
Okay, I'll go through the m4 files and test around.
Thanks,
Eryu
>
> If it does compile with _GNU_SOURCE being set, then all that needs
> to be is to update the autoconf rule.
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
2016-02-22 3:24 ` Dave Chinner
@ 2016-02-22 10:16 ` Eryu Guan
-1 siblings, 0 replies; 10+ messages in thread
From: Eryu Guan @ 2016-02-22 10:16 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, xfs
[-- Attachment #1: Type: text/plain, Size: 2102 bytes --]
On Mon, Feb 22, 2016 at 02:24:50PM +1100, Dave Chinner wrote:
> On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> > Hi,
> >
> > After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> > because of configure error:
> >
> > checking xfs/xfs.h usability... no
> > checking xfs/xfs.h presence... yes
> > configure: WARNING: xfs/xfs.h: present but cannot be compiled
> > configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> > configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> > configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> > configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> > checking for xfs/xfs.h... no
> >
> > FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> > Run "make install-qa" from the xfsprogs source.
> >
> > and config.log showed:
> >
> > configure:4543: checking xfs/xfs.h usability
> > configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> > In file included from /usr/include/xfs/xfs.h:37:0,
> > from conftest.c:73:
> > /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> > typedef off64_t xfs_off_t;
> > ^
> > configure:4543: $? = 1
>
> That would seem like a system library problem in that it doesn't
> define off64_t through stdio.h. What distro are you compiling on?
> Also, if you set _GNU_SOURCE, does it then compile? e.g. see
> m4/package_libcdev.m4 for how to test whether code compiles under
> certain defines.
>
> If it does compile with _GNU_SOURCE being set, then all that needs
> to be is to update the autoconf rule.
Yes, it compiles with _GNU_SOURCE being set. And it turns out that not
only the check for xfs.h needs _GNU_SOURCE, many other checks need it
too, like libxfs.h, xfs_log_format.h, xlog_assign_lsn, xqm.h and xfsctl.
Attached file is updates I made to autoconf rules, as I'm not familiar
with autotools, I'm not sure if it's a proper fix, but it does work for
me, with both old and new version of xfsprogs.
Thanks,
Eryu
[-- Attachment #2: off64_t.patch --]
[-- Type: text/plain, Size: 2206 bytes --]
diff --git a/configure.ac b/configure.ac
index d038f95..fa48d2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,9 @@ AC_HEADER_STDC
cifs/ioctl.h \
])
-AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[#include <xfs/libxfs.h>])
+AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
+#define _GNU_SOURCE
+#include <xfs/libxfs.h>])
AC_PACKAGE_NEED_UUIDCOMPARE
diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4
index 78a3dc4..aeb3d7c 100644
--- a/m4/package_xfslibs.m4
+++ b/m4/package_xfslibs.m4
@@ -1,5 +1,5 @@
AC_DEFUN([AC_PACKAGE_NEED_XFS_XFS_H],
- [ AC_CHECK_HEADERS([xfs/xfs.h])
+ [ AC_CHECK_HEADERS([xfs/xfs.h],,,[#define _GNU_SOURCE])
if test "$ac_cv_header_xfs_xfs_h" != "yes"; then
echo
echo 'FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.'
@@ -9,19 +9,21 @@ AC_DEFUN([AC_PACKAGE_NEED_XFS_XFS_H],
])
AC_DEFUN([AC_PACKAGE_WANT_LIBXFS_H],
- [ AC_CHECK_HEADERS([xfs/libxfs.h], [ have_libxfs=true ], [ have_libxfs=false ])
+ [ AC_CHECK_HEADERS([xfs/libxfs.h], [ have_libxfs=true ],
+ [ have_libxfs=false ], [#define _GNU_SOURCE])
AC_SUBST(have_libxfs)
])
AC_DEFUN([AC_PACKAGE_WANT_XLOG_ASSIGN_LSN],
[ AC_CHECK_DECL(xlog_assign_lsn,
- [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ],
- [[#include <xfs/libxfs.h>]])
+ [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ], [[
+#define _GNU_SOURCE
+#include <xfs/libxfs.h>]])
AC_SUBST(have_xlog_assign_lsn)
])
AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
- [ AC_CHECK_HEADERS([xfs/xqm.h])
+ [ AC_CHECK_HEADERS([xfs/xqm.h],,,[#define _GNU_SOURCE])
if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
echo
echo 'FATAL ERROR: cannot find a valid <xfs/xqm.h> header file.'
@@ -99,7 +101,10 @@ AC_DEFUN([AC_PACKAGE_NEED_IRIX_LIBHANDLE],
AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
[ AC_MSG_CHECKING([xfsctl from xfs/xfs.h])
- AC_TRY_LINK([#include <xfs/xfs.h>], [ int x = xfsctl(0, 0, 0, 0); ],
+ AC_TRY_LINK([
+#define _GNU_SOURCE
+#include <xfs/xfs.h> ],
+ [ int x = xfsctl(0, 0, 0, 0); ],
[ echo ok ],
[ echo
echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
@ 2016-02-22 10:16 ` Eryu Guan
0 siblings, 0 replies; 10+ messages in thread
From: Eryu Guan @ 2016-02-22 10:16 UTC (permalink / raw)
To: Dave Chinner; +Cc: fstests, xfs
[-- Attachment #1: Type: text/plain, Size: 2102 bytes --]
On Mon, Feb 22, 2016 at 02:24:50PM +1100, Dave Chinner wrote:
> On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> > Hi,
> >
> > After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> > because of configure error:
> >
> > checking xfs/xfs.h usability... no
> > checking xfs/xfs.h presence... yes
> > configure: WARNING: xfs/xfs.h: present but cannot be compiled
> > configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> > configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> > configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> > configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> > checking for xfs/xfs.h... no
> >
> > FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> > Run "make install-qa" from the xfsprogs source.
> >
> > and config.log showed:
> >
> > configure:4543: checking xfs/xfs.h usability
> > configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> > In file included from /usr/include/xfs/xfs.h:37:0,
> > from conftest.c:73:
> > /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> > typedef off64_t xfs_off_t;
> > ^
> > configure:4543: $? = 1
>
> That would seem like a system library problem in that it doesn't
> define off64_t through stdio.h. What distro are you compiling on?
> Also, if you set _GNU_SOURCE, does it then compile? e.g. see
> m4/package_libcdev.m4 for how to test whether code compiles under
> certain defines.
>
> If it does compile with _GNU_SOURCE being set, then all that needs
> to be is to update the autoconf rule.
Yes, it compiles with _GNU_SOURCE being set. And it turns out that not
only the check for xfs.h needs _GNU_SOURCE, many other checks need it
too, like libxfs.h, xfs_log_format.h, xlog_assign_lsn, xqm.h and xfsctl.
Attached file is updates I made to autoconf rules, as I'm not familiar
with autotools, I'm not sure if it's a proper fix, but it does work for
me, with both old and new version of xfsprogs.
Thanks,
Eryu
[-- Attachment #2: off64_t.patch --]
[-- Type: text/plain, Size: 2206 bytes --]
diff --git a/configure.ac b/configure.ac
index d038f95..fa48d2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,9 @@ AC_HEADER_STDC
cifs/ioctl.h \
])
-AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[#include <xfs/libxfs.h>])
+AC_CHECK_HEADERS([xfs/xfs_log_format.h],,,[
+#define _GNU_SOURCE
+#include <xfs/libxfs.h>])
AC_PACKAGE_NEED_UUIDCOMPARE
diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4
index 78a3dc4..aeb3d7c 100644
--- a/m4/package_xfslibs.m4
+++ b/m4/package_xfslibs.m4
@@ -1,5 +1,5 @@
AC_DEFUN([AC_PACKAGE_NEED_XFS_XFS_H],
- [ AC_CHECK_HEADERS([xfs/xfs.h])
+ [ AC_CHECK_HEADERS([xfs/xfs.h],,,[#define _GNU_SOURCE])
if test "$ac_cv_header_xfs_xfs_h" != "yes"; then
echo
echo 'FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.'
@@ -9,19 +9,21 @@ AC_DEFUN([AC_PACKAGE_NEED_XFS_XFS_H],
])
AC_DEFUN([AC_PACKAGE_WANT_LIBXFS_H],
- [ AC_CHECK_HEADERS([xfs/libxfs.h], [ have_libxfs=true ], [ have_libxfs=false ])
+ [ AC_CHECK_HEADERS([xfs/libxfs.h], [ have_libxfs=true ],
+ [ have_libxfs=false ], [#define _GNU_SOURCE])
AC_SUBST(have_libxfs)
])
AC_DEFUN([AC_PACKAGE_WANT_XLOG_ASSIGN_LSN],
[ AC_CHECK_DECL(xlog_assign_lsn,
- [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ],
- [[#include <xfs/libxfs.h>]])
+ [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ], [[
+#define _GNU_SOURCE
+#include <xfs/libxfs.h>]])
AC_SUBST(have_xlog_assign_lsn)
])
AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
- [ AC_CHECK_HEADERS([xfs/xqm.h])
+ [ AC_CHECK_HEADERS([xfs/xqm.h],,,[#define _GNU_SOURCE])
if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
echo
echo 'FATAL ERROR: cannot find a valid <xfs/xqm.h> header file.'
@@ -99,7 +101,10 @@ AC_DEFUN([AC_PACKAGE_NEED_IRIX_LIBHANDLE],
AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
[ AC_MSG_CHECKING([xfsctl from xfs/xfs.h])
- AC_TRY_LINK([#include <xfs/xfs.h>], [ int x = xfsctl(0, 0, 0, 0); ],
+ AC_TRY_LINK([
+#define _GNU_SOURCE
+#include <xfs/xfs.h> ],
+ [ int x = xfsctl(0, 0, 0, 0); ],
[ echo ok ],
[ echo
echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
[-- Attachment #3: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
2016-02-22 10:16 ` Eryu Guan
@ 2016-02-22 21:58 ` Dave Chinner
-1 siblings, 0 replies; 10+ messages in thread
From: Dave Chinner @ 2016-02-22 21:58 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests, xfs
On Mon, Feb 22, 2016 at 06:16:48PM +0800, Eryu Guan wrote:
> On Mon, Feb 22, 2016 at 02:24:50PM +1100, Dave Chinner wrote:
> > On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> > > Hi,
> > >
> > > After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> > > because of configure error:
> > >
> > > checking xfs/xfs.h usability... no
> > > checking xfs/xfs.h presence... yes
> > > configure: WARNING: xfs/xfs.h: present but cannot be compiled
> > > configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> > > configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> > > configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> > > configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> > > checking for xfs/xfs.h... no
> > >
> > > FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> > > Run "make install-qa" from the xfsprogs source.
> > >
> > > and config.log showed:
> > >
> > > configure:4543: checking xfs/xfs.h usability
> > > configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> > > In file included from /usr/include/xfs/xfs.h:37:0,
> > > from conftest.c:73:
> > > /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> > > typedef off64_t xfs_off_t;
> > > ^
> > > configure:4543: $? = 1
> >
> > That would seem like a system library problem in that it doesn't
> > define off64_t through stdio.h. What distro are you compiling on?
> > Also, if you set _GNU_SOURCE, does it then compile? e.g. see
> > m4/package_libcdev.m4 for how to test whether code compiles under
> > certain defines.
> >
> > If it does compile with _GNU_SOURCE being set, then all that needs
> > to be is to update the autoconf rule.
>
> Yes, it compiles with _GNU_SOURCE being set. And it turns out that not
> only the check for xfs.h needs _GNU_SOURCE, many other checks need it
> too, like libxfs.h, xfs_log_format.h, xlog_assign_lsn, xqm.h and xfsctl.
>
> Attached file is updates I made to autoconf rules, as I'm not familiar
> with autotools, I'm not sure if it's a proper fix, but it does work for
> me, with both old and new version of xfsprogs.
Yup, works here too, and is cleaner than the hack I did late
yesterday afternoon. Thanks, Eryu!
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: xfstests configure error with xfsprogs v4.5-rc1
@ 2016-02-22 21:58 ` Dave Chinner
0 siblings, 0 replies; 10+ messages in thread
From: Dave Chinner @ 2016-02-22 21:58 UTC (permalink / raw)
To: Eryu Guan; +Cc: fstests, xfs
On Mon, Feb 22, 2016 at 06:16:48PM +0800, Eryu Guan wrote:
> On Mon, Feb 22, 2016 at 02:24:50PM +1100, Dave Chinner wrote:
> > On Mon, Feb 22, 2016 at 11:03:04AM +0800, Eryu Guan wrote:
> > > Hi,
> > >
> > > After upgrading to xfsprogs v4.5-rc1 version, xfstests failed to built
> > > because of configure error:
> > >
> > > checking xfs/xfs.h usability... no
> > > checking xfs/xfs.h presence... yes
> > > configure: WARNING: xfs/xfs.h: present but cannot be compiled
> > > configure: WARNING: xfs/xfs.h: check for missing prerequisite headers?
> > > configure: WARNING: xfs/xfs.h: see the Autoconf documentation
> > > configure: WARNING: xfs/xfs.h: section "Present But Cannot Be Compiled"
> > > configure: WARNING: xfs/xfs.h: proceeding with the compiler's result
> > > checking for xfs/xfs.h... no
> > >
> > > FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.
> > > Run "make install-qa" from the xfsprogs source.
> > >
> > > and config.log showed:
> > >
> > > configure:4543: checking xfs/xfs.h usability
> > > configure:4543: ccache gcc -c -g -O2 conftest.c >&5
> > > In file included from /usr/include/xfs/xfs.h:37:0,
> > > from conftest.c:73:
> > > /usr/include/xfs/linux.h:145:1: error: unknown type name 'off64_t'
> > > typedef off64_t xfs_off_t;
> > > ^
> > > configure:4543: $? = 1
> >
> > That would seem like a system library problem in that it doesn't
> > define off64_t through stdio.h. What distro are you compiling on?
> > Also, if you set _GNU_SOURCE, does it then compile? e.g. see
> > m4/package_libcdev.m4 for how to test whether code compiles under
> > certain defines.
> >
> > If it does compile with _GNU_SOURCE being set, then all that needs
> > to be is to update the autoconf rule.
>
> Yes, it compiles with _GNU_SOURCE being set. And it turns out that not
> only the check for xfs.h needs _GNU_SOURCE, many other checks need it
> too, like libxfs.h, xfs_log_format.h, xlog_assign_lsn, xqm.h and xfsctl.
>
> Attached file is updates I made to autoconf rules, as I'm not familiar
> with autotools, I'm not sure if it's a proper fix, but it does work for
> me, with both old and new version of xfsprogs.
Yup, works here too, and is cleaner than the hack I did late
yesterday afternoon. Thanks, Eryu!
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-02-22 21:58 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 3:03 xfstests configure error with xfsprogs v4.5-rc1 Eryu Guan
2016-02-22 3:03 ` Eryu Guan
2016-02-22 3:24 ` Dave Chinner
2016-02-22 3:24 ` Dave Chinner
2016-02-22 8:00 ` Eryu Guan
2016-02-22 8:00 ` Eryu Guan
2016-02-22 10:16 ` Eryu Guan
2016-02-22 10:16 ` Eryu Guan
2016-02-22 21:58 ` Dave Chinner
2016-02-22 21:58 ` Dave Chinner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.