Jump to content

[M0] MaNGOS for FreeBSD


wolverine

Recommended Posts

Hullo, all. I recently got involved in a post regarding the discontinuation of the group development of MaNGOS 0 and this topic led to my working on M0 for FreeBSD.

I figured that everyone would be at least intrigued by the idea of MaNGOS becoming available on yet another *NIX branch. This thread is going to be where questions are answered for M0BSD, yes, all of my research will eventually be merged into MaNGOS, and status reports will be issued as progress is made. I am not splitting off and making a new core. Just MaNGOS for FreeBSD. :)

As for our first progress report, we, [MENTION=1014]lfxgroove[/MENTION] and myself, managed to fix a minor glitch in the g3dlite library required for compiling MaNGOS 0. The next thing that I want to do is make a M0BSD repo for myself which, of course, will be publicly available on github, that we can modify as necessary for FreeBSD compatibility.

Right now, we have run into a minor issue of BSD not supporting lseek64() for mpqlite. We are trying to figure out whether to try using lseek() instead of lseek64() in the mpqlite libraries or whether we should just port lseek64() from linux to BSD. More to come later. :)

Link to comment
Share on other sites

Alright. I have gotten us to the vmap-assembler, and then things went all scary again, talk about files that don't exist or exist in one place permanently, but also only exist in another folder at compile time only. And there are no line references or anything, so it's almost as if the out file is getting mucked up.

Either way, we are at approximately 29% compilable at this time. :) YAY! When I first started, it wouldn't even pass any of the functionality checks.

EDIT@16:25: Alrighty. Well, even though it is only 29% compilable at this time, I have uploaded what I have so far to github. Perhaps somebody else can figure out the issue with vmaps and maps. Either way, here is the link to the BSD Repo, and like I said, everything there is still from the master M0 branch. Right now, the only changes I made were some OS precompiler checks to make it work with BSD. :)

EDIT@17:06: *SIGH* I finally found out where the break was happening within the sourcecode, but I know absolutely nothing about the ACE source code, so, so far this problem is completely eluding me. :(

Link to comment
Share on other sites

Alright. I have been warring with this for two days now.

As near as I can tell, ACE 6.2.0 is NOT compatible with M0, unless we rewrite all of the ACE related stuff in M0 to be compatible with the latest ACE Wrappers.

The only way that I can think of to test this is to try it out on my Win Box with ACE 6.2.0 and see what happens. It also does not help any that there is no easy way to compile ACE under *NIX as there is no make file and no configure file no nothing for *NIX. :(

Either way, I thought that everyone would like to know where this project stands. And as usual, if anyone has any input on the immediate issue, please feel free to post it. :)

Link to comment
Share on other sites

Hrm. Thanks for the information, Antz. I've done a lot with Windows and have never run into this problem. Usually, as an example, DirectX9 stuff will still compile on Windows 8 with DirectX11 being the only DX library installed. So I am at a total loss why UNIX would be so drastically different about it. I mean, 6.0.8 calls should still be supported in 6.2.0.

Would you happen to have any suggestions as to how to fix this issue of 6.0.8 being defaulted or is there somewhere that I can tell MaNGOS to use ACE 6.2.0? CMake finds ACE 6.2.0 beautifully, but MaNGOS refuses to compile against 6.2.0 for some reason and I can't figure out how to build ACE under UNIX. ACTUALLY...! Does anyone have a precompiled AcE 6.0.8 so library set for FreeBSD that they could email me or something? Just an idea that came from my neck. ;)

EDIT: I'm looking into autoconf and automake instead of cmake as there are no cmake files included with ACE.

Link to comment
Share on other sites

I'm not familiar with M0 but I am familiar with getting M3 running on FreeBSD. Maybe I can help a little bit with the problem you're running into. Are you using FreeBSD 10? If so the ACE wrappers included in the mangos repo (at least for THREE) will not configure without adding the --enable-exceptions=no argument. If you do that, they should compile fine afterwards and maybe that'll give you the version of ACE you're looking for? Like I said I haven't looked at M0 or ever tried to get it to compile but maybe that'll help you.

Link to comment
Share on other sites

This may have just become a tomorrow project for me. ;) LOL

It's 22:40 hours here and I just got openssl 1.0.1_12 installed. I can't believe I forgot about installing openssl... And was going to run another make and see how far we get, but I'm also looking forward to trying out the --enable-exceptions-no argument you talked about, bels. My only question is is the argument you mentioned for cmake for when you install ACE?

EDIT: Well, as for tonite's build, no luck whatsoever. Still broke in the exact same spot as usual...

