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

Cannot build #64

Closed Colerar closed 1 year ago

Colerar commented 1 year ago

System: macOS Ventura 13.4 (22F66) CPU: x86_64 Intel Branch: master Commit: https://github.com/RJVB/afsctool/commit/8b89d8f20e8dbb3efddbbca1f9f7852318727d87

❯ git branch
* master
❯ git rev-parse HEAD
8b89d8f20e8dbb3efddbbca1f9f7852318727d87
❯ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
Homebrew Clang v16.0.5 Build Log ``` ~/Developer/afsctool/build master* ❯ cmake -Wno-dev .. -- The C compiler identification is Clang 16.0.5 -- The CXX compiler identification is Clang 16.0.5 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/local/opt/ccache/libexec/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/local/opt/ccache/libexec/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- sizeof(void*)=8 -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") -- Checking for module 'zlib' -- Found zlib, version 1.2.11 -- Found ZLIBP: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/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.4/include (found version "2.0.2") -- Enabling LZVN and (possibly) LZFSE support -- Performing Test CFLAG_Wall -- Performing Test CFLAG_Wall - Success -- Performing Test CFLAG_Wno_unknown_pragmas -- Performing Test CFLAG_Wno_unknown_pragmas - Success -- Performing Test CFLAG_Wno_unused_variable -- Performing Test CFLAG_Wno_unused_variable - Success -- Setting afsctool version to: 1.7.3. (v1.7.3-5-g8b89d8f) -- The following OPTIONAL packages have been found: * Git -- The following REQUIRED packages have been found: * ZLIBP (required version >= 1.2.8), zlib compression library, * SPARSEHASH, An extremely memory-efficient hash_map implementation, -- Configuring done (5.2s) -- Generating done (0.1s) -- Build files have been written to: /Users/col/Developer/afsctool/build ~/Developer/afsctool/build master* 5s ❯ make [ 4%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:537: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__algorithm/max.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__algorithm/comp_ref_type.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__debug:16: /usr/local/opt/llvm/bin/../include/c++/v1/cstddef:46:5: error: tried including but didn't find libc++'s header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case. # error tried including but didn't find libc++'s header. \ ^ /usr/local/opt/llvm/bin/../include/c++/v1/cstddef:59:9: error: no member named 'nullptr_t' in the global namespace using ::nullptr_t; ~~^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:537: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__algorithm/max.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__algorithm/max_element.h:15: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__iterator/iterator_traits.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__concepts/constructible.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__concepts/destructible.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__type_traits/is_nothrow_destructible.h:16: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__type_traits/is_scalar.h:17: /usr/local/opt/llvm/bin/../include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'? template <> struct __is_nullptr_t_impl : public true_type {}; ^ /usr/local/opt/llvm/bin/../include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: template argument for template type parameter must be a type template <> struct __is_nullptr_t_impl : public true_type {}; ^~~~~~~~~ /usr/local/opt/llvm/bin/../include/c++/v1/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here template struct __is_nullptr_t_impl : public false_type {}; ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:545: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__functional/hash.h:27: /usr/local/opt/llvm/bin/../include/c++/v1/cstdint:149:5: error: tried including but didn't find libc++'s header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case. # error tried including but didn't find libc++'s header. \ ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:545: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__functional/hash.h:28: /usr/local/opt/llvm/bin/../include/c++/v1/cstring:66:5: error: tried including but didn't find libc++'s header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case. # error tried including but didn't find libc++'s header. \ ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:551: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__iterator/reverse_iterator.h:18: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__iterator/advance.h:26: /usr/local/opt/llvm/bin/../include/c++/v1/cstdlib:90:5: error: tried including but didn't find libc++'s header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case. # error tried including but didn't find libc++'s header. \ ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:553: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory/allocate_at_least.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory/allocator_traits.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory/construct_at.h:23: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/new:97: /usr/local/opt/llvm/bin/../include/c++/v1/exception:199:45: error: field has incomplete type 'exception_ptr' _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} ^ /usr/local/opt/llvm/bin/../include/c++/v1/exception:194:24: note: definition of 'std::exception_ptr' is not complete until the closing '}' class _LIBCPP_TYPE_VIS exception_ptr ^ /usr/local/opt/llvm/bin/../include/c++/v1/exception:199:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} ^ /usr/local/opt/llvm/bin/../include/c++/v1/__config:659:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY' # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI ^ /usr/local/opt/llvm/bin/../include/c++/v1/__config:638:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI' __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER)))) ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:553: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory/allocate_at_least.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory/allocator_traits.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory/construct_at.h:23: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/new:97: /usr/local/opt/llvm/bin/../include/c++/v1/exception:199:55: error: expected ';' at end of declaration list _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:560: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h:20: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/tuple:259: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/compare:145: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/partial_order.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/weak_order.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/strong_order.h:20: /usr/local/opt/llvm/bin/../include/c++/v1/cmath:320:5: error: tried including but didn't find libc++'s header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case. # error tried including but didn't find libc++'s header. \ ^ /usr/local/opt/llvm/bin/../include/c++/v1/cmath:587:17: error: expected unqualified-id return std::isnan(__lcpp_x); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan' ( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x)) \ ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:560: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h:20: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/tuple:259: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/compare:145: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/partial_order.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/weak_order.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/strong_order.h:20: /usr/local/opt/llvm/bin/../include/c++/v1/cmath:585:1: error: no return statement in constexpr function __constexpr_isnan(_A1 __lcpp_x) _NOEXCEPT ^ /usr/local/opt/llvm/bin/../include/c++/v1/cmath:607:17: error: expected unqualified-id return std::isinf(__lcpp_x); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/math.h:160:5: note: expanded from macro 'isinf' ( sizeof(x) == sizeof(float) ? __inline_isinff((float)(x)) \ ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:560: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__memory_resource/polymorphic_allocator.h:20: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/tuple:259: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/compare:145: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h:13: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/partial_order.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/weak_order.h:14: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__compare/strong_order.h:20: /usr/local/opt/llvm/bin/../include/c++/v1/cmath:605:1: error: no return statement in constexpr function __constexpr_isinf(_A1 __lcpp_x) _NOEXCEPT ^ /usr/local/opt/llvm/bin/../include/c++/v1/cmath:646:38: error: no member named '__promote' in namespace 'std' std::__promote<_A1, _A2> >::type ~~~~~^ /usr/local/opt/llvm/bin/../include/c++/v1/cmath:646:48: error: '_A1' does not refer to a value std::__promote<_A1, _A2> >::type ^ /usr/local/opt/llvm/bin/../include/c++/v1/cmath:643:17: note: declared here template ^ /usr/local/opt/llvm/bin/../include/c++/v1/cmath:646:58: error: expected unqualified-id std::__promote<_A1, _A2> >::type ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:561: In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__string/char_traits.h:24: /usr/local/opt/llvm/bin/../include/c++/v1/cstdio:104:5: error: tried including but didn't find libc++'s header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case. # error tried including but didn't find libc++'s header. \ ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [CMakeFiles/PP.dir/src/utils.cpp.o] Error 1 make[1]: *** [CMakeFiles/PP.dir/all] Error 2 make: *** [all] Error 2 ```
AppleClang v14.0.3.14030022 Build Log ``` ~/Developer/afsctool/build-appleclang master* ❯ cmake -Wno-dev .. -- The C compiler identification is AppleClang 14.0.3.14030022 -- The CXX compiler identification is AppleClang 14.0.3.14030022 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- sizeof(void*)=8 -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") -- Checking for module 'zlib' -- Found zlib, version 1.2.11 -- Found ZLIBP: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/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.4/include (found version "2.0.2") -- Enabling LZVN and (possibly) LZFSE support -- Performing Test CFLAG_Wall -- Performing Test CFLAG_Wall - Success -- Performing Test CFLAG_Wno_unknown_pragmas -- Performing Test CFLAG_Wno_unknown_pragmas - Success -- Performing Test CFLAG_Wno_unused_variable -- Performing Test CFLAG_Wno_unused_variable - Success -- Setting afsctool version to: 1.7.3. (v1.7.3-5-g8b89d8f) -- The following OPTIONAL packages have been found: * Git -- The following REQUIRED packages have been found: * ZLIBP (required version >= 1.2.8), zlib compression library, * SPARSEHASH, An extremely memory-efficient hash_map implementation, -- Configuring done (3.2s) -- Generating done (0.1s) -- Build files have been written to: /Users/col/Developer/afsctool/build-appleclang ~/Developer/afsctool/build-appleclang master* ❯ make [ 4%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:519: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/max.h:13: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/comp_ref_type.h:13: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__debug:15: /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace using ::nullptr_t; ~~^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:519: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/max.h:13: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__algorithm/comp_ref_type.h:13: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__debug:16: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/type_traits:452: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__type_traits/is_compound.h:14: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__type_traits/is_fundamental.h:14: /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'? template <> struct __is_nullptr_t_impl : public true_type {}; ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: template argument for template type parameter must be a type template <> struct __is_nullptr_t_impl : public true_type {}; ^~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here template struct __is_nullptr_t_impl : public false_type {}; ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:549: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:848: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocator.h:18: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/new:94: /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/exception:149:45: error: field has incomplete type 'std::exception_ptr' _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/exception:144:24: note: definition of 'std::exception_ptr' is not complete until the closing '}' class _LIBCPP_TYPE_VIS exception_ptr ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/exception:149:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:689:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY' # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:673:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI' __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER)))) ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:549: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:848: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/allocator.h:18: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/new:94: /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/exception:149:55: error: expected ';' at end of declaration list _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {} ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:549: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:860: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28: /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:3: error: non-static data member cannot be constexpr; did you intend to make it const? _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:728:31: note: expanded from macro '_LIBCPP_CONSTEXPR' # define _LIBCPP_CONSTEXPR constexpr ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:549: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:860: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28: /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:32: error: member 'nullptr_t' declared as a template _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:42: error: expected ';' at end of declaration list _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:262:25: error: unknown type name 'nullptr_t' unique_ptr& operator=(nullptr_t) _NOEXCEPT { ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:3: error: non-static data member cannot be constexpr; did you intend to make it const? _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__config:728:31: note: expanded from macro '_LIBCPP_CONSTEXPR' # define _LIBCPP_CONSTEXPR constexpr ^ In file included from /Users/col/Developer/afsctool/src/utils.cpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:549: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/memory:860: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28: /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:32: error: member 'nullptr_t' declared as a template _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:42: error: expected ';' at end of declaration list _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {} ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:484:25: error: unknown type name 'nullptr_t' unique_ptr& operator=(nullptr_t) _NOEXCEPT { ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:533:14: error: unknown type name 'nullptr_t' void reset(nullptr_t = nullptr) _NOEXCEPT { ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:533:24: error: cannot initialize a parameter of type 'int' with an rvalue of type 'std::nullptr_t' void reset(nullptr_t = nullptr) _NOEXCEPT { ^ ~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:533:24: note: passing argument to parameter here /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:594:45: error: unknown type name 'nullptr_t' operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:602:12: error: unknown type name 'nullptr_t' operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:610:45: error: unknown type name 'nullptr_t' operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [CMakeFiles/PP.dir/src/utils.cpp.o] Error 1 make[1]: *** [CMakeFiles/PP.dir/all] Error 2 make: *** [all] Error 2 ```
gingerbeardman commented 1 year ago

Data point: I just built using macOS 12.6.6 with 14.2 installed.

90 warnings generated.
[100%] Linking C executable lzfse
[100%] Built target lzfse_cli
$ file afsctool
afsctool: Mach-O 64-bit executable arm64
kapitainsky commented 1 year ago

This usually means that your header search paths are not configured properly.

The same system as yours - all works.

But I can see that your compiler is looking for headers in /usr/local/opt/llvm which is not where xcode headers are - so as described in the error message - fix your paths.

Here is my build: ``` $ cmake -Wno-dev .. -- The C compiler identification is AppleClang 14.0.3.14030022 -- The CXX compiler identification is AppleClang 14.0.3.14030022 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- sizeof(void*)=8 -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") -- Checking for module 'zlib' -- Found zlib, version 1.2.11 -- Found ZLIBP: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/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.4/include (found version "2.0.2") -- Enabling LZVN and (possibly) LZFSE support -- Performing Test CFLAG_Wall -- Performing Test CFLAG_Wall - Success -- Performing Test CFLAG_Wno_unknown_pragmas -- Performing Test CFLAG_Wno_unknown_pragmas - Success -- Performing Test CFLAG_Wno_unused_variable -- Performing Test CFLAG_Wno_unused_variable - Success -- Setting afsctool version to: 1.7.3. (v1.7.3-5-g8b89d8f) -- The following OPTIONAL packages have been found: * Git -- The following REQUIRED packages have been found: * ZLIBP (required version >= 1.2.8), zlib compression library, * SPARSEHASH, An extremely memory-efficient hash_map implementation, -- Configuring done (5.8s) -- Generating done (0.2s) -- Build files have been written to: /Volumes/DBSamsung-SSD-500-Temp/afsctool/build $ make [ 4%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o [ 9%] Building CXX object CMakeFiles/PP.dir/src/ParallelProcess.cpp.o [ 14%] Building CXX object CMakeFiles/PP.dir/src/Thread/Thread.cpp.o [ 19%] Building CXX object CMakeFiles/PP.dir/src/CritSectEx/CritSectEx.cpp.o [ 23%] Building CXX object CMakeFiles/PP.dir/src/CritSectEx/msemul.cpp.o /Volumes/DBSamsung-SSD-500-Temp/afsctool/src/CritSectEx/msemul.cpp:868:13: warning: 'mktemp' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations] lpName = mktemp(lpName); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/stdlib.h:210:1: note: 'mktemp' has been explicitly marked deprecated here __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead.") ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg' #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg))) ^ 1 warning generated. [ 28%] Building C object CMakeFiles/PP.dir/src/CritSectEx/timing.c.o [ 28%] Built target PP [ 33%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_decode.c.o [ 38%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_decode_base.c.o [ 42%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_encode.c.o [ 47%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_encode_base.c.o [ 52%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_fse.c.o [ 57%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzvn_decode_base.c.o [ 61%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzvn_encode_base.c.o [ 66%] Linking C static library liblzfse.a [ 66%] Built target lzfse [ 71%] Building C object CMakeFiles/afsctool.dir/src/afsctool.c.o [ 76%] Building CXX object CMakeFiles/afsctool.dir/src/main.cpp.o [ 80%] Linking CXX executable afsctool [ 80%] Built target afsctool [ 85%] Building CXX object CMakeFiles/zfsctool.dir/src/zfsctool.cpp.o [ 90%] Linking CXX executable zfsctool [ 90%] Built target zfsctool [ 95%] Building C object src/private/lzfse/CMakeFiles/lzfse_cli.dir/src/lzfse_main.c.o [100%] Linking C executable lzfse [100%] Built target lzfse_cli ```
Colerar commented 1 year ago

But I can see that your compiler is looking for headers in /usr/local/opt/llvm which is not where xcode headers are - so as described in the error message - fix your paths.

You can also see the AppleClang v14.0.3.14030022 Build Log, Apple Clang is looking for /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk, but the build is still failed.

kapitainsky commented 1 year ago

Ohh have not seen your second build. Weird that it fails.

Colerar commented 1 year ago

Okay, after do some magic, I can build with MacOSX12.3.sdk:

/Library/Developer/CommandLineTools/SDKs
❯ sudo mv MacOSX13.3.sdk MacOSX13.3.sdk.bak
/Library/Developer/CommandLineTools/SDKs
❯ sudo ln -s MacOSX12.3.sdk MacOSX13.3.sdk

So maybe afsctool is incompatible with MacOSX13.3.sdk?

kapitainsky commented 1 year ago

but I am building against MacOSX13.3.sdk as you can see and all is fine...

Some warning only

/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/stdlib.h:210:1: note: 'mktemp' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) attribute((deprecated(_msg)))
^
1 warning generated.
RJVB commented 1 year ago

So maybe afsctool is incompatible with MacOSX13.3.sdk?

No, as shown. Is your installation configured to use the command line toolchain only or the full Xcode? Not that it should make a difference for afsctool ... but maybe there is a difference. (And maybe the distinction has been removed since I last looked 8) )

kapitainsky commented 1 year ago

@Colerar what was the issue BTW?

Colerar commented 1 year ago

Fixed after completely reinstalling the Xcode command line tool and upgrading the Xcode.app.

Dr-Emann commented 1 year ago

I think I had run into something similar at one point which was solved by running sudo xcode-select --switch /Applications/Xcode.app, but I'm not sure it was the same issue.

dparisi1 commented 10 months ago

I think I had run into something similar at one point which was solved by running sudo xcode-select --switch /Applications/Xcode.app, but I'm not sure it was the same issue.

this worked for me thank you!