1 (edited by [ICE]DemonGloom 2008-07-26 06:09:58)

Topic: Compiling a server for MIPSEL-based routers

How can i solve error :

c++ gs_game.cpp
/TeeWars/teeworlds-0.4.2-src/src/game/server/gs_game.cpp:1: warning: -fstack-protector not supported for this target
/TeeWars/teeworlds-0.4.2-src/src/game/server/gs_game.cpp: In member function 'virtual bool gameobject::can_join_team(int, int)':
/TeeWars/teeworlds-0.4.2-src/src/game/server/gs_game.cpp:339: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
bam: compile_cxx returned error number 256
bam: error during build

Previous commands complitted successfully, bam compiled normally

MIPSEL based router - wl-500g Premium, for example

P.S. I need only server, not client
P.P.S Python is python_2.5-1_mipsel.ipk
      Game version - 0.4.2

The God is real, unless declared as integer

2

Re: Compiling a server for MIPSEL-based routers

It is funny, but it dies if there is

config.sv_max_clients-config.sv_spectator_slots;

if - is replaced by + , that function compiles normally and gcc dies on another function

The God is real, unless declared as integer

3 (edited by Somerunce 2008-07-26 10:31:18)

Re: Compiling a server for MIPSEL-based routers

If you search the forum you'll find answers to that.

http://www.teeworlds.com/forum/viewtopic.php?pid=16293

Also, read the first faq-question in the Compiling Everything-doc which can be found under docs.

4

Re: Compiling a server for MIPSEL-based routers

I've already done that...

The God is real, unless declared as integer

5

Re: Compiling a server for MIPSEL-based routers

-fstack-protector is not important error... it stops because of

/TeeWars/teeworlds-0.4.2-src/src/game/server/gs_game.cpp: In member function 'virtual bool gameobject::can_join_team(int, int)':
/TeeWars/teeworlds-0.4.2-src/src/game/server/gs_game.cpp:339: internal compiler error: Segmentation fault
The God is real, unless declared as integer

6

Re: Compiling a server for MIPSEL-based routers

Debug server compiled successfully... Release version causes compile errors

The God is real, unless declared as integer

7

Re: Compiling a server for MIPSEL-based routers

[ICE]DemonGloom wrote:

-fstack-protector is not important error... it stops because of

/TeeWars/teeworlds-0.4.2-src/src/game/server/gs_game.cpp: In member function 'virtual bool gameobject::can_join_team(int, int)':
/TeeWars/teeworlds-0.4.2-src/src/game/server/gs_game.cpp:339: internal compiler error: Segmentation fault

Sounds to me like you have a faulty gnu-toolchain.

"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." - Terry Pratchett -

8

Re: Compiling a server for MIPSEL-based routers

What is the difference between Release and Debug versions? Can I use Debug version like normal release?

The God is real, unless declared as integer

9

Re: Compiling a server for MIPSEL-based routers

The difference is performance, and debuggability smile

The debug version will run a lot slower.

Languages shapes the way we think, or don't.

10

Re: Compiling a server for MIPSEL-based routers

And what is the difference in compilation method? Why Release version cannot by compiled and why Debug compiles good and works good (but a bit slowly...)?

The God is real, unless declared as integer

11

Re: Compiling a server for MIPSEL-based routers

If I set release_settings.cc.optimize to 0, release configuration work normally... What specific features are set in optimization mode?

The God is real, unless declared as integer

12

Re: Compiling a server for MIPSEL-based routers

I guess you have a buggy compiler or runs out of memory or something like that when compiling with optimizations on.

Languages shapes the way we think, or don't.

13

Re: Compiling a server for MIPSEL-based routers

What switches are used in opptimization? I tried with -O3 and it compiled successfully, but server wasn't faster...

The God is real, unless declared as integer

14 (edited by datag 2008-07-30 14:47:33)

Re: Compiling a server for MIPSEL-based routers

[ICE]DemonGloom wrote:

What switches are used in opptimization?

Maybe you take a look at the gcc-manual (when using the gcc-compiler-suite; else your compiler-manual). There are all switches explained which are "included" with an optimization-level (e.g. -O2).

[ICE]DemonGloom wrote:

I tried with -O3 and it compiled successfully, but server wasn't faster...

I doubt that you can notice a speed difference by "watching". You may have to run test-utilities in order to see a differnce. As I said before, I believe you've got a faulty compiler (or toolchain). Either you try to fix it by recompiling or you just use the debug-version (or a release-version with other opt-level) if it compiles and runs fine for you.

"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." - Terry Pratchett -

15 (edited by catpaw 2008-07-30 15:20:02)

Re: Compiling a server for MIPSEL-based routers

a) what does "c++ --version" yield?

Because "internal compiler error" is sure that, a broken compiler.

BTW: gcc segfaulting can also often be a broken memory chip. Yes this can be that your computer runs normally until you fire up gcc. Since hardly any application uses memory in that extensive and intensive way than gcc does. Be sure to run "memtest" if that or something similar is available on your router, and let it run for a whle.

b) void: Are you sure the debug version runs "a lot slower"? AFAIK it just contains debug sysmbols while the release doesn't. So it differs on filesize, maybe some small differences like not doing inlineing or the such, but "serious" speed differences?

16

Re: Compiling a server for MIPSEL-based routers

Well... it all depends...
Debug version should be -O0 -g (no optimizations, with debug symbols) So it will run slower. You might not notice it though smile

Languages shapes the way we think, or don't.

17

Re: Compiling a server for MIPSEL-based routers

[/usr/local/root]$ c++ --version
c++ (GCC) 4.1.1
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The God is real, unless declared as integer

18 (edited by catpaw 2008-07-30 18:06:47)

Re: Compiling a server for MIPSEL-based routers

void wrote:

So it will run slower. You might not notice it though smile

You might not notice it though is a lot less than

The debug version will run a lot slower.

So DemonGloom in this case if the debug version works for you. Just stick with it.

19

Re: Compiling a server for MIPSEL-based routers

[ICE]DemonGloom wrote:

[/usr/local/root]$ c++ --version
c++ (GCC) 4.1.1
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Can you try to upgrade gcc?

Did you do a memtest?

20

Re: Compiling a server for MIPSEL-based routers

Well, as long as you are not hitting 100% cpu you will not really "notice" the server running slower smile That's what I ment. Run it if it works for you, but it will require more cpu.

Languages shapes the way we think, or don't.

21

Re: Compiling a server for MIPSEL-based routers

300mhz smile I prefer speed optimization big_smile

The God is real, unless declared as integer

22

Re: Compiling a server for MIPSEL-based routers

I dont think u will notice the difference between the -O0 and -O2, and debug symbols just make the binary bigger, they dont affect speed IMHO.

We will meet again when the flowers spread their glorious scent of victory and the birds sing us the melody of justice...