I'm stuck with this error when trying to compile tfs 0.4 r3884 on Debian 11
C++:
tools.cpp: In function ‘std::string transformToMD5(std::string, bool)’:
tools.cpp:43:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
43 | byte digest[CryptoPP::Weak::MD5::DIGESTSIZE];
| ^~~~
| CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
from /usr/include/cryptopp/sha.h:11,
from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
56 | typedef unsigned char byte;
| ^~~~
tools.cpp:46:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
46 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~~
| sigset
tools.cpp:46:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
46 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~
tools.cpp:46:32: error: expected primary-expression before ‘const’
46 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~
tools.cpp:46:32: error: expected ‘)’ before ‘const’
46 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ~^~~~~
| )
tools.cpp: In function ‘std::string transformToSHA1(std::string, bool)’:
tools.cpp:73:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
73 | byte digest[CryptoPP::SHA1::DIGESTSIZE];
| ^~~~
| CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
from /usr/include/cryptopp/sha.h:11,
from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
56 | typedef unsigned char byte;
| ^~~~
tools.cpp:76:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
76 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~~
| sigset
tools.cpp:76:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
76 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~
tools.cpp:76:32: error: expected primary-expression before ‘const’
76 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~
tools.cpp:76:32: error: expected ‘)’ before ‘const’
76 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ~^~~~~
| )
tools.cpp: In function ‘std::string transformToSHA256(std::string, bool)’:
tools.cpp:103:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
103 | byte digest[CryptoPP::SHA256::DIGESTSIZE];
| ^~~~
| CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
from /usr/include/cryptopp/sha.h:11,
from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
56 | typedef unsigned char byte;
| ^~~~
tools.cpp:106:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
106 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~~
| sigset
tools.cpp:106:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
106 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~
tools.cpp:106:32: error: expected primary-expression before ‘const’
106 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~
tools.cpp:106:32: error: expected ‘)’ before ‘const’
106 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ~^~~~~
| )
tools.cpp: In function ‘std::string transformToSHA512(std::string, bool)’:
tools.cpp:133:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
133 | byte digest[CryptoPP::SHA512::DIGESTSIZE];
| ^~~~
| CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
from /usr/include/cryptopp/sha.h:11,
from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
56 | typedef unsigned char byte;
| ^~~~
tools.cpp:136:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
136 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~~
| sigset
tools.cpp:136:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
136 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~
tools.cpp:136:32: error: expected primary-expression before ‘const’
136 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ^~~~~
tools.cpp:136:32: error: expected ‘)’ before ‘const’
136 | hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
| ~^~~~~
| )
tools.cpp: In function ‘std::string transformToVAHash(std::string, bool)’:
tools.cpp:169:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
169 | byte digest[CryptoPP::SHA512::DIGESTSIZE];
| ^~~~
| CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
from /usr/include/cryptopp/sha.h:11,
from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
56 | typedef unsigned char byte;
| ^~~~
tools.cpp:172:42: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
172 | CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
| ^~~~
tools.cpp:172:34: error: expected primary-expression before ‘(’ token
172 | CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
| ^
tools.cpp:172:42: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
172 | CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
| ^~~~
tools.cpp:172:36: error: expected primary-expression before ‘const’
172 | CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
| ^~~~~
tools.cpp:172:36: error: expected ‘)’ before ‘const’
172 | CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
| ~^~~~~
| )
tools.cpp:183:14: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
183 | encoder.Put(digest, sizeof(digest));
| ^~~~~~
| sigset
tools.cpp: In function ‘uint32_t adlerChecksum(uint8_t*, size_t)’:
tools.cpp:1669:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
1669 | byte digest[CryptoPP::Adler32::DIGESTSIZE];
| ^~~~
| CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
from /usr/include/cryptopp/sha.h:11,
from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
56 | typedef unsigned char byte;
| ^~~~
tools.cpp:1672:24: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
1672 | adler.CalculateDigest(digest, (const byte*)data, length);
| ^~~~~~
| sigset
tools.cpp:1672:39: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
1672 | adler.CalculateDigest(digest, (const byte*)data, length);
| ^~~~
tools.cpp:1672:33: error: expected primary-expression before ‘const’
1672 | adler.CalculateDigest(digest, (const byte*)data, length);
| ^~~~~
tools.cpp:1672:33: error: expected ‘)’ before ‘const’
1672 | adler.CalculateDigest(digest, (const byte*)data, length);
| ~^~~~~
| )
make[1]: *** [Makefile:595: tools.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/tile.Tpo .deps/tile.Po