Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
hello,
trying to compile spring with mingw on windows:
i used the instructions in the first post of this thread.
when i run scons configure, i get the following:
as i never used phyton so far, i am pretty slow trying to find out whats wrong.
is it possible that one needs phyton 2.5 (aswell)?
(cause i saw that it is somehow needed when compiling on linux with mingw)
Edit: same thing happens with phyton 2.5
trying to compile spring with mingw on windows:
i used the instructions in the first post of this thread.
when i run scons configure, i get the following:
Code: Select all
scons: Reading SConscript files ...
Now configuring. If something fails, consult `config.log' for details.
Detected platform : windows
Checking gcc version...AttributeError: 'NoneType' object has no attribute 'group':
File "SConstruct", line 31:
env = Environment(tools = ['mingw', 'rts'], toolpath = ['.', 'rts/build/scons'])
File "P:\Python24\scons\SCons\Environment.py", line 266:
apply_tools(self, tools, toolpath)
File "P:\Python24\scons\SCons\Environment.py", line 122:
env.Tool(tool, toolpath)
File "P:\Python24\scons\SCons\Environment.py", line 906:
return SCons.Tool.Tool(tool, map(self.subst, toolpath))(self)
File "P:\Python24\scons\SCons\Tool\__init__.py", line 53:
apply(self.generate, ( env, ) + args, kw)
File "rts/build/scons\rts.py", line 186:
gcc_version = config.check_gcc_version(env)
File "rts/build/scons\config.py", line 39:
version = re.search('[0-9]\.[0-9]\.[0-9]', version).group()
is it possible that one needs phyton 2.5 (aswell)?
(cause i saw that it is somehow needed when compiling on linux with mingw)
Edit: same thing happens with phyton 2.5
it is on my path (when i run gcc or g++ i get "No input files").
...i got it!
gcc --version returns 2.95.2 for me (is the version of Dev-C++ linked to in the first post of this thread, and seems to be quite the latest).
so the regex cant find 2.95.2 obviously.
When i use it works.
i dont know how the pyhton regex works, but i guess it would be good to use something like
@tobi
I read you are the editor of rts/build/scons/config.py.
could you please adjust the regex on line 39 to accept gcc versions like 2.95.2 aswell? or whould i do a patch and submit to mantis?
..now i get further, but scons configure still doesn't get to a successfull end.
it now gets this far:
SDL/SDL.h is in mingwlibs/include, like all the ones before, so it should be found.
Edit: woops! :D it sais "no"...
...i got it!
gcc --version returns 2.95.2 for me (is the version of Dev-C++ linked to in the first post of this thread, and seems to be quite the latest).
so the regex
Code: Select all
'[0-9]\.[0-9]\.[0-9]'
When i use
Code: Select all
'[0-9]\.[0-9][0-9]\.[0-9]'
i dont know how the pyhton regex works, but i guess it would be good to use something like
Code: Select all
'[0-9]*\.[0-9]*\.[0-9]*'
I read you are the editor of rts/build/scons/config.py.
could you please adjust the regex on line 39 to accept gcc versions like 2.95.2 aswell? or whould i do a patch and submit to mantis?
..now i get further, but scons configure still doesn't get to a successfull end.
it now gets this far:
Code: Select all
....
Guessing Python include path... mingwlibs\include\python2.4
Checking for Java... Guessing Java include path... mingwlibs\include\java
Checking headers and libraries
Checking for C++ header file GL/gl.h... no
Could not find one of these headers: ['GL/gl.h']
Checking for C++ header file GL/glew.h... no
Could not find one of these headers: ['GL/glew.h']
Checking for C++ header file GL/glu.h... no
Could not find one of these headers: ['GL/glu.h']
Checking for C++ header file IL/il.h... no
Could not find one of these headers: ['IL/il.h']
Checking for C++ header file IL/ilu.h... no
Could not find one of these headers: ['IL/ilu.h']
Checking for C++ header file SDL/SDL.h...
Edit: woops! :D it sais "no"...
the log file (config.log) shows the errors, i shortened it a bit (lines consisting of only "...")
if i use the same compile commands but without
, then the ones failing with "Error 1" in the config file, work.
gl.h is taken from C:/Dev-C++/Include/GL/gl.h.
the line 1135, which contains the first syntax error as seen above, looks like this:
the others containing syntax errors look similar.
any ideas?
Code: Select all
file P:\Python24\scons\SCons\Environment.py,line 1019:
Configure( confdir = build\sconf_temp )
Checking for C++ header file GL/gl.h... build\sconf_temp\conftest_0.cpp <-
|
|#include "GL/gl.h"
|
|
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -pipe -fno-strict-aliasing -mfpmath=387 -mthreads -DNDEBUG -D_REENTRANT -D_SZ_ONE_DIRECTORY -Irts -Irts\System -Irts\lib\luabind -Irts\lib\lua\include -Imingwlibs\include -IP:\Dev-C++\include -Imingwlibs\include\freetype2 -Imingwlibs\include\SDL -Imingwlibs\include\python2.5 -Imingwlibs\include\python2.4 -Imingwlibs\include\java -c -o build\sconf_temp\conftest_0.o build\sconf_temp\conftest_0.cpp
cc1plus: Invalid option `fpmath=387'
cc1plus: Invalid option `-fsingle-precision-constant'
cc1plus: Invalid option `-frounding-math'
cc1plus: Invalid option `-fsignaling-nans'
In file included from build\sconf_temp\conftest_0.cpp:2:
P:\Dev-C++\include\GL\gl.h:1135: syntax error before `void'
...
P:\Dev-C++\include\GL\gl.h:1498: parse error before `*'
scons: *** [build\sconf_temp\conftest_0.o] Error 1
no
Failed program was:
1:
2: #include "GL/gl.h"
3:
Error message: failed to compile test program
Checking for C++ header file GL/glew.h... build\sconf_temp\conftest_1.cpp <-
|
|#include "GL/glew.h"
|
|
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -pipe -fno-strict-aliasing -mfpmath=387 -mthreads -DNDEBUG -D_REENTRANT -D_SZ_ONE_DIRECTORY -Irts -Irts\System -Irts\lib\luabind -Irts\lib\lua\include -Imingwlibs\include -IP:\Dev-C++\include -Imingwlibs\include\freetype2 -Imingwlibs\include\SDL -Imingwlibs\include\python2.5 -Imingwlibs\include\python2.4 -Imingwlibs\include\java -c -o build\sconf_temp\conftest_1.o build\sconf_temp\conftest_1.cpp
cc1plus: Invalid option `fpmath=387'
cc1plus: Invalid option `-fsingle-precision-constant'
cc1plus: Invalid option `-frounding-math'
cc1plus: Invalid option `-fsignaling-nans'
scons: *** [build\sconf_temp\conftest_1.o] Error 1
no
Failed program was:
1:
2: #include "GL/glew.h"
3:
Error message: failed to compile test program
Checking for C++ header file GL/glu.h... build\sconf_temp\conftest_2.cpp <-
|
|#include "GL/glu.h"
|
|
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -pipe -fno-strict-aliasing -mfpmath=387 -mthreads -DNDEBUG -D_REENTRANT -D_SZ_ONE_DIRECTORY -Irts -Irts\System -Irts\lib\luabind -Irts\lib\lua\include -Imingwlibs\include -IP:\Dev-C++\include -Imingwlibs\include\freetype2 -Imingwlibs\include\SDL -Imingwlibs\include\python2.5 -Imingwlibs\include\python2.4 -Imingwlibs\include\java -c -o build\sconf_temp\conftest_2.o build\sconf_temp\conftest_2.cpp
cc1plus: Invalid option `fpmath=387'
cc1plus: Invalid option `-fsingle-precision-constant'
cc1plus: Invalid option `-frounding-math'
cc1plus: Invalid option `-fsignaling-nans'
In file included from P:\Dev-C++\include\GL\glu.h:22,
from build\sconf_temp\conftest_2.cpp:2:
P:\Dev-C++\include\GL\gl.h:1135: syntax error before `void'
...
P:\Dev-C++\include\GL\gl.h:1498: parse error before `*'
In file included from build\sconf_temp\conftest_2.cpp:2:
P:\Dev-C++\include\GL\glu.h:61: syntax error before `('
...
P:\Dev-C++\include\GL\glu.h:563: syntax error before `('
scons: *** [build\sconf_temp\conftest_2.o] Error 1
no
Failed program was:
1:
2: #include "GL/glu.h"
3:
Error message: failed to compile test program
Checking for C++ header file IL/il.h... build\sconf_temp\conftest_3.cpp <-
|
|#include "IL/il.h"
|
|
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -pipe -fno-strict-aliasing -mfpmath=387 -mthreads -DNDEBUG -D_REENTRANT -D_SZ_ONE_DIRECTORY -Irts -Irts\System -Irts\lib\luabind -Irts\lib\lua\include -Imingwlibs\include -IP:\Dev-C++\include -Imingwlibs\include\freetype2 -Imingwlibs\include\SDL -Imingwlibs\include\python2.5 -Imingwlibs\include\python2.4 -Imingwlibs\include\java -c -o build\sconf_temp\conftest_3.o build\sconf_temp\conftest_3.cpp
cc1plus: Invalid option `fpmath=387'
cc1plus: Invalid option `-fsingle-precision-constant'
cc1plus: Invalid option `-frounding-math'
cc1plus: Invalid option `-fsignaling-nans'
scons: *** [build\sconf_temp\conftest_3.o] Error 1
no
Failed program was:
1:
2: #include "IL/il.h"
3:
Error message: failed to compile test program
Checking for C++ header file IL/ilu.h... build\sconf_temp\conftest_4.cpp <-
|
|#include "IL/ilu.h"
|
|
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -pipe -fno-strict-aliasing -mfpmath=387 -mthreads -DNDEBUG -D_REENTRANT -D_SZ_ONE_DIRECTORY -Irts -Irts\System -Irts\lib\luabind -Irts\lib\lua\include -Imingwlibs\include -IP:\Dev-C++\include -Imingwlibs\include\freetype2 -Imingwlibs\include\SDL -Imingwlibs\include\python2.5 -Imingwlibs\include\python2.4 -Imingwlibs\include\java -c -o build\sconf_temp\conftest_4.o build\sconf_temp\conftest_4.cpp
cc1plus: Invalid option `fpmath=387'
cc1plus: Invalid option `-fsingle-precision-constant'
cc1plus: Invalid option `-frounding-math'
cc1plus: Invalid option `-fsignaling-nans'
scons: *** [build\sconf_temp\conftest_4.o] Error 1
no
Failed program was:
1:
2: #include "IL/ilu.h"
3:
Error message: failed to compile test program
Checking for C++ header file SDL/SDL.h... build\sconf_temp\conftest_5.cpp <-
|
|#include "SDL/SDL.h"
|
|
g++ -fsingle-precision-constant -frounding-math -fsignaling-nans -mieee-fp -O2 -pipe -fno-strict-aliasing -mfpmath=387 -mthreads -DNDEBUG -D_REENTRANT -D_SZ_ONE_DIRECTORY -Irts -Irts\System -Irts\lib\luabind -Irts\lib\lua\include -Imingwlibs\include -IP:\Dev-C++\include -Imingwlibs\include\freetype2 -Imingwlibs\include\SDL -Imingwlibs\include\python2.5 -Imingwlibs\include\python2.4 -Imingwlibs\include\java -c -o build\sconf_temp\conftest_5.o build\sconf_temp\conftest_5.cpp
Code: Select all
-fsingle-precision-constant
-frounding-math
-fsignaling-nans
-mfpmath=387
gl.h is taken from C:/Dev-C++/Include/GL/gl.h.
the line 1135, which contains the first syntax error as seen above, looks like this:
Code: Select all
WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);
any ideas?
Streflop didn't build here because of
edit: Okay, old bug is old, sorry.
After installing msys and adding the path to it's bin folder to %PATH% I managed to build streflop finally. Make basically needs rm to function properly which comes with msys. Comes with make too, but I used a batch file as workaround (@mingw32-make %*).
http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe
I was using a candidate install of the MinGW 5.1.3 package.
It's because make isn't recognized as the mingw tool is called mingw32-make in older releases.status = os.system("make " + cmd)
edit: Okay, old bug is old, sorry.

After installing msys and adding the path to it's bin folder to %PATH% I managed to build streflop finally. Make basically needs rm to function properly which comes with msys. Comes with make too, but I used a batch file as workaround (@mingw32-make %*).
http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe
I was using a candidate install of the MinGW 5.1.3 package.
Code: Select all
rts\rendering\gl\mygl.h(7) : fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
Theyre not a part of the AI spring headers. They arent included in any I projects either.
I am not getting this error from compiling spring (although I might do if I tried), I am getting it from compiling NTai. I had not changed NTai between the last time I got it to compile and when I did an svn checkout and compiled a few minutes ago.
I am not getting this error from compiling spring (although I might do if I tried), I am getting it from compiling NTai. I had not changed NTai between the last time I got it to compile and when I did an svn checkout and compiled a few minutes ago.
IAICalback.h is included.
Found it!
#include "Rendering/GL/myGL.h"
line 8 of unitdef.h, wtf is something like that doing in there?!
...
erm maybe this should be stored somewhere else? I'm not so sure this should belong here regardless of wether its an OpenGL type.
Ontop of that its type might differ between Operating systems and implementations, could that cause hash issues and thus sync issues? I'm not quite sure how the sync setup works but if things are of different data types... That and this is a class hat should be synced, having machine specific values should go in an unsynced class structure.
Found it!
#include "Rendering/GL/myGL.h"
line 8 of unitdef.h, wtf is something like that doing in there?!
...
Code: Select all
GLuint unitimage; // don't read this directly use CUnitDefHandler::GetUnitImage instead
Ontop of that its type might differ between Operating systems and implementations, could that cause hash issues and thus sync issues? I'm not quite sure how the sync setup works but if things are of different data types... That and this is a class hat should be synced, having machine specific values should go in an unsynced class structure.
i am noob in compiling spring, not in games BA, AA 
On windows with mingw
is it normal that i have to copy scons.bat from C:\Python25\Scripts to C:\Python25\ ???
Is it because last version of python?
thx,
There is a lot of link in JC post are not updated.
Is possible to move the post to wiki like developpements links thread?
Then it could be upgraded from everyones.
need to have link to versions without focus on a version.
I hope Spring follow the tools versions.
Just a suggest.

On windows with mingw
is it normal that i have to copy scons.bat from C:\Python25\Scripts to C:\Python25\ ???
Is it because last version of python?
thx,
There is a lot of link in JC post are not updated.
Is possible to move the post to wiki like developpements links thread?
Then it could be upgraded from everyones.
need to have link to versions without focus on a version.
I hope Spring follow the tools versions.
Just a suggest.
Yeah, I was going to do that.
So here it is:
http://spring.clan-sy.com/wiki/Source_D ... nvironment
Rewritten/merged/updated/combined etc.
So here it is:
http://spring.clan-sy.com/wiki/Source_D ... nvironment
Rewritten/merged/updated/combined etc.
