Jump to content

[SRC] GCC49/C++11 Upgrade


Recommended Posts

Hi guys,

 

I just start on leaked source (kraizy) and I want upgrade gcc to gcc49 and c+11..
I change all clags and install new clean vdi.. But after ending (80%) game compilation I got this error..

Can anyone help me?
error code:
 

In file included from ../../../External/include/cryptopp/modes.h:8:0,
                 from cipher.cpp:7:
../../../External/include/cryptopp/secblock.h: In instantiation of 'CryptoPP::Al                                                                             locatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Al                                                                             ign16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const                                                                              void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithC                                                                             leanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T                                                                             , T_Align16>::size_type = unsigned int]':
../../../External/include/cryptopp/secblock.h:247:25:   required from 'CryptoPP:                                                                             :SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigne                                                                             d char; A = CryptoPP::AllocatorWithCleanup<unsigned char>; CryptoPP::SecBlock<T,                                                                              A>::size_type = unsigned int]'
../../../External/include/cryptopp/algparam.h:17:2:   required from here
../../../External/include/cryptopp/secblock.h:91:14: error: 'CheckSize' was not                                                                              declared in this scope, and no declarations were found by argument-dependent loo                                                                             kup at the point of instantiation [-fpermissive]
   CheckSize(n);
              ^
../../../External/include/cryptopp/secblock.h:91:14: note: declarations in depen                                                                             dent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified                                                                              lookup
../../../External/include/cryptopp/secblock.h:91:14: note: use 'this->CheckSize'                                                                              instead
../../../External/include/cryptopp/secblock.h: In instantiation of 'CryptoPP::Al                                                                             locatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Al                                                                             ign16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const                                                                              void*) [with T = unsigned char; bool T_Align16 = true; CryptoPP::AllocatorWithCl                                                                             eanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T,                                                                              T_Align16>::size_type = unsigned int]':
../../../External/include/cryptopp/secblock.h:247:25:   required from 'CryptoPP:                                                                             :SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigne                                                                             d char; A = CryptoPP::AllocatorWithCleanup<unsigned char, true>; CryptoPP::SecBl                                                                             ock<T, A>::size_type = unsigned int]'
../../../External/include/cryptopp/modes.h:63:34:   required from here
../../../External/include/cryptopp/secblock.h:91:14: error: 'CheckSize' was not                                                                              declared in this scope, and no declarations were found by argument-dependent loo                                                                             kup at the point of instantiation [-fpermissive]
../../../External/include/cryptopp/secblock.h:91:14: note: declarations in depen                                                                             dent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified                                                                              lookup
../../../External/include/cryptopp/secblock.h:91:14: note: use 'this->CheckSize'                                                                              instead
../../../External/include/cryptopp/secblock.h: In instantiation of 'CryptoPP::Al                                                                             locatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Al                                                                             ign16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const                                                                              void*) [with T = unsigned int; bool T_Align16 = true; CryptoPP::AllocatorWithCle                                                                             anup<T, T_Align16>::pointer = unsigned int*; CryptoPP::AllocatorWithCleanup<T, T                                                                             _Align16>::size_type = unsigned int]':
../../../External/include/cryptopp/secblock.h:249:29:   required from 'CryptoPP:                                                                             :SecBlock<T, A>::SecBlock(const CryptoPP::SecBlock<T, A>&) [with T = unsigned in                                                                             t; A = CryptoPP::AllocatorWithCleanup<unsigned int, true>]'
../../../External/include/cryptopp/modarith.h:122:20:   required from here
../../../External/include/cryptopp/secblock.h:91:14: error: 'CheckSize' was not                                                                              declared in this scope, and no declarations were found by argument-dependent loo                                                                             kup at the point of instantiation [-fpermissive]
../../../External/include/cryptopp/secblock.h:91:14: note: declarations in depen                                                                             dent base 'CryptoPP::AllocatorBase<unsigned int>' are not found by unqualified l                                                                             ookup
../../../External/include/cryptopp/secblock.h:91:14: note: use 'this->CheckSize'                                                                              instead
../../../External/include/cryptopp/secblock.h: In instantiation of 'CryptoPP::Al                                                                             locatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Al                                                                             ign16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const                                                                              void*) [with T = unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCl                                                                             eanup<T, T_Align16>::pointer = unsigned int*; CryptoPP::AllocatorWithCleanup<T,                                                                              T_Align16>::size_type = unsigned int]':
../../../External/include/cryptopp/secblock.h:247:25:   required from 'CryptoPP:                                                                             :SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigne                                                                             d int; A = CryptoPP::AllocatorWithCleanup<unsigned int>; CryptoPP::SecBlock<T, A                                                                             >::size_type = unsigned int]'
../../../External/include/cryptopp/rc5.h:22:27:   required from 'CryptoPP::Block                                                                             CipherFinal<DIR, BASE>::BlockCipherFinal() [with CryptoPP::CipherDir DIR = (Cryp                                                                             toPP::CipherDir)0u; BASE = CryptoPP::RC5::Enc]'
../../../External/include/cryptopp/misc.h:82:7:   required from 'CryptoPP::Ciphe                                                                             rModeFinalTemplate_CipherHolder<CIPHER, BASE>::CipherModeFinalTemplate_CipherHol                                                                             der(const byte*, size_t, const byte*) [with CIPHER = CryptoPP::BlockCipherFinal<                                                                             (CryptoPP::CipherDir)0u, CryptoPP::RC5::Enc>; BASE = CryptoPP::ConcretePolicyHol                                                                             der<CryptoPP::Empty, CryptoPP::AdditiveCipherTemplate<CryptoPP::AbstractPolicyHo                                                                             lder<CryptoPP::AdditiveCipherAbstractPolicy, CryptoPP::CTR_ModePolicy> > >; byte                                                                              = unsigned char; size_t = unsigned int]'
cipher.cpp:88:64:   required from 'CryptoPP::SymmetricCipher* BlockCipherDetail<                                                                             T>::CreateEncoder(const byte*, size_t, const byte*) const [with T = CryptoPP::RC                                                                             5; byte = unsigned char; size_t = unsigned int]'
cipher.cpp:398:1:   required from here
../../../External/include/cryptopp/secblock.h:91:14: error: 'CheckSize' was not                                                                              declared in this scope, and no declarations were found by argument-dependent loo                                                                             kup at the point of instantiation [-fpermissive]
../../../External/include/cryptopp/secblock.h:91:14: note: declarations in depen                                                                             dent base 'CryptoPP::AllocatorBase<unsigned int>' are not found by unqualified l                                                                             ookup
../../../External/include/cryptopp/secblock.h:91:14: note: use 'this->CheckSize'                                                                              instead
gmake: *** [Makefile:113: .obj/cipher.o] Error 1
gmake: *** Waiting for unfinished jobs....

 

