Author Topic: Compiling failure/error  (Read 4202 times)

0 Members and 1 Guest are viewing this topic.

Compiling failure/error
Hi all,
    I just recently upgraded from OpenSUSE 10.2 to 10.3 and it seems to have borked more items than I intended it to. FS2_open isn't compiling any longer and I don't understand why.  I get a lot of warning messages and then one error which dumps me out of make.

The warning message that comes up consistently is:

warning: deprecated conversion from string constant to ‘char*

and the error that stops make is:

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

if there's more information that can help, let me know. I was jonesing for some FS2 and now I can't get my fix!

intel 945GM onboard video with the "intel" driver, I'm trying to figure out how much opengl I have as it seems OpenSUSE prefers Mesa.

 
Re: Compiling failure/error
quick update:

I downloaded freeglut package and got the latest source from cvs.
I keep getting that deprecated conversion warning, but the fatal error has moved:

parse/sexp.cpp: In function ‘void sexp_modify_variable(int)’:
parse/sexp.cpp:19153: warning: deprecated conversion from string constant to ‘char*’
parse/sexp.cpp:19153: warning: deprecated conversion from string constant to ‘char*’
parse/sexp.cpp: At global scope:
parse/sexp.cpp:22031: warning: deprecated conversion from string constant to ‘char*’
.... (about 100 lines of this warning)...
parse/sexp.cpp:22069: warning: deprecated conversion from string constant to ‘char*’
make[1]: *** [sexp.o] Error 1
make[1]: Leaving directory `/home/mjaworsk/FreeSpace/src/fs2_open/code'
make: *** [all-recursive] Error 1

and that's it.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Compiling failure/error
Intel GFX = teh suck.. they have known issues.. I'm not sure if yours falls into that category, hopefully a coder will post here.

 
Re: Compiling failure/error
Thanks for the response jr2. before my update to 10.3, I was using (pretty sure) the intel i810 driver. Since I'm still learning about all this linux stuff, I'm not entirely sure what-all should be looked at and/or updated/downloaded. same version of gcc as far as I can tell, though.  I don't think I ever bothered watching the output when I was using 10.2, unfortunately (because make worked), so I don't know if it was giving me all that deprecated warning stuff or not.

is there another forum I should post this too?

 
Re: Compiling failure/error
I think I found something out.

Apparently gcc 4.2.x has some changes in it. Namely, I guess they cleaned up headers so you have to be more explicit about including everything you should. I'm not sure what the warning is about on the other stuff...

I'm trying to figure out how to tell configure and/or make to use the 4.1.3 I just installed...

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Re: Compiling failure/error
Yea, I get those warnings too, but the current code in CVS/3.6.9 branch compiles ok anyways (using GCC 4.2.1).

 
Re: Compiling failure/error
when I try compiling 3.6.9 with 4.2.1, I get the deprecated conversion warning and an error like this:

graphics/gropengltexture.cpp: In function ‘int opengl_check_framebuffer()’:
graphics/gropengltexture.cpp:1825: error: ‘GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT’ was not declared in this scope
make[1]: *** [gropengltexture.o] Error 1
make[1]: Leaving directory `/home/mjaworsk/FreeSpace/src/fs2_open_3_6_9/code'
make: *** [all-recursive] Error 1

is there an irc/chat channel where I can actually talk to someone about this?

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Re: Compiling failure/error
By grepping for "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT" in my /usr/src, I get this (among other things):

Quote
include/GL/glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
include/SDL/SDL_opengl.h:#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
I'd suggest checking that your libsdl and mesa development packages are properly installed and up to date.

 
Re: Compiling failure/error
Thanks for the suggestion castor.

I'm trying to find where my libraries are kept (and how to use grep), being very n00bish but I need to learn how to do more development anyways eventually, might as well be with this.

Anyways, when I try compiling 3.6.10 with gcc 4.2.1, it ends trying to compile sexp.o with this message:
parse/sexp.cpp: In function ‘void sexp_deal_with_ship_flag(int, int, int, int, int, int, int, int, int)’:
parse/sexp.cpp:10471: warning: unused variable ‘wingnum’
parse/sexp.cpp:10471: warning: unused variable ‘shipnum’
parse/sexp.cpp:10471: warning: unused variable ‘ship_index’
parse/sexp.cpp: In function ‘void sexp_toggle_builtin_messages(int, bool)’:
parse/sexp.cpp:10603: error: ‘wingnum’ was not declared in this scope
parse/sexp.cpp:10604: error: ‘shipnum’ was not declared in this scope
parse/sexp.cpp:10605: error: ‘ship_index’ was not declared in this scope
parse/sexp.cpp: In function ‘int sexp_previous_goal_status(int, int)’:
parse/sexp.cpp:10676: warning: deprecated conversion from string constant to ‘char*’

and then it keeps running giving lots and lots of the deprecated conversion errors and then eventually terminating with:

