[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ddrescue 1.26 make error with Apple LLVM version 8.0.0 (clang-800.0.42.1
From: |
address@hidden |
Subject: |
ddrescue 1.26 make error with Apple LLVM version 8.0.0 (clang-800.0.42.1) |
Date: |
Tue, 10 May 2022 21:26:49 +0800 |
Hello,
Previously I encountered no issue compiling ddrescue 1.25 from source.
Now, with ddrescue 1.26, I got:
-----
++ -Wall -W -O2 -c -o loggers.o loggers.cc
loggers.cc:61:12: error: no member named 'exit' in namespace 'std'
std::exit( 1 ); }
~~~~~^
loggers.cc:65:12: error: no member named 'exit' in namespace 'std'
std::exit( 1 ); }
~~~~~^
2 errors generated.
make: *** [loggers.o] Error 1
-----
Based on the discussions at the following two links:
https://stackoverflow.com/questions/61746603/why-clang-gives-error-no-member-named-copy-in-namespace-std
https://qa.ostack.cn/qa/?qa=1111866/
I took a guess and inserted "#include <cstdlib>" into ./loggers.cc as seen
below, which allowed make to finish compiling fine.
#include <algorithm>
+#include <cstdlib>
#include <cstdio>
I'm not sure that's the most appropriate workaround, just that it seems to work
in my particular case. Hopefully a proper fix could be incorporated into the
official source code. Thanks for your attention!
- ddrescue 1.26 make error with Apple LLVM version 8.0.0 (clang-800.0.42.1),
address@hidden <=