Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

make error on ubuntu18.04, arm64 #212

Open
reso1 opened this issue Jul 11, 2019 · 0 comments
Open

make error on ubuntu18.04, arm64 #212

reso1 opened this issue Jul 11, 2019 · 0 comments

Comments

@reso1
Copy link

reso1 commented Jul 11, 2019

Platform: Ubuntu18.04 on arm64

The former instructions of the building procedure is OKAY for me:

$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr

But then when I use make -j4, problems occured as followed:

/home/tpp/Downloads/libQtShadowsocks-2.1.0/lib/crypto/cipher.cpp: In member function ‘std::__cxx11::string QSS::Cipher::update(const uint8_t*, size_t)’:
/home/tpp/Downloads/libQtShadowsocks-2.1.0/lib/crypto/cipher.cpp:156:83: error: invalid cast from type ‘std::vector<unsigned char, Botan::secure_allocator >::iterator {aka __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, Botan::secure_allocator > >}’ to type ‘const char*’
return std::string(reinterpret_cast<const char >(DataOfSecureByteArray(c)),
^
/home/tpp/Downloads/libQtShadowsocks-2.1.0/lib/crypto/cipher.cpp: In static member function ‘static std::__cxx11::string QSS::Cipher::randomIv(int)’:
/home/tpp/Downloads/libQtShadowsocks-2.1.0/lib/crypto/cipher.cpp:179:81: error: invalid cast from type ‘std::vector<unsigned char, Botan::secure_allocator >::iterator {aka __gnu_cxx::__normal_iterator<unsigned char
, std::vector<unsigned char, Botan::secure_allocator > >}’ to type ‘const char*’
return std::string(reinterpret_cast<const char >(DataOfSecureByteArray(out)), out.size());
^
/home/tpp/Downloads/libQtShadowsocks-2.1.0/lib/crypto/cipher.cpp: In static member function ‘static std::__cxx11::string QSS::Cipher::md5Hash(const string&)’:
/home/tpp/Downloads/libQtShadowsocks-2.1.0/lib/crypto/cipher.cpp:195:83: error: invalid cast from type ‘std::vector<unsigned char, Botan::secure_allocator >::iterator {aka __gnu_cxx::__normal_iterator<unsigned char
, std::vector<unsigned char, Botan::secure_allocator > >}’ to type ‘const char*’
return std::string(reinterpret_cast<const char*>(DataOfSecureByteArray(result)), result.size());

Seems like my gcc compiler considers this cast as invalid:

‘std::vector<unsigned char, Botan::secure_allocator >::iterator {aka __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, Botan::secure_allocator > >}’ to type ‘const char*’

Can someone help me?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant