• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Error compiling on Ubuntu 16.04

VaizardX

New Member
Joined
May 13, 2015
Messages
19
Reaction score
1
Hello, i tried to compile the OTClient at Ubuntu 16.04, but any sucess
I've tried the GitHub tutorial (Compiling on Linux · edubart/otclient Wiki · GitHub). But any sucess

when i do make, that error appears:

Code:
vaizardx@pc:/poke/otc/build$ sudo chmod 777 -R /poke/
vaizardx@pc:/poke/otc/build$ make
[  1%] Building CXX object CMakeFiles/otclient.dir/src/framework/util/crypt.cpp.o
/poke/otc/src/framework/util/crypt.cpp: In member function ‘void Crypt::rsaGenerateKey(int, int)’:
/poke/otc/src/framework/util/crypt.cpp:315:56: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     g_logger.info(std::string("p = ") + BN_bn2dec(m_rsa->p));
                                                        ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:316:56: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     g_logger.info(std::string("q = ") + BN_bn2dec(m_rsa->q));
                                                        ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:317:56: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     g_logger.info(std::string("d = ") + BN_bn2dec(m_rsa->d));
                                                        ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:318:56: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     g_logger.info(std::string("n = ") + BN_bn2dec(m_rsa->n));
                                                        ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:319:56: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     g_logger.info(std::string("e = ") + BN_bn2dec(m_rsa->e));
                                                        ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp: In member function ‘void Crypt::rsaSetPublicKey(const string&, const string&)’:
/poke/otc/src/framework/util/crypt.cpp:326:21: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     BN_dec2bn(&m_rsa->n, n.c_str());
                     ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:327:21: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     BN_dec2bn(&m_rsa->e, e.c_str());
                     ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:330:13: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_n) { BN_MONT_CTX_free(m_rsa->_method_mod_n); m_rsa->_method_mod_n = NULL; }
             ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:330:54: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_n) { BN_MONT_CTX_free(m_rsa->_method_mod_n); m_rsa->_method_mod_n = NULL; }
                                                      ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:330:77: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_n) { BN_MONT_CTX_free(m_rsa->_method_mod_n); m_rsa->_method_mod_n = NULL; }
                                                                             ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp: In member function ‘void Crypt::rsaSetPrivateKey(const string&, const string&, const string&)’:
/poke/otc/src/framework/util/crypt.cpp:335:21: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     BN_dec2bn(&m_rsa->p, p.c_str());
                     ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:336:21: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     BN_dec2bn(&m_rsa->q, q.c_str());
                     ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:337:21: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     BN_dec2bn(&m_rsa->d, d.c_str());
                     ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:340:13: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_p) { BN_MONT_CTX_free(m_rsa->_method_mod_p); m_rsa->_method_mod_p = NULL; }
             ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:340:54: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_p) { BN_MONT_CTX_free(m_rsa->_method_mod_p); m_rsa->_method_mod_p = NULL; }
                                                      ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:340:77: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_p) { BN_MONT_CTX_free(m_rsa->_method_mod_p); m_rsa->_method_mod_p = NULL; }
                                                                             ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:341:13: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_q) { BN_MONT_CTX_free(m_rsa->_method_mod_q); m_rsa->_method_mod_q = NULL; }
             ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:341:54: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_q) { BN_MONT_CTX_free(m_rsa->_method_mod_q); m_rsa->_method_mod_q = NULL; }
                                                      ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:341:77: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
     if(m_rsa->_method_mod_q) { BN_MONT_CTX_free(m_rsa->_method_mod_q); m_rsa->_method_mod_q = NULL; }
                                                                             ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
In file included from /usr/include/openssl/asn1.h:24:0,
                 from /usr/include/openssl/rsa.h:16,
                 from /poke/otc/src/framework/util/crypt.cpp:35:
/poke/otc/src/framework/util/crypt.cpp: In member function ‘bool Crypt::rsaCheckKey()’:
/poke/otc/src/framework/util/crypt.cpp:352:21: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
         BN_mod(m_rsa->dmp1, m_rsa->d, r1, ctx);
                     ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
