Closed casperes1996 closed 4 years ago
From the APFS spec (2019-02-07, p. 68):
j_inode_val_t
[...]
bsd_flags
The inodeʼs BSD flags.
uint32_t bsd_flags;
For information about these flags, see thechflags(2)
man page and the<sys/stat.h>
header file.
On my system, the constant SF_DATALESS
is defined in <sys/stat.h>
as 0x40000000
. The library path <sys/stat.h>
resolves to /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/stat.h
, a file provided by Xcode Command Line Tools. I do not have the full Xcode app installed.
find "$(xcode-select -p)" -name 'stat.h'
shows that the following header files are provided by my Xcode installation:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/stat.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/stat.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/stat.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/stat.h
If you are running macOS 10.14 (Mojave) or 10.15 (Catalina) and have Xcode Command Line Tools installed (via xcode-select --install
), your setup ought to be similar. It is curious that compilation does not complain about the other constants used in flag_constants[]
in src/apfs/string/j.h
, since these are all defined in <sys/stat.h>
.
In order to diagnose further, please add a comment with the output of the following commands:
type gcc
gcc --version
xcode-select -p
find "$(xcode-select -p)" -name 'stat.h'
I have now checked my copy of /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/stat.h
, and it appears that all the necessary constants are defined there except for SF_DATALESS
, causing compilation failure on Mojave, but not on Catalina.
Please add the line #define SF_DATALESS 0x40000000
to src/string/j.h
immediately after line 12 (#include <sys/stat.h>
) and let me know if this resolves the issue.
Bingo. Issue resolved.
Cheers
On 24 Nov 2019, at 17.44, Jivan Pal notifications@github.com wrote:
I have now checked my copy of /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/stat.h, and it appears that all the necessary constants are defined there except for SF_DATALESS, causing compilation failure on Mojave.
Please add the line #define SF_DATALESS 0x40000000 to src/string/j.h and let me know if this resolves the issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jivanpal/apfs-tools/issues/1?email_source=notifications&email_token=AHMUPV44Q7OUDIX3TZYETF3QVKVQDA5CNFSM4JQ7Y6VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFAPQ5Q#issuecomment-557906038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHMUPVZURYJKC3GDPE7BAFLQVKVQDANCNFSM4JQ7Y6VA.
Fixed upstream 🙂
Compiler: GCC 9.2.0_2 (homebrew.)
When compiling apfs-inspect gcc throws the following error:
In file included from src/apfs/func/btree.h:16,
Don't really know what else to add here.