Summex 69 Posted November 21, 2018 Share Posted November 21, 2018 (edited) Hey guys! I've been trying to compile a clean version of the mainline_released source on a 64bit FreeBSD Machine using a chroot / jail. I think I got everything set up correctly and am able to compile the source, however when I do compile I get the following error: Edit: adding #include <stdlib.h> to SIM.h in libserverkey (fixed?) this error The new error now is: I already recieved a bunch of errors before which I were able to fix. I am compiling with g++49. The only changes to the source are removed time bomb / license. If anyone knows how to fix this error, I'd be grateful as for now I have run out of ideas and google isn't being helpful. SpoilerSpoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted November 21, 2018 Premium Share Posted November 21, 2018 remove Metin2Server_Check(); from main.cpp it's useless Spoiler void Metin2Server_Check() { #ifdef _USE_SERVER_KEY_ if (false == CheckServer::CheckIp(g_szPublicIP)) { #ifdef _WIN32 fprintf(stderr, "check ip failed\n"); #endif g_isInvalidServer = true; } return; #endif if (LC_IsEurope() || test_server) return; // 브라질 ip if (strncmp (g_szPublicIP, "189.112.1", 9) == 0) { return; } // 캐나다 ip if (strncmp (g_szPublicIP, "74.200.6", 8) == 0) { return; } return; static const size_t CheckServerListSize = 1; static const char* CheckServerList[] = { "202.31.178.251"}; static const int CheckServerPort = 7120; socket_t sockConnector = INVALID_SOCKET; for (size_t i = 0 ; i < CheckServerListSize ; i++) { sockConnector = socket_connect( CheckServerList[i], CheckServerPort ); if (0 < sockConnector) break; } if (0 > sockConnector) { if (true != LC_IsEurope()) // 유럽은 접속을 하지 못하면 인증된 것으로 간주 g_isInvalidServer = true; return; } char buf[256] = { 0, }; socket_read(sockConnector, buf, sizeof(buf) - 1); sys_log(0, "recv[%s]", buf); if (strncmp(buf, "OK", 2) == 0) g_isInvalidServer = false; else if (strncmp(buf, "CK", 2) == 0) g_isInvalidServer = true; socket_close(sockConnector); } 1 Link to comment Share on other sites More sharing options...
Summex 69 Posted November 21, 2018 Author Share Posted November 21, 2018 (edited) vor 42 Minuten schrieb Shelby: remove Metin2Server_Check(); from main.cpp it's useless Unsichtbaren Inhalt anzeigen void Metin2Server_Check() { #ifdef _USE_SERVER_KEY_ if (false == CheckServer::CheckIp(g_szPublicIP)) { #ifdef _WIN32 fprintf(stderr, "check ip failed\n"); #endif g_isInvalidServer = true; } return; #endif if (LC_IsEurope() || test_server) return; // 브라질 ip if (strncmp (g_szPublicIP, "189.112.1", 9) == 0) { return; } // 캐나다 ip if (strncmp (g_szPublicIP, "74.200.6", 8) == 0) { return; } return; static const size_t CheckServerListSize = 1; static const char* CheckServerList[] = { "202.31.178.251"}; static const int CheckServerPort = 7120; socket_t sockConnector = INVALID_SOCKET; for (size_t i = 0 ; i < CheckServerListSize ; i++) { sockConnector = socket_connect( CheckServerList[i], CheckServerPort ); if (0 < sockConnector) break; } if (0 > sockConnector) { if (true != LC_IsEurope()) // 유럽은 접속을 하지 못하면 인증된 것으로 간주 g_isInvalidServer = true; return; } char buf[256] = { 0, }; socket_read(sockConnector, buf, sizeof(buf) - 1); sys_log(0, "recv[%s]", buf); if (strncmp(buf, "OK", 2) == 0) g_isInvalidServer = false; else if (strncmp(buf, "CK", 2) == 0) g_isInvalidServer = true; socket_close(sockConnector); } I thought I had already done that, but it seems that I've missed a line! That error is now gone, thanks for that However a new one comes up when linking (hopefully the last): Spoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium filipw1 1926 Posted November 21, 2018 Premium Share Posted November 21, 2018 Delete from game makefile everything related to serverkey 1 Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted November 21, 2018 Premium Share Posted November 21, 2018 (edited) 5 minutes ago, Summex said: I thought I had already done that, but it seems that I've missed a line! That error is now gone, thanks for that However a new one comes up when linking (hopefully the last): remove test.cpp Spoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Summex 69 Posted November 21, 2018 Author Share Posted November 21, 2018 (edited) Ofcourse! *facepalm* Alright, I deleted all the references in the makefile. But those don't seem to be the only ones. I already tried deleting the corresponding line on the next error but that just led to more and more errors, deleting etc so I thought it was a better Idea to restore the files and ask you guys. Edit: Actually this is the error when all the files are restored: The other image shows what happens when I delete this TOKEN("server_key") { CheckServer::AddServerKey(value_string); continue; } in config.cpp SpoilerSpoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted November 21, 2018 Premium Share Posted November 21, 2018 (edited) 4 minutes ago, Summex said: Ofcourse! *facepalm* Alright, I deleted all the references in the makefile. But those don't seem to be the only ones. I already tried deleting the corresponding line on the next error but that just led to more and more errors, deleting etc so I thought it was a better Idea to restore the files and ask you guys. add in makefile INCDIR += -I../../libserverkey Spoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Summex 69 Posted November 21, 2018 Author Share Posted November 21, 2018 vor 2 Minuten schrieb Shelby: add in makefile INCDIR += -I../../libserverkey That doesnt change anything about the error from the second image Did you see that one? I just edited the post Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted November 21, 2018 Premium Share Posted November 21, 2018 why you deleted the libserverky and checks, if someone says a shit, it means something goes wrong. Edit: I know, it's useless on freebsd but on windows not. Link to comment Share on other sites More sharing options...
Summex 69 Posted November 21, 2018 Author Share Posted November 21, 2018 vor 3 Minuten schrieb Shelby: why you deleted the libserverky and checks, if someone says a shit, it means something goes wrong. i restored the makefile with the libserverkey part, the error posted is still the one that shows up Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted November 21, 2018 Premium Share Posted November 21, 2018 (edited) 2 minutes ago, Summex said: i restored the makefile with the libserverkey part, the error posted is still the one that shows up Spoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Summex 69 Posted November 21, 2018 Author Share Posted November 21, 2018 (edited) On 11/21/2018 at 9:21 PM, Shelby said: This one? No, this one: Spoiler Spoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted November 21, 2018 Premium Share Posted November 21, 2018 (edited) 2 minutes ago, Summex said: No, this one: #include "check_server.h" in config.cpp Spoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Summex 69 Posted November 21, 2018 Author Share Posted November 21, 2018 vor 17 Minuten schrieb Shelby: #include "check_server.h" in config.cpp ah yes, i had removed that one at some earlier point. Now it gave me the malloc_options error again which I fixed with what you had posted earlier. Then I could compile the game ! Thanks now when compiling the db I got the malloc_option error aswell. I fixed that one the same way (had to delete 1 line from main.cpp). And was able to execute gmake all with no errors. Thanks a lot for the help. Link to comment Share on other sites More sharing options...
Premium filipw1 1926 Posted November 21, 2018 Premium Share Posted November 21, 2018 58 minut temu, Shelby napisał: why you deleted the libserverky and checks, if someone says a shit, it means something goes wrong. Edit: I know, it's useless on freebsd but on windows not. What do you mean? Metin2 server on Windows is good only because of Visual Studio, but I can't see reason why he should keep useless code that only makes problems happen. I mean he didn't ask for help with compiling anything on Windows. So keep your shit talks for you. I don't know if deleting malloc is a good idea, if I were you I would try to fix that Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now