Bug 1319804 - Trivial programs that include <xfs.h> fail to compile
Summary: Trivial programs that include <xfs.h> fail to compile
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: xfsprogs
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-21 14:53 UTC by Richard W.M. Jones
Modified: 2017-03-24 20:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-24 20:12:03 UTC
Type: Bug


Attachments (Terms of Use)

Description Richard W.M. Jones 2016-03-21 14:53:13 UTC
Description of problem:

In file included from /usr/include/xfs/xfs.h:37:0,
                 from conftest.c:86:
/usr/include/xfs/linux.h:145:9: error: unknown type name 'off64_t'
 typedef off64_t  xfs_off_t;
         ^~~~~~~

This can be worked around by using -D_GNU_SOURCE, but that
should not be necessary.

Version-Release number of selected component (if applicable):

xfsprogs-devel-4.5.0-1.fc25.x86_64
(Also affects upstream xfsprogs from git)

How reproducible:

100%

Steps to Reproduce:
1. Include <xfs.h> in any program.

Additional info:

Discussed upstream with no resolution:
https://www.spinics.net/lists/fstests/index.html#02640

This breaks Ceph in Rawhide.

Comment 1 Alexandre Oliva 2016-03-25 02:59:54 UTC
FWIW, this breaks ceph builds in f23 too.

Comment 2 Eric Sandeen 2016-03-29 00:19:43 UTC
cb898f1 linux.h: Use off64_t instead of loff_t

seems to have undone:

f96aff0 xfsprogs: stop using off64_t in platform headers

Comment 3 Eric Sandeen 2016-05-19 17:46:59 UTC
Sorry, this one kind of fell off my radar.

Should we just #define _LARGEFILE64_SOURCE ?

The original reason for the change back to off64_t was:

commit cb898f157f8410a03cf5f3400baa1df9e5eecd33
Author: Felix Janda <felix.janda>
Date:   Fri Feb 5 08:34:06 2016 +1100

    linux.h: Use off64_t instead of loff_t
    
    These are equivalent on glibc, while musl does not know loff_t.
    
    In the long run, it would be preferable to enable transparent LFS so
    that off64_t could be replaced by off_t.
    
    Signed-off-by: Felix Janda <felix.janda>
    Reviewed-by: Christoph Hellwig <hch>
    Signed-off-by: Dave Chinner <david>

So I'm not really quite sure where to go with this one.

Comment 4 Jan Kurik 2016-07-26 04:16:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 5 Eric Sandeen 2016-09-08 17:00:57 UTC
I'm probably going to just revert the type change for now, this seems remarkably complicated to fix in general for all architectures and libc variants.

It may end up that we require a 64-bit LFS compile when including xfs.h in the long run, though.

Comment 6 Eric Sandeen 2017-03-24 20:12:03 UTC
AFAIK this should all be fine now - sorry it took a while.  If not, please re-open...


Note You need to log in before you can comment on or make changes to this bug.