Linking CXX executable ../../../bin/vmap-assembler
../../../lib/libmangos-shared.a(Log.cpp.o): In function `Log::outWorldPacketDump(unsigned int, unsigned int, char const*, ByteBuffer const*, bool)':
Log.cpp:(.text+0x1998): undefined reference to `ACE_Thread_Mutex::acquire()'
Log.cpp:(.text+0x1aa7): undefined reference to `ACE_Thread_Mutex::release()'
Log.cpp:(.text+0x1aff): undefined reference to `ACE_Thread_Mutex::release()'
../../../lib/libmangos-shared.a(Log.cpp.o): In function `Log::WaitBeforeContinueIfNeed()':
Log.cpp:(.text+0x28e1): undefined reference to `ACE_OS::sleep(unsigned int)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `ACE_TSS<MTRand>::ts_get() const [clone .constprop.61]':
Util.cpp:(.text+0x2d): undefined reference to `ACE_Thread_Mutex::acquire()'
Util.cpp:(.text+0x4d): undefined reference to `ACE_Thread_Mutex::release()'
Util.cpp:(.text+0x69): undefined reference to `ACE_Thread::getspecific(int, void**)'
Util.cpp:(.text+0x92): undefined reference to `ACE_Thread::keycreate(int*, void (*)(void*))'
Util.cpp:(.text+0xd1): undefined reference to `ACE_Thread::setspecific(int, void*)'
Util.cpp:(.text+0x10d): undefined reference to `ACE_Log_Category_TSS::conditional_set(char const*, int, int, int)'
Util.cpp:(.text+0x125): undefined reference to `ACE_Log_Category_TSS::log(ACE_Log_Priority, char const*, ...)'
Util.cpp:(.text+0x148): undefined reference to `ACE_Thread_Mutex::release()'
Util.cpp:(.text+0x161): undefined reference to `ACE_Thread_Mutex::release()'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `WorldTimer::tick()':
Util.cpp:(.text+0x1c7): undefined reference to `operator-(ACE_Time_Value const&, ACE_Time_Value const&)'
Util.cpp:(.text+0x1d3): undefined reference to `ACE_Time_Value::msec(unsigned long long&)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `WorldTimer::getMSTime()':
Util.cpp:(.text+0x28d): undefined reference to `operator-(ACE_Time_Value const&, ACE_Time_Value const&)'
Util.cpp:(.text+0x299): undefined reference to `ACE_Time_Value::msec(unsigned long long&)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `WorldTimer::getMSTime_internal(bool)':
Util.cpp:(.text+0x32d): undefined reference to `operator-(ACE_Time_Value const&, ACE_Time_Value const&)'
Util.cpp:(.text+0x339): undefined reference to `ACE_Time_Value::msec(unsigned long long&)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `IsIPAddress(char const*)':
Util.cpp:(.text+0x1152): undefined reference to `ACE_OS::__inet_addr(char const*)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `ACE_TSS<MTRand>::~ACE_TSS()':
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0x2c): undefined reference to `ACE_Thread::getspecific(int, void**)'
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0x49): undefined reference to `ACE_Thread::setspecific(int, void*)'
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0xc0): undefined reference to `ACE_Log_Category_TSS::conditional_set(char const*, int, int, int)'
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0xd8): undefined reference to `ACE_Log_Category_TSS::log(ACE_Log_Priority, char const*, ...)'
collect2: error: ld returned 1 exit status
*** Error code 1

Stop.
make[2]: stopped in /usr/home/wolverine/mangos/server/obj
*** Error code 1

Stop.
make[1]: stopped in /usr/home/wolverine/mangos/server/obj
*** Error code 1

Stop.
make: stopped in /usr/home/wolverine/mangos/server/obj

Link to comment
Share on other sites

I did make the change to the CMakeLists.txt file for the ACE wrappers directory because I use the cmake process setup for Three to compile the ACE wrappers. Now this will only fix the build problem of getting stuck at "checking to see if exception is thrown for bad_alloc" (or something to that effect). If you're not getting stuck there and the ACE wrappers are failing for some other reason let me know. I am assuming that Zero uses a cmake build process like Three where you can specify whether or not to use an external ACE or not.

Link to comment
Share on other sites

This may have just become a tomorrow project for me. ;) LOL

It's 22:40 hours here and I just got openssl 1.0.1_12 installed. I can't believe I forgot about installing openssl... And was going to run another make and see how far we get, but I'm also looking forward to trying out the --enable-exceptions-no argument you talked about, bels. My only question is is the argument you mentioned for cmake for when you install ACE?

EDIT: Well, as for tonite's build, no luck whatsoever. Still broke in the exact same spot as usual...

Linking CXX executable ../../../bin/vmap-assembler
../../../lib/libmangos-shared.a(Log.cpp.o): In function `Log::outWorldPacketDump(unsigned int, unsigned int, char const*, ByteBuffer const*, bool)':
Log.cpp:(.text+0x1998): undefined reference to `ACE_Thread_Mutex::acquire()'
Log.cpp:(.text+0x1aa7): undefined reference to `ACE_Thread_Mutex::release()'
Log.cpp:(.text+0x1aff): undefined reference to `ACE_Thread_Mutex::release()'
../../../lib/libmangos-shared.a(Log.cpp.o): In function `Log::WaitBeforeContinueIfNeed()':
Log.cpp:(.text+0x28e1): undefined reference to `ACE_OS::sleep(unsigned int)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `ACE_TSS<MTRand>::ts_get() const [clone .constprop.61]':
Util.cpp:(.text+0x2d): undefined reference to `ACE_Thread_Mutex::acquire()'
Util.cpp:(.text+0x4d): undefined reference to `ACE_Thread_Mutex::release()'
Util.cpp:(.text+0x69): undefined reference to `ACE_Thread::getspecific(int, void**)'
Util.cpp:(.text+0x92): undefined reference to `ACE_Thread::keycreate(int*, void (*)(void*))'
Util.cpp:(.text+0xd1): undefined reference to `ACE_Thread::setspecific(int, void*)'
Util.cpp:(.text+0x10d): undefined reference to `ACE_Log_Category_TSS::conditional_set(char const*, int, int, int)'
Util.cpp:(.text+0x125): undefined reference to `ACE_Log_Category_TSS::log(ACE_Log_Priority, char const*, ...)'
Util.cpp:(.text+0x148): undefined reference to `ACE_Thread_Mutex::release()'
Util.cpp:(.text+0x161): undefined reference to `ACE_Thread_Mutex::release()'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `WorldTimer::tick()':
Util.cpp:(.text+0x1c7): undefined reference to `operator-(ACE_Time_Value const&, ACE_Time_Value const&)'
Util.cpp:(.text+0x1d3): undefined reference to `ACE_Time_Value::msec(unsigned long long&)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `WorldTimer::getMSTime()':
Util.cpp:(.text+0x28d): undefined reference to `operator-(ACE_Time_Value const&, ACE_Time_Value const&)'
Util.cpp:(.text+0x299): undefined reference to `ACE_Time_Value::msec(unsigned long long&)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `WorldTimer::getMSTime_internal(bool)':
Util.cpp:(.text+0x32d): undefined reference to `operator-(ACE_Time_Value const&, ACE_Time_Value const&)'
Util.cpp:(.text+0x339): undefined reference to `ACE_Time_Value::msec(unsigned long long&)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `IsIPAddress(char const*)':
Util.cpp:(.text+0x1152): undefined reference to `ACE_OS::__inet_addr(char const*)'
../../../lib/libmangos-shared.a(Util.cpp.o): In function `ACE_TSS<MTRand>::~ACE_TSS()':
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0x2c): undefined reference to `ACE_Thread::getspecific(int, void**)'
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0x49): undefined reference to `ACE_Thread::setspecific(int, void*)'
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0xc0): undefined reference to `ACE_Log_Category_TSS::conditional_set(char const*, int, int, int)'
Util.cpp:(.text._ZN7ACE_TSSI6MTRandED2Ev[_ZN7ACE_TSSI6MTRandED5Ev]+0xd8): undefined reference to `ACE_Log_Category_TSS::log(ACE_Log_Priority, char const*, ...)'
collect2: error: ld returned 1 exit status
*** Error code 1

Stop.
make[2]: stopped in /usr/home/wolverine/mangos/server/obj
*** Error code 1

Stop.
make[1]: stopped in /usr/home/wolverine/mangos/server/obj
*** Error code 1

Stop.
make: stopped in /usr/home/wolverine/mangos/server/obj

Is this with the ACE that is included in the project or the one from ports?

Link to comment
Share on other sites

I'm going to assume ports. I'm still trying to remember all my BSD stuff so please forgive me if something I say sounds really dumb. Any way, I used the pkg install command to install ACE. I'm going to assume that it's a port. And as for the internal or external ACE, I really don't remember there being one included in M0. I'll double-check, of course. But for now, it's against the external ACE.

EDIT: As near as I can tell, there is no included ACE in M0. Just went through the entire file structure manually and never found anything pertaining to ace. :(

Link to comment
Share on other sites

That is a bummer about ACE not being included with M0. The one from ports (which is what you installed if you used the pkg system) does not work with Mangos. I have never gotten it to work, nor have I tried very hard since the one from Three works just fine and compiles. I wonder if you can take the one from Three?

Link to comment
Share on other sites

Thanks for the idea, bels. :)

EDIT: Sorry about moving this thread around so much. Originally, it seemed like a good idea to keep it in announcements, but then I got some PMs about people not being able to reply, unless they were Moderators. So, I've been trying to find a place where we can all work on this together. Hopefully community input will be the last move. :(

Link to comment
Share on other sites

Well! After two hours of following [MENTION=3709]rage_311[/MENTION]'s notes, we have both managed to get MaNGOS 0 R19 to compile under FreeBSD 10. However! And there seems to always be a however on this topic, we cannot get MaNGOS 0 to actually execute. It simply turns around and give a segfault. Here's the output:

[wolverine@bsdserver ~/mangos-server/bin]$ ./realmd
Segmentation fault (core dumped)
[wolverine@bsdserver ~/mangos-server/bin]$

Now, my thinking here is that there is something that we need to do, possibly the elf port, to make this run as it was compiled with gcc47 and gmake instead of clang which would have made it a totally native program to BSD. Hopefully that will happen some day soon.

Just keeping everyone apprised of our current status here.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use