Jump to content

Compile error on arm/zaurus


Glaive

Recommended Posts

Hi all!

 

I'm trying to compile gemrb on a zaurus sl-c3100 that is running pdaxrom beta4 with 2.6.16 kernel and have ran into an error. Configure went successfully, but when make is compiling map.cpp I get the following error:

 

Map.cpp: In function `void InitSpawnGroups()':

Map.cpp:122: warning: cast from `char (*)[9]' to `ieDword*' increases required alignment of target type

Map.cpp:124: warning: cast from `char (*)[9]' to `ieDword*' increases required alignment of target type

Map.cpp: In member function `void Map::SpawnCreature(Point&, char*, int)':

Map.cpp:1884: warning: cast from `char*' to `ieDword*' increases required alignment of target type

make[4]: *** [Map.lo] Error 1

make[4]: Leaving directory `/mnt/ide2/dev/gemrb-0.2.6/gemrb/plugins/Core'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/mnt/ide2/dev/gemrb-0.2.6/gemrb/plugins'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/mnt/ide2/dev/gemrb-0.2.6/gemrb'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/mnt/ide2/dev/gemrb-0.2.6'

make: *** [all] Error 2

 

 

Any help would be greatly appreciated!

Link to comment

Yeah, i knew the trick i used there will cause problem with alignment sensitive machines :)

I'll rewrite spawngroup handling.

Alternatively, you can turn off warnings blocking the compilation, hopefully it won't crash the game, if it crashes, you'll know what is the cause.

 

[edit]

btw, you use an old version. If you can use the CVS on SF, do so!

Link to comment

Hi! Wow, that was a fast response!

I'm trying to compile the new version from cvs but still get a similiar error:

 

Interface.cpp: In member function `bool Interface::ReadItemTable(const char*, const char*)':

Interface.cpp:3727: warning: cast from `char (*)[9]' to `int*' increases required alignment of target type

Interface.cpp: In member function `bool Interface::ResolveRandomItem(CREItem*)':

Interface.cpp:3825: warning: cast from `char*' to `int*' increases required alignment of target type

make[4]: *** [interface.lo] Error 1

make[4]: Leaving directory `/mnt/ide2/dev/gemrb/gemrb/plugins/Core'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/mnt/ide2/dev/gemrb/gemrb/plugins'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/mnt/ide2/dev/gemrb/gemrb'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/mnt/ide2/dev/gemrb'

make: *** [all] Error 2

Link to comment

Found another one :rolleyes:

 

g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/include -DSYSCONFDIR=\"/usr/local/etc\" -DDATADIR=\"/usr/local/share/gemrb\" -DPLUGINDIR=\"/usr/local/lib/gemrb\" -g -O2 -I/opt/native/arm/3.4.6-xscale-softvfp/armv5tel-cacko-linux/include/SDL -D_REENTRANT -Werror -Wall -W -Wpointer-arith -Wcast-align -ansi -pedantic -Wno-format-y2k -Wno-long-long -MT SDLVideoDriver.lo -MD -MP -MF .deps/SDLVideoDriver.Tpo -c SDLVideoDriver.cpp -fPIC -DPIC -o .libs/SDLVideoDriver.o

SDLVideoDriver.cpp: In member function `virtual void SDLVideoDriver::DrawPolyline(Gem_Polygon*, Color&, bool)':

SDLVideoDriver.cpp:1755: warning: cast from `Uint8*' to `Uint16*' increases required alignment of target type

SDLVideoDriver.cpp:1760: warning: cast from `Uint8*' to `Uint32*' increases required alignment of target type

make[4]: *** [sDLVideoDriver.lo] Error 1

make[4]: Leaving directory `/mnt/ide2/dev/gemrb/gemrb/plugins/SDLVideo'

make[3]: *** [all-recursive] Error 1

make[3]: Leaving directory `/mnt/ide2/dev/gemrb/gemrb/plugins'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/mnt/ide2/dev/gemrb/gemrb'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/mnt/ide2/dev/gemrb'

make: *** [all] Error 2

 

BTW, you said there's a way to disable such errors. Could you point out how that is done?

Thanks!

Link to comment

Removing -Werror can help.

 

[edit]

Though i think i only mentioned that i'll fix the errors.

It could be that some machines would crash or degrade performance when these warnings are ignored, nevertheless you can try to remove the -Werror option.

Link to comment
Removing -Werror can help.

 

[edit]

Though i think i only mentioned that i'll fix the errors.

It could be that some machines would crash or degrade performance when these warnings are ignored, nevertheless you can try to remove the -Werror option.

 

Unfortunately that didn't help because after removing -Werror from the makefile g++ segfaulted while compiling SDLVideoDriver.cpp

 

Thanks anyway!

Link to comment

What? g++ segfaulted?

That is definitely not a gemrb fault. Try again with a clean remake.

If it still segfaults, hmm, then there is a severe bug in g++ which you should report.

Sadly this problem is not easy to fix, we already discussed it in the team.

Link to comment

Archived

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

×
×
  • Create New...