Link to comment
Share on other sites

../../../External/include/cryptopp/secblock.h:91:14: error: 'CheckSize' was not                                                                              declared in this scope, and no declarations were found by argument-dependent loo                                                                             kup at the point of instantiation [-fpermissive]
../../../External/include/cryptopp/secblock.h:91:14: note: declarations in depen                                                                             dent base 'CryptoPP::AllocatorBase<unsigned int>' are not found by unqualified l                                                                             ookup
../../../External/include/cryptopp/secblock.h:91:14: note: use 'this->CheckSize' 

just do that thing your compiler says to you

Edited by DrTurk
  • Love 1
Link to comment
Share on other sites

6 minutes ago, DrTurk said:

../../../External/include/cryptopp/secblock.h:91:14: error: 'CheckSize' was not                                                                              declared in this scope, and no declarations were found by argument-dependent loo                                                                             kup at the point of instantiation [-fpermissive]
../../../External/include/cryptopp/secblock.h:91:14: note: declarations in depen                                                                             dent base 'CryptoPP::AllocatorBase<unsigned int>' are not found by unqualified l                                                                             ookup
../../../External/include/cryptopp/secblock.h:91:14: note: use 'this->CheckSize' 

just do that thing your compiler says to you

Yep solved but new error.. :D
 

/usr/local/bin/ld: .obj/cipher.o: in function `DH2KeyAgreement::Prepare(void*, unsigned int*)':
/mainline/Server/game/src/cipher.cpp:315: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)'
/usr/local/bin/ld: /mainline/Server/game/src/cipher.cpp:322: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)'
/usr/local/bin/ld: /mainline/Server/game/src/cipher.cpp:324: undefined reference to `CryptoPP::Integer::Integer(char const*, CryptoPP::ByteOrder)'
/usr/local/bin/ld: .obj/cipher.o: in function `CryptoPP::DL_SimpleKeyAgreementDomainBase<CryptoPP::Integer>::GeneratePublicKey(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned char*) const':
/mainline/Server/game/src/../../../External/include/cryptopp/pubkey.h:1916: undefined reference to `CryptoPP::Integer::Integer(unsigned char const*, unsigned int, CryptoPP::Integer::Signedness, CryptoPP::ByteOrder)'
/usr/local/bin/ld: .obj/cipher.o: in function `CryptoPP::DL_SimpleKeyAgreementDomainBase<CryptoPP::Integer>::Agree(unsigned char*, unsigned char const*, unsigned char const*, bool) const':
/mainline/Server/game/src/../../../External/include/cryptopp/pubkey.h:1926: undefined reference to `CryptoPP::Integer::Integer(unsigned char const*, unsigned int, CryptoPP::Integer::Signedness, CryptoPP::ByteOrder)'
collect2: error: ld returned 1 exit status

 

Link to comment
Share on other sites

One important thing before you enjoy the time with c++11: Make sure you look over all iterating loops. Because behavior changed for c++11 to autodetect for loops with iterators. Sometimes you may encounter shortened loops with iterators. In modern c++, so since c++11 your compiler will detect the loop and automatically increase the iterator. This may create a lot of issues. Have a look for example at CancelServerTimers in questmanager.cpp. If you don't fix those loops you may encounter issues and crashes.

  • Love 1

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

void CQuestManager::CancelServerTimers(uint32_t arg)
{
    auto it = m_mapServerTimer.begin();
    for ( ; it != m_mapServerTimer.end();)
    {
        if (it->first.second == arg)
        {
            LPEVENT event = it->second;
            event_cancel(&event);
            m_mapServerTimer.erase(it++);
        }
        else
        {
            ++it;
        }
    }

}

 

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.