Closed tristan-k closed 2 years ago
I don't know why but for some reason the architectures are mixed up in the process of compiling them. Not sure if this is my fault.
It's not, my CMake file contains some logic that selects x86_64 code instead of "give me 64 bit code for whatever CPU family we're running on" (-m64
).
I'm taking suggestions how to alter the check if we're not doing a universal build on Mac
block in the toplevel CMake file! AFAIK, Apple clang doesn't accept -m64
; if that's still the case then I'll need to know how to detect we're running on arm64 (or maybe simply do a 64bit universal binary?).
Sorry, I was a bit out of touch with my latest changes, which have been in the lzfse
branch. I had forgotten that I had dropped the use of the external LZVN library, but now simply pull in Apple's reference LZFSE+LZVN implementation as a submodule, and link to that.
Could you please try building from that branch and report back if this succeeds or fails?
No problem. I'm glad that your fork exist and is actively maintained. This could be a lifesaver on my base model macbook air with only 256GB disk space.
Sadly it still fails. Here is what I did:
➜ github git clone --branch lzfse --recurse-submodules https://github.com/RJVB/afsctool
Cloning into 'afsctool'...
remote: Enumerating objects: 947, done.
remote: Counting objects: 100% (54/54), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 947 (delta 31), reused 38 (delta 17), pack-reused 893
Receiving objects: 100% (947/947), 506.17 KiB | 1.87 MiB/s, done.
Resolving deltas: 100% (638/638), done.
Submodule 'src/private/lzfse' (git://github.com/lzfse/lzfse) registered for path 'src/private/lzfse'
Cloning into '/Users/tristank/Documents/Code/git/github/afsctool/src/private/lzfse'...
remote: Enumerating objects: 203, done.
remote: Total 203 (delta 0), reused 0 (delta 0), pack-reused 203
Receiving objects: 100% (203/203), 98.72 KiB | 419.00 KiB/s, done.
Resolving deltas: 100% (116/116), done.
Submodule path 'src/private/lzfse': checked out 'e634ca58b4821d9f3d560cdc6df5dec02ffc93fd'
➜ github cd afsctool
➜ afsctool git:(lzfse) mkdir build && cd build
➜ build git:(lzfse) cmake ..
-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (ZLIBP). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
_cmake/modules/FindZLIBP.cmake:3 (include)
CMakeLists.txt:52 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- Checking for module 'zlib'
-- Found zlib, version 1.2.11
-- Found ZLIBP: /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include (found suitable version "1.2.11", minimum required is "1.2.8")
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (SPARSEHASH). This can lead
to problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
_cmake/modules/FindSPARSEHASH.cmake:3 (include)
CMakeLists.txt:53 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Checking for module 'libsparsehash'
-- Found libsparsehash, version 2.0.2
-- Found SPARSEHASH: /opt/homebrew/Cellar/google-sparsehash/2.0.4/include (found version "2.0.2")
-- Enabling LZVN and (possibly) LZFSE support
CMake Deprecation Warning at src/private/lzfse/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- 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.0.14 (1.7.0-15-g75a1456)
-- 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
CMake Warning (dev) at src/private/lzfse/CMakeLists.txt:60 (add_library):
Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
enabled. Run "cmake --help-policy CMP0069" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
INTERPROCEDURAL_OPTIMIZATION property will be ignored for target 'lzfse'.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/tristank/Documents/Code/git/github/afsctool/build
➜ build git:(lzfse) make
[ 4%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o
[ 9%] Building CXX object CMakeFiles/PP.dir/src/ParallelProcess.cpp.o
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:321:9: error: no member named 'signbit' in the global namespace
using ::signbit;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:322:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:323:9: error: no member named 'isfinite' in the global namespace
using ::isfinite;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:324:9: error: no member named 'isinf' in the global namespace
using ::isinf;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:325:9: error: no member named 'isnan' in the global namespace
using ::isnan;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:326:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:327:7: error: no member named 'isgreater' in the global namespace; did you mean '::std::greater'?
using ::isgreater;
^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/functional:738:29: note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
^
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:328:7: error: no member named 'isgreaterequal' in the global namespace; did you mean '::std::greater_equal'?
using ::isgreaterequal;
^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/functional:767:29: note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
^
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:329:9: error: no member named 'isless' in the global namespace
using ::isless;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:330:9: error: no member named 'islessequal' in the global namespace
using ::islessequal;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:331:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:332:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:20:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess_p.hpp:19:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/Thread/Thread.hpp:14:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/CritSectEx/CritSectEx.h:43:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/CritSectEx/msemul.h:59:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:69:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
extern __const char *__const sys_signame[NSIG];
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:69:21: note: insert '_Nullable' if the pointer may be null
extern __const char *__const sys_signame[NSIG];
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:69:21: note: insert '_Nonnull' if the pointer should never be null
extern __const char *__const sys_signame[NSIG];
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:82:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int pthread_kill(pthread_t, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:82:18: note: insert '_Nullable' if the pointer may be null
int pthread_kill(pthread_t, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:82:18: note: insert '_Nonnull' if the pointer should never be null
int pthread_kill(pthread_t, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:41: note: insert '_Nullable' if the pointer may be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:41: note: insert '_Nonnull' if the pointer should never be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:53: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:53: note: insert '_Nullable' if the pointer may be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:53: note: insert '_Nonnull' if the pointer should never be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:84:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaction(int, const struct sigaction * __restrict,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:84:43: note: insert '_Nullable' if the pointer may be null
int sigaction(int, const struct sigaction * __restrict,
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:84:43: note: insert '_Nonnull' if the pointer should never be null
int sigaction(int, const struct sigaction * __restrict,
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:85:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
struct sigaction * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:85:23: note: insert '_Nullable' if the pointer may be null
struct sigaction * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:85:23: note: insert '_Nonnull' if the pointer should never be null
struct sigaction * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:86:24: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaddset(sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:86:24: note: insert '_Nullable' if the pointer may be null
int sigaddset(sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:86:24: note: insert '_Nonnull' if the pointer should never be null
int sigaddset(sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:31: note: insert '_Nullable' if the pointer may be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:31: note: insert '_Nonnull' if the pointer should never be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:53: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:53: note: insert '_Nullable' if the pointer may be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:53: note: insert '_Nonnull' if the pointer should never be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:88:24: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigdelset(sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:88:24: note: insert '_Nullable' if the pointer may be null
int sigdelset(sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:88:24: note: insert '_Nonnull' if the pointer should never be null
int sigdelset(sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:89:26: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigemptyset(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:89:26: note: insert '_Nullable' if the pointer may be null
int sigemptyset(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:89:26: note: insert '_Nonnull' if the pointer should never be null
int sigemptyset(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:90:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigfillset(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:90:25: note: insert '_Nullable' if the pointer may be null
int sigfillset(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:90:25: note: insert '_Nonnull' if the pointer should never be null
int sigfillset(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:94:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigismember(const sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:94:32: note: insert '_Nullable' if the pointer may be null
int sigismember(const sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:94:32: note: insert '_Nonnull' if the pointer should never be null
int sigismember(const sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:96:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigpending(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:96:25: note: insert '_Nullable' if the pointer may be null
int sigpending(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:96:25: note: insert '_Nonnull' if the pointer should never be null
int sigpending(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:37: note: insert '_Nullable' if the pointer may be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:37: note: insert '_Nonnull' if the pointer should never be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:60: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:60: note: insert '_Nullable' if the pointer may be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:60: note: insert '_Nonnull' if the pointer should never be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:100:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:100:31: note: insert '_Nullable' if the pointer may be null
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:100:31: note: insert '_Nonnull' if the pointer should never be null
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:28: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:28: note: insert '_Nullable' if the pointer may be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:28: note: insert '_Nonnull' if the pointer should never be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:46: note: insert '_Nullable' if the pointer may be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:46: note: insert '_Nonnull' if the pointer should never be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:103:39: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
void psignal(unsigned int, const char *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:103:39: note: insert '_Nullable' if the pointer may be null
void psignal(unsigned int, const char *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:103:39: note: insert '_Nonnull' if the pointer should never be null
void psignal(unsigned int, const char *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigvec(int, struct sigvec *, struct sigvec *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:31: note: insert '_Nullable' if the pointer may be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:31: note: insert '_Nonnull' if the pointer should never be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:48: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigvec(int, struct sigvec *, struct sigvec *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:48: note: insert '_Nullable' if the pointer may be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:48: note: insert '_Nonnull' if the pointer should never be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nonnull
22 warnings and 13 errors generated.
make[2]: *** [CMakeFiles/PP.dir/src/ParallelProcess.cpp.o] Error 1
make[1]: *** [CMakeFiles/PP.dir/all] Error 2
make: *** [all] Error 2
No problem. I'm glad that your fork exist and is actively maintained.
"Actively maintained" is a big word for what I do :)
Sadly it still fails. Here is what I did: ... In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:321:9: error: no member named 'signbit' in the global namespace using ::signbit; ~~^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:322:9: error: no member named 'fpclassify' in the global namespace using ::fpclassify; ~~^
Could you invoke make
with V=1 VERBOSE=1
and copy the compiler command? I have a hunch Apple's clang selects a newish C++ variant that causes the errors you're seeing.
Could you invoke
make
withV=1 VERBOSE=1
and copy the compiler command? I have a hunch Apple's clang selects a newish C++ variant that causes the errors you're seeing.
Like so?
➜ build git:(lzfse) make V=1 VERBOSE=1
/opt/homebrew/Cellar/cmake/3.21.2/bin/cmake -S/Users/tristank/Documents/Code/git/github/afsctool -B/Users/tristank/Documents/Code/git/github/afsctool/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.21.2/bin/cmake -E cmake_progress_start /Users/tristank/Documents/Code/git/github/afsctool/build/CMakeFiles /Users/tristank/Documents/Code/git/github/afsctool/build//CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/PP.dir/build.make CMakeFiles/PP.dir/depend
cd /Users/tristank/Documents/Code/git/github/afsctool/build && /opt/homebrew/Cellar/cmake/3.21.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/tristank/Documents/Code/git/github/afsctool /Users/tristank/Documents/Code/git/github/afsctool /Users/tristank/Documents/Code/git/github/afsctool/build /Users/tristank/Documents/Code/git/github/afsctool/build /Users/tristank/Documents/Code/git/github/afsctool/build/CMakeFiles/PP.dir/DependInfo.cmake --color=
Dependencies file "CMakeFiles/PP.dir/src/ParallelProcess.cpp.o.d" is newer than depends file "/Users/tristank/Documents/Code/git/github/afsctool/build/CMakeFiles/PP.dir/compiler_depend.internal".
Dependencies file "CMakeFiles/PP.dir/src/utils.cpp.o.d" is newer than depends file "/Users/tristank/Documents/Code/git/github/afsctool/build/CMakeFiles/PP.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target PP
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/PP.dir/build.make CMakeFiles/PP.dir/build
[ 4%] Building CXX object CMakeFiles/PP.dir/src/ParallelProcess.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DHAS_LZFSE -DHAS_LZVN -DSUPPORT_PARALLEL -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include -I/opt/homebrew/Cellar/google-sparsehash/2.0.4/include -I/Users/tristank/Documents/Code/git/github/afsctool/build -I/Users/tristank/Documents/Code/git/github/afsctool/src -I/Users/tristank/Documents/Code/git/github/afsctool/src/private/lzfse -m64 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -std=gnu++11 -MD -MT CMakeFiles/PP.dir/src/ParallelProcess.cpp.o -MF CMakeFiles/PP.dir/src/ParallelProcess.cpp.o.d -o CMakeFiles/PP.dir/src/ParallelProcess.cpp.o -c /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:321:9: error: no member named 'signbit' in the global namespace
using ::signbit;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:322:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:323:9: error: no member named 'isfinite' in the global namespace
using ::isfinite;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:324:9: error: no member named 'isinf' in the global namespace
using ::isinf;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:325:9: error: no member named 'isnan' in the global namespace
using ::isnan;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:326:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:327:7: error: no member named 'isgreater' in the global namespace; did you mean '::std::greater'?
using ::isgreater;
^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/functional:738:29: note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
^
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:328:7: error: no member named 'isgreaterequal' in the global namespace; did you mean '::std::greater_equal'?
using ::isgreaterequal;
^~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/functional:767:29: note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
^
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:18:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:329:9: error: no member named 'isless' in the global namespace
using ::isless;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:330:9: error: no member named 'islessequal' in the global namespace
using ::islessequal;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:331:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:332:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cmath:333:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
~~^
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess.cpp:20:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/ParallelProcess_p.hpp:19:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/Thread/Thread.hpp:14:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/CritSectEx/CritSectEx.h:43:
In file included from /Users/tristank/Documents/Code/git/github/afsctool/src/CritSectEx/msemul.h:59:
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:69:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
extern __const char *__const sys_signame[NSIG];
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:69:21: note: insert '_Nullable' if the pointer may be null
extern __const char *__const sys_signame[NSIG];
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:69:21: note: insert '_Nonnull' if the pointer should never be null
extern __const char *__const sys_signame[NSIG];
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:82:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int pthread_kill(pthread_t, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:82:18: note: insert '_Nullable' if the pointer may be null
int pthread_kill(pthread_t, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:82:18: note: insert '_Nonnull' if the pointer should never be null
int pthread_kill(pthread_t, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:41: note: insert '_Nullable' if the pointer may be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:41: note: insert '_Nonnull' if the pointer should never be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:53: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:53: note: insert '_Nullable' if the pointer may be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:83:53: note: insert '_Nonnull' if the pointer should never be null
int pthread_sigmask(int, const sigset_t *, sigset_t *) __DARWIN_ALIAS(pthread_sigmask);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:84:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaction(int, const struct sigaction * __restrict,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:84:43: note: insert '_Nullable' if the pointer may be null
int sigaction(int, const struct sigaction * __restrict,
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:84:43: note: insert '_Nonnull' if the pointer should never be null
int sigaction(int, const struct sigaction * __restrict,
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:85:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
struct sigaction * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:85:23: note: insert '_Nullable' if the pointer may be null
struct sigaction * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:85:23: note: insert '_Nonnull' if the pointer should never be null
struct sigaction * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:86:24: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaddset(sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:86:24: note: insert '_Nullable' if the pointer may be null
int sigaddset(sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:86:24: note: insert '_Nonnull' if the pointer should never be null
int sigaddset(sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:31: note: insert '_Nullable' if the pointer may be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:31: note: insert '_Nonnull' if the pointer should never be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:53: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:53: note: insert '_Nullable' if the pointer may be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:87:53: note: insert '_Nonnull' if the pointer should never be null
int sigaltstack(const stack_t * __restrict, stack_t * __restrict) __DARWIN_ALIAS(sigaltstack) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:88:24: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigdelset(sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:88:24: note: insert '_Nullable' if the pointer may be null
int sigdelset(sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:88:24: note: insert '_Nonnull' if the pointer should never be null
int sigdelset(sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:89:26: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigemptyset(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:89:26: note: insert '_Nullable' if the pointer may be null
int sigemptyset(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:89:26: note: insert '_Nonnull' if the pointer should never be null
int sigemptyset(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:90:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigfillset(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:90:25: note: insert '_Nullable' if the pointer may be null
int sigfillset(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:90:25: note: insert '_Nonnull' if the pointer should never be null
int sigfillset(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:94:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigismember(const sigset_t *, int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:94:32: note: insert '_Nullable' if the pointer may be null
int sigismember(const sigset_t *, int);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:94:32: note: insert '_Nonnull' if the pointer should never be null
int sigismember(const sigset_t *, int);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:96:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigpending(sigset_t *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:96:25: note: insert '_Nullable' if the pointer may be null
int sigpending(sigset_t *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:96:25: note: insert '_Nonnull' if the pointer should never be null
int sigpending(sigset_t *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:37: note: insert '_Nullable' if the pointer may be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:37: note: insert '_Nonnull' if the pointer should never be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:60: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:60: note: insert '_Nullable' if the pointer may be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:97:60: note: insert '_Nonnull' if the pointer should never be null
int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:100:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:100:31: note: insert '_Nullable' if the pointer may be null
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:100:31: note: insert '_Nonnull' if the pointer should never be null
int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:28: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:28: note: insert '_Nullable' if the pointer may be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:28: note: insert '_Nonnull' if the pointer should never be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:46: note: insert '_Nullable' if the pointer may be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:101:46: note: insert '_Nonnull' if the pointer should never be null
int sigwait(const sigset_t * __restrict, int * __restrict) __DARWIN_ALIAS_C(sigwait);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:103:39: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
void psignal(unsigned int, const char *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:103:39: note: insert '_Nullable' if the pointer may be null
void psignal(unsigned int, const char *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:103:39: note: insert '_Nonnull' if the pointer should never be null
void psignal(unsigned int, const char *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigvec(int, struct sigvec *, struct sigvec *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:31: note: insert '_Nullable' if the pointer may be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:31: note: insert '_Nonnull' if the pointer should never be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:48: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int sigvec(int, struct sigvec *, struct sigvec *);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:48: note: insert '_Nullable' if the pointer may be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/signal.h:106:48: note: insert '_Nonnull' if the pointer should never be null
int sigvec(int, struct sigvec *, struct sigvec *);
^
_Nonnull
22 warnings and 13 errors generated.
make[2]: *** [CMakeFiles/PP.dir/src/ParallelProcess.cpp.o] Error 1
make[1]: *** [CMakeFiles/PP.dir/all] Error 2
make: *** [all] Error 2
On Friday October 01 2021 14:49:59 ʞ-uɐʇsıɹʇ wrote:
Like so?
Yep, but you could have left out the compiler output, I justed wanted to verify the compiler command ;)
Annoyingly it's OK, and it already specifies C++11 as the language standard. I spent hours building clang 12 from MacPorts to see if it allowed me to reproduce the issue, but no such luck. I've looked at all warnings and tried to compile the file with -pedantic
... still no luck. (I did commit fixes for the remaining warnings I got; please pull.)
How "stock" is your system? Is it in any way possible that the compiler picks up a wrong header when including cmath
, one which indeed doesn't define the variables mentioned in your error messages?
Do you have an IDE that can grok CMake projects (e.g. QtCreator)? If not, you probably know that CMake has a generator to create an XCode project. The idea is that you can use the "intellisense" features to open the cmath header, go to line 321 and see if it gives you an error about ::signbit
or instead a location where it's defined. If you get an error you could create a minimal XCode project for a console application with just a simple main.cpp that doesn't have to do anything other than contain valid C++ code, and then include the cmath
header to see it you can reproduce the error.
OK, I should have googled first: check the last few comments in https://github.com/stan-dev/rstan/issues/904
Try
> sudo rm -rf /Library/Developer/CommandLineTools
> xcode-select --switch /path/to/Xcode.app
(that'd probably be /Applications/Xcode.app
), or if that fails, remove your Xcode.app and reinstall it before re-executing xcode-select --switch /path/to/Xcode.app
(remember to move any additional SDKs you installed elsewhere and move them back afterwards, will be faster than having to reinstall them ;) ).
That did the trick. It's beyond me how you figured that out.
$ sudo rm -rf /Library/Developer/CommandLineTools
$ sudo xcode-select --switch /Applications/Xcode.app
$ clang --version
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Now it compiles.
➜ github git clone --branch lzfse --recurse-submodules https://github.com/RJVB/afsctool
Cloning into 'afsctool'...
remote: Enumerating objects: 957, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 957 (delta 37), reused 40 (delta 18), pack-reused 893
Receiving objects: 100% (957/957), 514.80 KiB | 2.11 MiB/s, done.
Resolving deltas: 100% (644/644), done.
Submodule 'src/private/lzfse' (git://github.com/lzfse/lzfse) registered for path 'src/private/lzfse'
Cloning into '/Users/tristank/Documents/Code/git/github/afsctool/src/private/lzfse'...
remote: Enumerating objects: 203, done.
remote: Total 203 (delta 0), reused 0 (delta 0), pack-reused 203
Receiving objects: 100% (203/203), 98.72 KiB | 416.00 KiB/s, done.
Resolving deltas: 100% (116/116), done.
Submodule path 'src/private/lzfse': checked out 'e634ca58b4821d9f3d560cdc6df5dec02ffc93fd'
➜ github cd afsctool
➜ afsctool git:(lzfse) mkdir build && cd build
➜ build git:(lzfse) cmake ..
-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (ZLIBP). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
_cmake/modules/FindZLIBP.cmake:3 (include)
CMakeLists.txt:52 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- Checking for module 'zlib'
-- Found zlib, version 1.2.11
-- Found ZLIBP: /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include (found suitable version "1.2.11", minimum required is "1.2.8")
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (SPARSEHASH). This can lead
to problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.21.2/share/cmake/Modules/FindPkgConfig.cmake:70 (find_package_handle_standard_args)
_cmake/modules/FindSPARSEHASH.cmake:3 (include)
CMakeLists.txt:53 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Checking for module 'libsparsehash'
-- Found libsparsehash, version 2.0.2
-- Found SPARSEHASH: /opt/homebrew/Cellar/google-sparsehash/2.0.4/include (found version "2.0.2")
-- Enabling LZVN and (possibly) LZFSE support
CMake Deprecation Warning at src/private/lzfse/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- 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.0.14 (1.7.0-16-gc24bbd5)
-- 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
CMake Warning (dev) at src/private/lzfse/CMakeLists.txt:60 (add_library):
Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
enabled. Run "cmake --help-policy CMP0069" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
INTERPROCEDURAL_OPTIMIZATION property will be ignored for target 'lzfse'.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/tristank/Documents/Code/git/github/afsctool/build
➜ build git:(lzfse) 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
[ 28%] Building C object CMakeFiles/PP.dir/src/CritSectEx/timing.c.o
[ 28%] Built target PP
[ 33%] Building CXX object CMakeFiles/zfsctool.dir/src/zfsctool.cpp.o
[ 38%] Linking CXX executable zfsctool
[ 38%] Built target zfsctool
[ 42%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_decode.c.o
[ 47%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_decode_base.c.o
[ 52%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_encode.c.o
[ 57%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_encode_base.c.o
[ 61%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzfse_fse.c.o
[ 66%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzvn_decode_base.c.o
[ 71%] Building C object src/private/lzfse/CMakeFiles/lzfse.dir/src/lzvn_encode_base.c.o
[ 76%] Linking C static library liblzfse.a
[ 76%] Built target lzfse
[ 80%] Building C object CMakeFiles/afsctool.dir/src/afsctool.c.o
[ 85%] Building CXX object CMakeFiles/afsctool.dir/src/main.cpp.o
[ 90%] Linking CXX executable afsctool
[ 90%] Built target afsctool
[ 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
➜ build git:(lzfse) sudo porg -lp afsctool "make install"
Password:
Consolidate compiler generated dependencies of target PP
[ 28%] Built target PP
Consolidate compiler generated dependencies of target zfsctool
[ 38%] Built target zfsctool
Consolidate compiler generated dependencies of target lzfse
[ 76%] Built target lzfse
Consolidate compiler generated dependencies of target afsctool
[ 90%] Built target afsctool
Consolidate compiler generated dependencies of target lzfse_cli
[100%] Built target lzfse_cli
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/afsctool
porg: afsctool: No files to log
Thank you very much.
That did the trick. It's beyond me how you figured that out.
It was a bit of a shot in the dark, but quite an educated one. I googled the error message you got and discovered you were not the 1st and undoubtedly not the last person to run into this issue. I was just lucky that someone had already figured out the fix, and that I found it quickly.
I don't know why but for some reason the architectures are mixed up in the process of compiling them. Not sure if this is my fault.