RJVB / afsctool

This is a version of "brkirch"'s afsctool utility that allows end-users to leverage HFS+ compression.
https://brkirch.wordpress.com/afsctool
GNU General Public License v3.0
187 stars 18 forks source link

decmpfs.h ? #21

Closed gingerbeardman closed 5 years ago

gingerbeardman commented 5 years ago

error

-- LZVN_HEADER,LIB: LZVN_HEADER-NOTFOUND LZVN_LIBRARY-NOTFOUND
-- LZVN support is disabled

code

check_include_file("sys/decmpfs.h" HAS_DECMPFS)
find_file(LZVN_HEADER "FastCompression.h")
find_library(LZVN_LIBRARY "FastCompression")

Are these files not included in the repo for specific reasons?

gingerbeardman commented 5 years ago

So I figured out that (your fork of) LZVN is required

gingerbeardman commented 5 years ago

sys/decmpfs.h still missing

i grabbed the file from https://github.com/apple/darwin-xnu/blob/master/bsd/sys/decmpfs.h

and put it at afsctool/sys/decmpfs.h

doesn't seem right, will look into it more

RJVB commented 5 years ago

So (your fork of) LZVN is required

Yes... I'll get back to this one of these days (and see if indeed I made a PR to merge my changes upstream as I meant to).

RJVB commented 5 years ago

sys/decmpfs.h still missing

i grabbed the file from https://github.com/apple/darwin-xnu/blob/master/bsd/sys/decmpfs.h

and put it at afsctool/sys/decmpfs.h

That's weird, because cmake should test for the existence of <sys/decmpfs> on the include path, and the code should use the copy in afsctool/private if the file hasn't been found. That works for my on 10.9 where there is no such system header file.

Can you reproduce the include failure with a fresh build (and without the copy in afsctool/sys that you created yourself)? If so, where does cmake find the file where it isn't found by the compiler afterwards?!

gingerbeardman commented 5 years ago

Fresh clone gives me this, problem still present

$ cmake .
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'zlib'
--   Found zlib, version 1.2.11
-- Found ZLIBP: /usr/include (found suitable version "1.2.11", minimum required is "1.2.8") 
-- Checking for module 'libsparsehash'
--   Found libsparsehash, version 2.0.2
-- Found SPARSEHASH: /usr/local/Cellar/google-sparsehash/2.0.3/include (found version "2.0.2") 
-- Looking for sys/decmpfs.h
-- Looking for sys/decmpfs.h - not found
-- LZVN_HEADER,LIB: /usr/local/include/FastCompression.h /usr/local/lib/libFastCompression.dylib
-- Enabling LZVN support
-- Setting afsctool version to: 1.6.9. (1.6.8.6-37-g2365420)
-- The following OPTIONAL packages have been found:

 * Git

-- The following REQUIRED packages have been found:

 * ZLIBP (required version >= 1.2.8), zlib compression library, <http://www.zlib.net/>
 * SPARSEHASH, An extremely memory-efficient hash_map implementation, <https://github.com/sparsehash/sparsehash>

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/matt/Projects/afsctool
RJVB commented 5 years ago

Fresh clone gives me this problem ... -- Configuring done -- Generating done -- Build files have been written to: /Users/matt/Projects/afsctool

What problem? Cmake completes successfully here. This is interesting though:

-- Looking for sys/decmpfs.h
-- Looking for sys/decmpfs.h - not found

Do you have a file /usr/include/sys/decmpfs.h ?

gingerbeardman commented 5 years ago

Yes, that was the problem I was referring to.

I do not have it, should I?

$ ls /usr/include/sys/decmpfs.h
ls: /usr/include/sys/decmpfs.h: No such file or directory
RJVB commented 5 years ago

What Mac OS version do you run again? It's my understanding that the file should be there on recent versions, but it may be in a different location. What does either of the following print?

> mdfind -name decmpfs.h
> find /usr/include -name decmpfs.h
gingerbeardman commented 5 years ago

I am on 10.13.6 High Sierra

$ mdfind -name decmpfs.h
/Users/matt/Projects/afsctool/private/decmpfs.h
matt@Matts-MacBook-Pro:~$ find /usr/include -name decmpfs.h
(nothing)
RJVB commented 5 years ago

OK, I misunderstood something. Apparently decmpfs.h is a private system header that's not installed on normal user systems. That means I'll be able to drop the check and HAS_DECMPFS token. Thanks.