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

make error on ubuntu18.04, arm64 #212

@reso1

Description

@reso1

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions