Author Topic: FIXED: [Linux] Cannot compile Inferno Build (for TBP)  (Read 3062 times)

0 Members and 1 Guest are viewing this topic.

Offline Nordwin

  • 25
FIXED: [Linux] Cannot compile Inferno Build (for TBP)
Hi guys.
I am currently running Debian "Lenny" in my Desktop (kernel: 2.6.26) and I have the following problem:
I am a fan of Babylon 5, that's why I play TBP. Now some TBP-campaigns require an Inferno build. Since I haven't found a pre-compiled inferno build for Linux, I thought that I might try to compile my own. So I downloaded the source tarball  from here (3.6.9 final), unpacked it und tried to compile.. oh, as a sidenote: I think I only need the binary of the INF build, but since
a) I don't even know what I am really compiling here (it might be just the binary)
b) if there is a way to just compile the binary, I have been unable to find it
I decided to just try to compile the whole thing.

"./configure -enable-inferno" worked well, and told me which dependencies I still need. after installing those, it finished without error..
so then I tried "make"..
first of all, that told me that "INT_MAX" wasn't defined, so I replaced INT_MAX in the /ai/aiturret.cpp with the max value of integers in 32-bit systems (which is 2147483647, iirc)
the next error was that the /theora/theora.h and the /vorbis/codec.h were missing.. so I downloaded the dev packages for both of those and placed symbolic links in the respective folders... that fixed that error...
then /AL/al.h and /AL/alc.h were missing, so I added those as well...

but now I have an error without a missing file...:

Code: [Select]
XXXX@XXXXX:~/fs2_open/fs2_open-3.6.9$ make
Making all in libjpeg
make[1]: Entering directory `/home/XXXX/fs2_open/fs2_open-3.6.9/libjpeg'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/XXXX/fs2_open/fs2_open-3.6.9/libjpeg'
Making all in lua
make[1]: Entering directory `/home/XXXX/fs2_open/fs2_open-3.6.9/lua'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/XXXX/fs2_open/fs2_open-3.6.9/lua'
Making all in code
make[1]: Entering directory `/home/XXXX/fs2_open/fs2_open-3.6.9/code'
if g++ -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.6.9\" -DPACKAGE_STRING=\"fs2_open\ 3.6.9\" -DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DINF_BUILD=1 -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSCP_UNIX=1 -DNO_DIRECT3D=1 -DUSE_OPENAL=1  -I. -I.    -g -Os -Wall -funroll-loops -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -fsigned-char -Wno-unknown-pragmas  -Wno-deprecated -Wno-char-subscripts -I../lua  -MT gropengltexture.o -MD -MP -MF ".deps/gropengltexture.Tpo" -c -o gropengltexture.o `test -f 'graphics/gropengltexture.cpp' || echo './'`graphics/gropengltexture.cpp; \
        then mv -f ".deps/gropengltexture.Tpo" ".deps/gropengltexture.Po"; else rm -f ".deps/gropengltexture.Tpo"; exit 1; fi
graphics/gropengltexture.cpp: In function ‘void opengl_tcache_init()’:
graphics/gropengltexture.cpp:581: warning: deprecated conversion from string constant to ‘char*’
graphics/gropengltexture.cpp:581: warning: deprecated conversion from string constant to ‘char*’
graphics/gropengltexture.cpp:589: warning: deprecated conversion from string constant to ‘char*’
graphics/gropengltexture.cpp:589: warning: deprecated conversion from string constant to ‘char*’
graphics/gropengltexture.cpp:603: warning: deprecated conversion from string constant to ‘char*’
graphics/gropengltexture.cpp:625: warning: deprecated conversion from string constant to ‘char*’
graphics/gropengltexture.cpp:625: warning: deprecated conversion from string constant to ‘char*’
graphics/gropengltexture.cpp: In function ‘int opengl_create_texture_sub(int, int, int, int, int, int, ubyte*, tcache_slot_opengl*, int, int, int)’:
graphics/gropengltexture.cpp:984: warning: suggest explicit braces to avoid ambiguous ‘else’
graphics/gropengltexture.cpp:1007: warning: suggest explicit braces to avoid ambiguous ‘else’
graphics/gropengltexture.cpp:1096: warning: suggest explicit braces to avoid ambiguous ‘else’
graphics/gropengltexture.cpp:1119: warning: suggest explicit braces to avoid ambiguous ‘else’
graphics/gropengltexture.cpp: In function ‘int opengl_check_framebuffer()’:
graphics/gropengltexture.cpp:1819: error: ‘GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT’ was not declared in this scope
make[1]: *** [gropengltexture.o] Error 1
make[1]: Leaving directory `/home/XXXX/fs2_open/fs2_open-3.6.9/code'
make: *** [all-recursive] Error 1

