Jump to content

Trying to build on Debian GNU/kFreeBSD AMD64


Guest tux9656

Recommended Posts

Hello,

I am trying to build mangos on Debian GNU/kFreeBSD AMD64 6.0/testing. Make reports an error of an unknown platform. See output from make below. Is there a simple way to allow the build process to recognize this platform. If not, is there a simple way to fool the build process into recognizing the system as a GNU/Linux system? Thanks.

make  all-recursive
make[1]: Entering directory `/home/tux9656/src/mangos/objdir'
Making all in dep
make[2]: Entering directory `/home/tux9656/src/mangos/objdir/dep'
Making all in include
make[3]: Entering directory `/home/tux9656/src/mangos/objdir/dep/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/tux9656/src/mangos/objdir/dep/include'
Making all in lib
make[3]: Entering directory `/home/tux9656/src/mangos/objdir/dep/lib'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/tux9656/src/mangos/objdir/dep/lib'
Making all in src
make[3]: Entering directory `/home/tux9656/src/mangos/objdir/dep/src'
Making all in g3dlite
make[4]: Entering directory `/home/tux9656/src/mangos/objdir/dep/src/g3dlite'
 CXX    AABox.o
In file included from ../../../../dep/src/g3dlite/AABox.cpp:10:
../../../../dep/src/g3dlite/../../include/g3dlite/G3D/platform.h:60:6: error: #error Unknown platform
make[4]: *** [AABox.o] Error 1
make[4]: Leaving directory `/home/tux9656/src/mangos/objdir/dep/src/g3dlite'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/tux9656/src/mangos/objdir/dep/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tux9656/src/mangos/objdir/dep'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tux9656/src/mangos/objdir'
make: *** [all] Error 2

Link to comment
Share on other sites

I did realize that I need to add the proper conditions to platform.h, but I guess I forgot to mention that I'm not much of a programmer although I do have an understanding of computer programming and can write simple C/C++ programs. Upon taking a closer look at the code I figured it may work to comment out lines 59 and 60 as seen in the code section below. However, the build now fails with numerous errors in dep/src/g3dlite/System.cpp, so it seems like it might be that it will not work on this platform at all. I guess I am a little out of my league here. Thanks for the help. Perhaps I should pick up a good C++ book.

#else
   #error Unknown platform

Link to comment
Share on other sites

Hm seems that kFreeBSD has a bit of a Frankenstein character...kernel is FreeBSD, rest is GNU (including glibc) so it's hard to say if you shall treat it as BSD or GNU/Linux when it comes to compiling, chances are neither works.

But it seems that you should more treat it like Linux, that's how i interpreted the Debian guys, it is as GNU-Linux like as possible to make most Debian Linux packages compile with it.

Still, the problem is that there doesn't seem to be an easy way to identify kFreeBSD via preprocessor macros :/

Some suggested to test for "#ifdef __GLIBC__" but it wasn't quite clear to me if gcc predefines it, or if you need to include a special header first, apparently this was changed at some point, but i didn't find out from which to which.

Maybe just try "#elif defined(__linux__) || defined(__GLIBC__)" in line 51...

Link to comment
Share on other sites

×
×
  • 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