In file included from /usr/include/openssl/asn1.h:24:0,
                 from /usr/include/openssl/rsa.h:16,
                 from /poke/otc/src/framework/util/crypt.cpp:35:
/poke/otc/src/framework/util/crypt.cpp:352:34: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
         BN_mod(m_rsa->dmp1, m_rsa->d, r1, ctx);
                                  ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
In file included from /usr/include/openssl/asn1.h:24:0,
                 from /usr/include/openssl/rsa.h:16,
                 from /poke/otc/src/framework/util/crypt.cpp:35:
/poke/otc/src/framework/util/crypt.cpp:353:21: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
         BN_mod(m_rsa->dmq1, m_rsa->d, r2, ctx);
                     ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
In file included from /usr/include/openssl/asn1.h:24:0,
                 from /usr/include/openssl/rsa.h:16,
                 from /poke/otc/src/framework/util/crypt.cpp:35:
/poke/otc/src/framework/util/crypt.cpp:353:34: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
         BN_mod(m_rsa->dmq1, m_rsa->d, r2, ctx);
                                  ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:355:29: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
         BN_mod_inverse(m_rsa->iqmp, m_rsa->q, m_rsa->p, ctx);
                             ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:355:42: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
         BN_mod_inverse(m_rsa->iqmp, m_rsa->q, m_rsa->p, ctx);
                                          ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
/poke/otc/src/framework/util/crypt.cpp:355:52: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
         BN_mod_inverse(m_rsa->iqmp, m_rsa->q, m_rsa->p, ctx);
                                                    ^
In file included from /poke/otc/src/framework/util/crypt.cpp:23:0:
/poke/otc/src/framework/util/crypt.h:31:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
                ^
CMakeFiles/otclient.dir/build.make:110: recipe for target 'CMakeFiles/otclient.dir/src/framework/util/crypt.cpp.o' failed
make[2]: *** [CMakeFiles/otclient.dir/src/framework/util/crypt.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/otclient.dir/all' failed
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
vaizardx@pc:/poke/otc/build$

Someone can help me?
Thanks in advance :)
 
What version of OpenSSL are you using? You can find it with:
$ openssl version -a
 
What version of OpenSSL are you using? You can find it with:
$ openssl version -a

vaizardx@pc:~$ openssl version -a
OpenSSL 1.1.1-dev xx XXX xxxx
built on: reproducible build, date unspecified
platform: linux-x86_64
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -Wa,--noexecstack
OPENSSLDIR: "/usr/local/ssl"
ENGINESDIR: "/usr/local/lib/engines-1.1"
Seeding source: os-specific
 
Code:
OpenSSL 1.1.0f  25 May 2017
built on: reproducible build, date unspecified
platform: debian-amd64
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/lib/ssl\"" -DENGINESDIR="\"/usr/lib/x86_64-linux-gnu/engines-1.1\""
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-1.1"
 
otclient is not compatible with OpenSSL 1.1.x, it's only compatible with 1.0.x
otclient uses OpenSSL only in one place and it can be replaced by 40 lines of C++ code. I decided to do something to remove OpenSSL from otclient, because I also have problem to compile it on Debian based system.

I wrote RSA implementation based on forgottenserver implementation (C++ with GMP library in place of OpenSSL).
ranisalt made changes in otclient with my RSA implementation in place of OpenSSL implemetation and all other required changes (removed OpenSSL from project).

You can be first to test, if it works: https://github.com/edubart/otclient/archive/a3bdfd911a38874b77a2e530a719aebad85c46fb.zip
It's not yet merged to 'master' branch on github ( GitHub - edubart/otclient at a3bdfd911a38874b77a2e530a719aebad85c46fb ), but there is pull request:
WIP: Replace OpenSSL with GMP for RSA by ranisalt · Pull Request #888 · edubart/otclient · GitHub
 
Thank you Gesior.pl
I was having the same problem using Kali and your RSA implementation fixed it. This should be merged with the master branch.

Edit: I'm not sure why but it seems that I cannot connect to any server, I keep getting "login error" "your connection has been lost. Either your network or the server went down. (ERROR 2)"
 
Last edited:
Back
Top