Jump to content

compilation error


Guest raistlin

Recommended Posts

Guest raistlin

Hi, I get this error during the compilation:

 

g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/include/python2.4 -I/usr/include -DSYSCONFDIR=\"/home/enrico/GemRB/\" -DDATADIR=\"/home/enrico/GemRB/\" -DPLUGINDIR=\"/home/enrico/GemRB/plugins/\" -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Werror -Wall -W -Wpointer-arith -Wcast-align -ansi -pedantic -Wno-format-y2k -Wno-long-long -MT GUIScript.lo -MD -MP -MF .deps/GUIScript.Tpo -c GUIScript.cpp  -fPIC -DPIC -o .libs/GUIScript.o
cc1plus: warnings being treated as errors
GUIScript.cpp: In function 'PyObject* GemRB_CheckFeatCondition(PyObject*, PyObject*)':
GUIScript.cpp:6326: warning: dereferencing type-punned pointer will break strict-aliasing rules
GUIScript.cpp:6327: warning: dereferencing type-punned pointer will break strict-aliasing rules
GUIScript.cpp:6329: warning: dereferencing type-punned pointer will break strict-aliasing rules
GUIScript.cpp:6330: warning: dereferencing type-punned pointer will break strict-aliasing rules
GUIScript.cpp: In function 'PyObject* GemRB_HasResource(PyObject*, PyObject*)':
GUIScript.cpp:6534: warning: dereferencing type-punned pointer will break strict-aliasing rules
GUIScript.cpp:6535: warning: dereferencing type-punned pointer will break strict-aliasing rules
GUIScript.cpp:6537: warning: dereferencing type-punned pointer will break strict-aliasing rules
GUIScript.cpp:6538: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[4]: *** [GUIScript.lo] Error 1
make[4]: Leaving directory `/home/enrico/progetti/gemrb/gemrb/plugins/GUIScript'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/enrico/progetti/gemrb/gemrb/plugins'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/enrico/progetti/gemrb/gemrb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/enrico/progetti/gemrb'
make: *** [all] Error 2

 

BTW... you are deing really a greta work!

Link to comment

Seems like my build fails with the same error (both cvs and the release):

 

...

cc1plus: warnings being treated as errors

GUIScript.cpp: In function 'PyObject* GemRB_CheckFeatCondition(PyObject*, PyObject*)':

GUIScript.cpp:6326: warning: dereferencing type-punned pointer will break strict-aliasing rules

GUIScript.cpp:6327: warning: dereferencing type-punned pointer will break strict-aliasing rules

GUIScript.cpp:6329: warning: dereferencing type-punned pointer will break strict-aliasing rules

GUIScript.cpp:6330: warning: dereferencing type-punned pointer will break strict-aliasing rules

GUIScript.cpp: In function 'PyObject* GemRB_HasResource(PyObject*, PyObject*)':

GUIScript.cpp:6534: warning: dereferencing type-punned pointer will break strict-aliasing rules

GUIScript.cpp:6535: warning: dereferencing type-punned pointer will break strict-aliasing rules

GUIScript.cpp:6537: warning: dereferencing type-punned pointer will break strict-aliasing rules

GUIScript.cpp:6538: warning: dereferencing type-punned pointer will break strict-aliasing rules

make[4]: *** [GUIScript.lo] Fehler 1

make[4]: Leaving directory `/home/pewtey/x42/bg/gemrb/gemrb/plugins/GUIScript'

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

make[3]: Leaving directory `/home/pewtey/x42/bg/gemrb/gemrb/plugins'

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

make[2]: Leaving directory `/home/pewtey/x42/bg/gemrb/gemrb'

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

make[1]: Leaving directory `/home/pewtey/x42/bg/gemrb'

make: *** [all] Fehler 2

 

(System: Suse 10.1 i386; Python 2.5, sdl 1.2)

Link to comment

Sorry, just re-read the build instructions, especially the "if the build fails on the GuiScript object"-part, and guess configure looks up the wrong python version. There are 2 different installations on my system, one of python 2.4 that came with the distro and another one of v. 2.5 that I installed this day with the "--enable-shared" on. The point seems to be: How to tell configure that it should use the latter?

Link to comment
Sorry, just re-read the build instructions, especially the "if the build fails on the GuiScript object"-part, and guess configure looks up the wrong python version. There are 2 different installations on my system, one of python 2.4 that came with the distro and another one of v. 2.5 that I installed this day with the "--enable-shared" on. The point seems to be: How to tell configure that it should use the latter?

 

Easiest way would be to modify the detection script manually (on your system) to look for 2.5 only.

Link to comment
Guest raistlin

Sorry, just re-read the build instructions, especially the "if the build fails on the GuiScript object"-part, and guess configure looks up the wrong python version. There are 2 different installations on my system, one of python 2.4 that came with the distro and another one of v. 2.5 that I installed this day with the "--enable-shared" on. The point seems to be: How to tell configure that it should use the latter?

 

Easiest way would be to modify the detection script manually (on your system) to look for 2.5 only.

 

It's strange, becouse I use Ubuntu, and its packages are built with --enable-shared. I'm quite sure of this also because I didn't encounter this problem before, and I've not updated the python package in a while.

Link to comment

The reason here is that gcc 4.1 is more strict with aliasing than previous versions, and python is a bit sloppy with aliasing rules. Add a -fno-strict-aliasing option to the cflags in configure.in and re-run autogen.sh. I don't have the gemrb sources around here, so I can't tell you the exact lines to edit unfortunately.

Link to comment
The reason here is that gcc 4.1 is more strict with aliasing than previous versions, and python is a bit sloppy with aliasing rules. Add a -fno-strict-aliasing option to the cflags in configure.in and re-run autogen.sh. I don't have the gemrb sources around here, so I can't tell you the exact lines to edit unfortunately.

 

Thanx, that solved the problem.

Link to comment

Archived

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

×
×
  • Create New...