Linux Compilation

EduardoDantas

Intermediate OT User
Joined
Sep 25, 2013
Messages
100
Best answers
2
Reaction score
49
Location
Brazil
Hi. Good evening guys.
Sorry if it sounds like a stupid question, though, I'm having trouble compiling on linux (ubuntu) and would like to know if anyone knows how to resolve these errors.
On windows it normally goes, however I do not handle much of cmake and linux compilation, I have now started to mess with this S.O.

Code:
/src/signals.cpp:87: undefined reference to `Signals::sigintHandler()'
CMakeFiles/tfs.dir/src/rsa.cpp.o: In function `RSA::RSA()':
/src/rsa.cpp:26: undefined reference to `__gmpz_init'
CMakeFiles/tfs.dir/src/rsa.cpp.o: In function `RSA::~RSA()':
/src/rsa.cpp:32: undefined reference to `__gmpz_clear'
CMakeFiles/tfs.dir/src/rsa.cpp.o: In function `RSA::setKey(char const*, char const*)':
/src/rsa.cpp:39: undefined reference to `__gmpz_init2'
/src/rsa.cpp:40: undefined reference to `__gmpz_init2'
/src/rsa.cpp:41: undefined reference to `__gmpz_init'
/src/rsa.cpp:43: undefined reference to `__gmpz_set_str'
/src/rsa.cpp:44: undefined reference to `__gmpz_set_str'
/src/rsa.cpp:47: undefined reference to `__gmpz_set_ui'
/src/rsa.cpp:50: undefined reference to `__gmpz_mul'
/src/rsa.cpp:53: undefined reference to `__gmpz_init2'
/src/rsa.cpp:54: undefined reference to `__gmpz_init2'
/src/rsa.cpp:55: undefined reference to `__gmpz_init2'
/src/rsa.cpp:57: undefined reference to `__gmpz_sub_ui'
/src/rsa.cpp:58: undefined reference to `__gmpz_sub_ui'
/src/rsa.cpp:61: undefined reference to `__gmpz_mul'
/src/rsa.cpp:64: undefined reference to `__gmpz_invert'
/src/rsa.cpp:66: undefined reference to `__gmpz_clear'
/src/rsa.cpp:67: undefined reference to `__gmpz_clear'
/src/rsa.cpp:68: undefined reference to `__gmpz_clear'
/src/rsa.cpp:70: undefined reference to `__gmpz_clear'
/src/rsa.cpp:71: undefined reference to `__gmpz_clear'
CMakeFiles/tfs.dir/src/rsa.cpp.o:/src/rsa.cpp:72: more undefined references to `__gmpz_clear' follow
CMakeFiles/tfs.dir/src/rsa.cpp.o: In function `RSA::decrypt(char*) const':
/src/rsa.cpp:78: undefined reference to `__gmpz_init2'
/src/rsa.cpp:79: undefined reference to `__gmpz_init2'
/src/rsa.cpp:81: undefined reference to `__gmpz_import'
/src/rsa.cpp:84: undefined reference to `__gmpz_powm'
/src/rsa.cpp:86: undefined reference to `__gmpz_sizeinbase'
/src/rsa.cpp:88: undefined reference to `__gmpz_export'
/src/rsa.cpp:90: undefined reference to `__gmpz_clear'
/src/rsa.cpp:91: undefined reference to `__gmpz_clear'
CMakeFiles/tfs.dir/src/rsa.cpp.o: In function `RSA::RSA()':
/src/rsa.cpp:27: undefined reference to `__gmpz_init2'
CMakeFiles/tfs.dir/src/rsa.cpp.o: In function `RSA::~RSA()':
/src/rsa.cpp:33: undefined reference to `__gmpz_clear'
collect2: error: ld returned 1 exit status
make[2]: * [tfs] Error 1
make[1]: * [CMakeFiles/tfs.dir/all] Error 2
make: * [all] Error 2
 
OP
EduardoDantas

EduardoDantas

Intermediate OT User
Joined
Sep 25, 2013
Messages
100
Best answers
2
Reaction score
49
Location
Brazil
Thanks for the response and for the help.
I know it's a bit of a question, but as I mentioned, I'm starting linux and everything is too different from windows.
Many thanks, I will install the libs and if everything works return here with the answer.
 
OP
EduardoDantas

EduardoDantas

Intermediate OT User
Joined
Sep 25, 2013
Messages
100
Best answers
2
Reaction score
49
Location
Brazil
Even installing the libs did not work.
I was surprised because I have another source that I have compiled normally and it has rsa.cpp and rsa.h the same as the one I am trying to compile.

Any idea what that might be?
PS: This happened after I added the revscripts:

# 2558:

# 2569 https://github.com/otland/forgottenserver/commit/38eb0cde9eb579765a7e9588eb3d2143dd55a19

# 2571

But, compiling normal at windows
 
OP
EduardoDantas

EduardoDantas

Intermediate OT User
Joined
Sep 25, 2013
Messages
100
Best answers
2
Reaction score
49
Location
Brazil
Sorry for the blunder, it was just registering the $ {GMP_LIBRARIES}

Solved
 
Top