and since I am no coder, I have no idea how I could possibly fix that
« Last Edit: January 11, 2009, 10:18:52 am by Nordwin »

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
Re: [Linux] Cannot compile Inferno Build (for TBP)
Would Tinman's build and the last page of this thread be of any use?
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline Nordwin

  • 25
Re: [Linux] Cannot compile Inferno Build (for TBP)
I don't know, it's a Mac OSX build...
But as far as I know, these are not compatible with Linux..

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: [Linux] Cannot compile Inferno Build (for TBP)
Man I have no idea...I know that it compiles just fine on Ubuntu though, I didn't even have to do any manual symlink editing, and I've never seen that INT_MAX error before.  What compiler version are you using?  And did you run autoconf before ./configure?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Nordwin

  • 25
Re: [Linux] Cannot compile Inferno Build (for TBP)
autoconf? the INSTALL file says that I should run autogen.sh before configure... but I cannot find either...
those are the files I found  in the archive:

acinclude.m4  AUTHORS    code          config.log     config.sub  configure.ac  depcomp               INSTALL     libjpeg  Makefile     Makefile.in  NEWS      README
aclocal.m4    ChangeLog  config.guess  config.status  configure   COPYING       FS2OpenSCPReadMe.doc  install-sh  lua      Makefile.am  missing      projects

 

Offline Nordwin

  • 25
Re: [Linux] Cannot compile Inferno Build (for TBP)
Ok, I have no idea WHAT the problem is.... but now I tried to compile the other build in that thread, the 3.6.10 one... and that did it without error...

So now I'll just use that one for inf-only campaigns and won't care about why the 3.6.9 didn't compile.....

Anyway, thanks for your time...

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: [Linux] Cannot compile Inferno Build (for TBP)
3.6.9 might have had a different compiling setup, I'm not sure.  Either way glad it's figured out.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline smurd

  • 25
Re: FIXED: 3.6.10 compiles just fine[Linux] Cannot compile Inferno Build (for TBP)
Debian Lenny uses gcc/g++ 4.3 by default, which fails to work for me as well, when I try to compile 3.6.9.
Install gcc-4.1 and g++-4.1, and run make CC=gcc-4.1 CXX=g++-4.1, that works for me.

 

Offline Nordwin

  • 25
Re: FIXED: 3.6.10 compiles just fine[Linux] Cannot compile Inferno Build (for TBP)
tried that... it does not give me those other errors (even though I did not edit the source code, nor created those symbolic links), only the last one still leaves me unable to finish compilation:

Code: [Select]
graphics/gropengltexture.cpp: In function ‘int opengl_check_framebuffer()’:
graphics/gropengltexture.cpp:1819: error: ‘GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT’ was not declared in this scope
make[1]: *** [gropengltexture.o] Error 1
make[1]: Leaving directory `/home/cholme/fs2_open/fs2_open-3.6.9/code'
make: *** [all-recursive] Error 1

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: FIXED: 3.6.10 compiles just fine[Linux] Cannot compile Inferno Build (for TBP)
The INT_MAX thing is something that broke with newer versions of GCC (not a GCC problem though).  That was fixed in the 3.6.10 code, but the problem wasn't known at the time that 3.6.9 was released.  The fix is just to add #include <limits.h> to any file that messes up with any of those *_MAX or *_MIN errors.

The GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT thing was just a bug in the code, where the error handling code referenced something that was actually deprecated at the time and once the GL headers removed it then it broke compiling.  You can just safely remove that error check in the code and it will all still work fine.

 

Offline Nordwin

  • 25
Re: FIXED: 3.6.10 compiles just fine[Linux] Cannot compile Inferno Build (for TBP)
tried that, worked, thanks!

Even though I'll use the 3.6.10 build for INF, it's good that I now can compile a 3.6.9 debug build as well.... and I know why compiling didn't work :D

I thank all of you for helping me!