make[1]: *** [sexp.o] Error 1
make[1]: Leaving directory `/home/mjaworsk/FreeSpace/src/fs2_open/code'
make: *** [all-recursive] Error 1

Any thoughts? I tried to use the SUSE package handler to pull down all the sdl libraries I could find...

 
Re: Compiling failure/error
ok, so I figured where the libraries are on my system

/usr/include/GL/

when I run "grep GL_FRAMEBUFFER_INCOMPLETE_* * "

I get the following:

glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
glew.h:#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
glext.h:#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9
glext.h:/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */
glext.h:/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */

unfortunately, GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_* isn't anywhere on there.

but, when I goto /usr/include/SDL/ and run the following:

"grep GL_FRAMEBUFFER_INCOMPLETE_DUPLIC* *"

I find:
SDL_opengl.h:#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8

So... seems like the #include is missing from glext.h

can I just add that line into glext.h ? 

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Re: Compiling failure/error
It appears that GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT define is not present in mesa version 7 for Suse 10.2 (with mesa 6.5 its still there).
Dunno what's up with that :confused:

Edit:
Ok, there seems to be a Mantis report for a similar issue - appears to be a FSO problem. If I read it right Taylor already fixed it in CVS (thus you didn't get the problem anymore with 3.6.10).
« Last Edit: October 13, 2007, 05:18:48 pm by castor »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Compiling failure/error
Anyways, when I try compiling 3.6.10 with gcc 4.2.1, it ends trying to compile sexp.o with this message:
parse/sexp.cpp: In function ‘void sexp_deal_with_ship_flag(int, int, int, int, int, int, int, int, int)’:
parse/sexp.cpp:10471: warning: unused variable ‘wingnum’
parse/sexp.cpp:10471: warning: unused variable ‘shipnum’
parse/sexp.cpp:10471: warning: unused variable ‘ship_index’
parse/sexp.cpp: In function ‘void sexp_toggle_builtin_messages(int, bool)’:
parse/sexp.cpp:10603: error: ‘wingnum’ was not declared in this scope
parse/sexp.cpp:10604: error: ‘shipnum’ was not declared in this scope
parse/sexp.cpp:10605: error: ‘ship_index’ was not declared in this scope

 :nervous:

Ummm. Do a CVS update. That one is fixed now.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: Compiling failure/error
Thank you everyone for all the help.

I was able to compile and the game runs again. Thank you for all the patience dealing with the n00b I am.

There's just one little problem with the nebula/background things giving me an artifact on the screen, but this is minor compared to everything else and I can turn that off ingame. :)

One last questions:

if I run the cvs command in the wiki:
$ cvs -z3 -d:pserver:[email protected]:/home/fs2source/cvsroot co fs2_open

is that version different from HEAD ? Because I could have sworn I had updated the CVS just a couple days ago and was getting the sexp error.

anyways, thanks again, everyone.

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Re: Compiling failure/error
Yea, that is the HEAD. But I think the problem was corrected on 12th of Oct (if I'm looking at the correct Mantis report), so it could still have been there at the time you updated.
By the way, are you now using the HEAD or the 3.6.9 branch? It will probably give you less problems in the future if you go with the 3.6.9 :)

Edit: Ah, from the other thread I can see you're using HEAD.
« Last Edit: October 14, 2007, 04:23:09 am by castor »

 
Re: Compiling failure/error
In order to run 3.6.9 I think I have to downgrade mesa to 6.5 because of the missing GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT do-hicky.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Compiling failure/error
In order to run 3.6.9 I think I have to downgrade mesa to 6.5 because of the missing GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT do-hicky.
That enum requirement has been removed from the code, so you don't need to do anything but get a current cvs update.

But what castor was referring to was to use the fs2_open_3_6_9 branch (aka "stable") from CVS rather than getting HEAD (aka "unstable").  HEAD has a lot of problems at the moment (bugs, memory leaks, broken pilot files, etc.), so it's a good idea to stay away from it unless you are working on the code itself or working on mod scripts using the new scripting API.  All of the code that I'm working on (like shaders, memory usage improvements, new FS2NetD code, etc.) are all for the stable branch, with HEAD not getting those same changes until next month at the earliest.

 
Re: Compiling failure/error
3.6.9 compiles and brings me to through the opening movie to pilot selection. however when I try to select the pilot and go on to the main hall the game crashes, my console window says "Segmentation Fault" and my mouse doesn't work so I have to restart x.

 

Offline castor

  • 29
    • http://www.ffighters.co.uk./home/
Re: Compiling failure/error
Try creating a new pilot. It might be that pilot records from 3.6.9/HEAD aren't compatible..

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Compiling failure/error
3.6.9 compiles and brings me to through the opening movie to pilot selection. however when I try to select the pilot and go on to the main hall the game crashes, my console window says "Segmentation Fault" and my mouse doesn't work so I have to restart x.
Pilots from HEAD aren't compatible with the stable branch (and vise versa), so be sure to use a new pilot, or create one pilot that is specifically used only for HEAD builds.

 
Re: Compiling failure/error
Ah, the new pilot fixed it so it no longer crashes at that point in the game. so I can run both 3.6.9 and HEAD but they both give me missing textures/graphical glitches.

Unfortunately, the graphics glitches are still present... but that'll be in the other thread.

I *think* I'm making progress...