afsctool icon indicating copy to clipboard operation
afsctool copied to clipboard

Compile errors - any ideas?

Open risner opened this issue 4 years ago • 20 comments

uname -a Darwin Superbook.local 18.7.0 Darwin Kernel Version 18.7.0: Mon Aug 31 20:53:32 PDT 2020; root:xnu-4903.278.44~1/RELEASE_X86_64 x86_64

Xcode 11.3.1 (11C504) and command line tools also 11.3.1.

macbook:build risner$ make Scanning dependencies of target PP [ 9%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o [ 18%] Building CXX object CMakeFiles/PP.dir/src/ParallelProcess.cpp.o In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'signbit' in the global namespace using ::signbit; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: error: no member named 'fpclassify' in the global namespace using ::fpclassify; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:320:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'? using ::isfinite; ~~^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note: 'finite' declared here extern int finite(double) ^ In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:321:9: error: no member named 'isinf' in the global namespace using ::isinf; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:322:9: error: no member named 'isnan' in the global namespace using ::isnan; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:323:9: error: no member named 'isnormal' in the global namespace using ::isnormal; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:324:7: error: no member named 'isgreater' in the global namespace; did you mean '::std::greater'? using ::isgreater; ^~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:728:29: note: '::std::greater' declared here struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool> ^ In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:325:7: error: no member named 'isgreaterequal' in the global namespace; did you mean '::std::greater_equal'? using ::isgreaterequal; ^~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:757:29: note: '::std::greater_equal' declared here struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool> ^ In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error: no member named 'isless' in the global namespace using ::isless; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:327:9: error: no member named 'islessequal' in the global namespace using ::islessequal; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:328:9: error: no member named 'islessgreater' in the global namespace using ::islessgreater; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:330:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ In file included from /Users/risner/src/afsctool/src/ParallelProcess.cpp:20: In file included from /Users/risner/src/afsctool/src/ParallelProcess_p.hpp:19: In file included from /Users/risner/src/afsctool/src/Thread/Thread.hpp:14: In file included from /Users/risner/src/afsctool/src/CritSectEx/CritSectEx.h:43: In file included from /Users/risner/src/afsctool/src/CritSectEx/msemul.h:55: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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_ALIA... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.sdk/usr/include/signal.h:85:23: note: insert '_Nullable' if the pointer may be null struct sigaction * __restrict); ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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) _... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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) _... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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) _... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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) _... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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

risner avatar Dec 13 '20 15:12 risner

Which of homebrew or macports did you use as part of your build process?

gingerbeardman avatar Dec 13 '20 19:12 gingerbeardman

Huuuh!

This does not look like anything to do with dependencies from MacPorts. I'm guessing that what happens here is an incompatibility between "good old C++" and whatever C++1x is the default in whichever clang version is being used on your system.

Very weird though, I wouldn't have expected that a header like signal.h would cause warnings...

Would you mind experimenting with different C++ variants? I'm not at my Mac right now, but on Linux the code compiles just fine with C++11, which you can enforce by adding this to the toplevel CMake file (e.g. above the chunk that gets the version from git):

set(CMAKE_CXX_STANDARD 11)

if that doesn't solve the issue, could you try a few older standards (let me know if you need me to figure what to set CMAKE_CXX_STANDARD to for those)?

RJVB avatar Dec 13 '20 21:12 RJVB

risner$ brew -v Homebrew 2.6.1 Homebrew/homebrew-core (git revision baf6a; last commit 2020-12-11) Homebrew/homebrew-cask (git revision ac5e7a; last commit 2020-12-11)

Adding the line: risner$ head -1 ../CMakeLists.txt set(CMAKE_CXX_STANDARD 11)

risner$ make Scanning dependencies of target PP [ 9%] Building CXX object CMakeFiles/PP.dir/src/utils.cpp.o [ 18%] Building CXX object CMakeFiles/PP.dir/src/ParallelProcess.cpp.o In file included from /Users/risner/Src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:318:9: error: no member named 'signbit' in the global namespace using ::signbit; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:319:9: error: no member named 'fpclassify' in the global namespace using ::fpclassify; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:320:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'? using ::isfinite; ~~^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note: 'finite' declared here extern int finite(double) ^ In file included from /Users/risner/Src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:321:9: error: no member named 'isinf' in the global namespace using ::isinf; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:322:9: error: no member named 'isnan' in the global namespace using ::isnan; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:323:9: error: no member named 'isnormal' in the global namespace using ::isnormal; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:324:7: error: no member named 'isgreater' in the global namespace; did you mean '::std::greater'? using ::isgreater; ^~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:728:29: note: '::std::greater' declared here struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool> ^ In file included from /Users/risner/Src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:325:7: error: no member named 'isgreaterequal' in the global namespace; did you mean '::std::greater_equal'? using ::isgreaterequal; ^~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:757:29: note: '::std::greater_equal' declared here struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool> ^ In file included from /Users/risner/Src/afsctool/src/ParallelProcess.cpp:18: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:326:9: error: no member named 'isless' in the global namespace using ::isless; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:327:9: error: no member named 'islessequal' in the global namespace using ::islessequal; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:328:9: error: no member named 'islessgreater' in the global namespace using ::islessgreater; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:329:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:330:9: error: no member named 'isunordered' in the global namespace using ::isunordered; ~~^ In file included from /Users/risner/Src/afsctool/src/ParallelProcess.cpp:20: In file included from /Users/risner/Src/afsctool/src/ParallelProcess_p.hpp:19: In file included from /Users/risner/Src/afsctool/src/Thread/Thread.hpp:14: In file included from /Users/risner/Src/afsctool/src/CritSectEx/CritSectEx.h:43: In file included from /Users/risner/Src/afsctool/src/CritSectEx/msemul.h:55: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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_ALIA... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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_ALIA... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.sdk/usr/include/signal.h:85:23: note: insert '_Nullable' if the pointer may be null struct sigaction * __restrict); ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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) _... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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) _... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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) _... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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) _... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nullable /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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... ^ _Nonnull /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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/MacOSX10.14.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

risner avatar Dec 13 '20 23:12 risner

I'm not familiar enough to try other options than: set(CMAKE_CXX_STANDARD 11)

risner avatar Dec 13 '20 23:12 risner

So setting C++11 doesn't change anything it seems, the same number of errors?

I'm not familiar enough to try other options than: set(CMAKE_CXX_STANDARD 11)

From what I see the only relevant option is set(CMAKE_CXX_STANDARD 98).

Could you call make with VERBOSE=1 (or cmake with -DCMAKE_VERBOSE_MAKEFILE=ON) in the future, and include the commandline in the compile errors you paste (no need to include the successful compilations)?

RJVB avatar Dec 14 '20 10:12 RJVB

OK, this is Apple's fault:

https://stackoverflow.com/questions/58628377/catalina-c-using-cmath-headers-yield-error-no-member-named-signbit-in-th

That's a rather long thread with a number of things you can check, like for instance if you set CPATH in your environment. Annoyingly the only certain and easy fix seems to be to disable SIP. For me that's something that has always been an evident 1st TODO after upgrading (if you plan to use the OS as a Unix workstation OS) but I can't really give out formal advice to do this.

RJVB avatar Dec 14 '20 11:12 RJVB

Read the thread. Tried a couple things. Downloaded Xcode 11.7 (Min Catalina) and installed it (modified plist). Downloaded the Command Line tools for 11.5, modified the .pkg and installed it.

Still the same errors with Xcode 11.7 / command line 11.5.

I'm out of ideas. I can't upgrade to Catalina as I have 5 production 32 bit apps I can't upgrade ($ and one discontinued I'm trying to find a replacement).

risner avatar Dec 17 '20 19:12 risner

I bothers me to say that I really don't know what to do either. Maybe there's a way to modify the headers used or the order in which they're included, but how isn't clear to me.

Did you try specifying an SDK explicitly, I've seen some hints that this could solve the issue?

There's an alternative approach: try to install port:afscompress from MacPorts. It should be the same code and if it fails to build too you can file a ticket on trac.macports.org . I'd expect someone from MacPorts must already have found a workaround for the missing /usr/include ...

RJVB avatar Dec 17 '20 21:12 RJVB

I had this problem in Catalina, but no longer in Big Sur (tested on Xcode 12.2)

MegaByte avatar Dec 21 '20 20:12 MegaByte

I had this problem in Catalina, but no longer in Big Sur (tested on Xcode 12.2)

Good to know, thanks!

RJVB avatar Dec 21 '20 21:12 RJVB

Created a Mojave VM for the apps that don't work in Catalina+, then upgraded to Big Sur (thanks MegaByte). It compiled.

$ sudo ~/bin/afsctool -c PCMWave Unable to compress file PCMWave.

$ ~/bin/afsctool -v PCMWave /System/Library/Speech/Voices/AlexCompact.SpeechVoice/Contents/Resources/PCMWave: File is not HFS+/APFS compressed. File content type: public.data File data fork size (reported size by Mac OS X Finder): 320565736 bytes / 320.6 MB (megabytes, base-10) Number of extended attributes: 0 Total size of extended attribute data: 0 bytes Approximate total file size (data fork + resource fork + EA + EA overhead + file overhead): 320569344 bytes / 305.7 MiB

$ sudo ~/bin/afsctool -c "/System/Library/Fonts/Apple Color Emoji.ttc" Unable to compress file /System/Library/Fonts/Apple Color Emoji.ttc. $ wc "/System/Library/Fonts/Apple Color Emoji.ttc" 628005 4883932 159972324 /System/Library/Fonts/Apple Color Emoji.ttc $ gzip < "/System/Library/Fonts/Apple Color Emoji.ttc" | wc 540482 4157706 139212716

It doesn't seem to work for any files I try. Is there a fix for this?

risner avatar Dec 28 '20 14:12 risner

FWIW, I'm on Mojave

System files are usually already HFS+ compressed, so you'll need to decompress them before afsctool will do what you want it to.

  1. afsctool -fvvv $file to check state
  2. afsctool -d $file to decompress
  3. afsctool -fvvv $file to confirm state
  4. afsctool -c -T LZVN $file to compress

After that I see:

  • 11% compression on Apple Color Emoji.ttc
  • 1% compression on PCMWave

edit: I compressed copies of the files on my Desktop.

gingerbeardman avatar Dec 28 '20 15:12 gingerbeardman

It was already uncompressed, so -fvvv said uncompressed, -d silently ran with no objection and -c errored complaining about LZVN:

$ ~/bin/afsctool -c -T LZVN "/System/Library/Fonts/Apple Color Emoji.ttc" Sorry, LZVN compression has not been enabled in this build.

Also to clarify, I'm trying to compress the presently uncompressed files.

risner avatar Dec 28 '20 17:12 risner

LZVN was just an example type of compression, just my preference, I should have said. You can use any other in there.

Does it compress if you copy the file to ~/Desktop? I compressed copies of them on my Desktop. The system could be protecting its own files from modification.

Just to confirm... this is on Big Sur?

gingerbeardman avatar Dec 29 '20 00:12 gingerbeardman

Copied Apple Color Emoji.ttc to Documents: Documents risner$ ~/bin/afsctool -c Apple\ Color\ Emoji.ttc Unable to compress file /Users/risner/Documents/Apple Color Emoji.ttc.

Yes, on Big Sur. I compiled on Big Sur, tried on Big Sur and copied the binary to Mojave and tried there also.

risner avatar Dec 29 '20 00:12 risner

Yes, on Big Sur. I compiled on Big Sur, tried on Big Sur and copied the binary to Mojave and tried there also.

I would have compiled on the older OS and tested that binary on the newer OS but that's just me.

Does adding -v options (afsctool -cv[v[v]]) give any more information? Does the -L option help? Lastly, can you rewind my recent commits and see if they introduced a regression.

RJVB avatar Dec 29 '20 10:12 RJVB

I ran into this exact same issue, and after a long rabbit hole I fixed just by setting my PKG_CONFIG_PATH correctly. (Since I installed the deps with homebrew)

Once I finally RTFM and exported PKG_CONFIG_PATH=/usr/local/opt/zlib/lib/pkgconfig, my "no member named 'xxx' in the global namespace" errors were gone! Super odd to me though that the problem presented itself this way.

varenc avatar Jan 06 '21 00:01 varenc

On Tuesday January 05 2021 16:55:14 Chris Varenhorst wrote:

Super odd to me though that the problem presented itself this way.

No, I don't think so actually. From what I understood the issue here is that a headerfile is (or several are) being included from the wrong location. That's something that can be very tricky to fix in a proper way. Your solution underlines that: it's not something I can include in the build system.

What surprises me more is that this has an effect at all. I realise this is HB so its pkgconfig may not find everything automatically because things are installed in such a peculiar way. But what other zlib headerfiles did cmake find? This is relevant because I can reject the system zlib files under certain conditions, so users are forced to install one from HB or MacPorts (or Fink, I presume).

RJVB avatar Jan 06 '21 11:01 RJVB

To those who observed "cannot compress" errors with LZVN compression: can you try the lzfse branch (be sure to initialise the new submodule!) and see if that solves the issue? I was a little overzealous in rejecting files that had the last chunk under the minimum size.

(Note to self: a remainder of 0 is indeed under that limit but also means the last chunk is as big as it can get ...)

RJVB avatar Jan 20 '21 21:01 RJVB

But what other zlib headerfiles did cmake find?

Whoops sorry for the delay. Just tried this again and here's the zlib it found:

-- 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")

After setting the pkgconfig env correctly, cmake then finds zlib here: /usr/local/Cellar/zlib/1.2.11/include (and then make actually succeeds)

Thanks for all your work on this!

varenc avatar Jan 21 '21 03:01 varenc