Hi guys, few question about compiling.

Hi guys, few question about compiling.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Hi guys, few question about compiling.

Post by -Y- »

I followed the stuff you said on the site but here are few issues popping up:

Code: Select all

CMake Error at doc/CMakeLists.txt:126 (Message):
  user-docs generation (html/text) is not possible (disable with
  USERDOCS_HTML=FALSE); missing utility: pandoc or markdown


WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
Found GLEW: D:/dev/projects/spring/mingwlibs/include (Required is at least version "1.5.1")
Found Freetype: D:/dev/projects/spring/mingwlibs/dll/freetype6.dll 
WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
Could NOT find Boost
Note: Unit tests will not be built: Boost::test library was not found
Configuring incomplete, errors occurred!
So if I disable that flag, it compiles ok, but I'm not sure if lack of openGL or boost is detrimental to the engine.

Ok, once compiled I get a source folder filled with various files but it looks nothing like the binary version (portable version in my case). I know this is a newbie question, but how do I use the (presumably) compiled engine?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

about the cmake-error, see:
http://springrts.com/mantis/view.php?id=2546

"WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead"

this message is from cmake only: cmake uses a old/deprecated(?) script, that searches for glu/opengl. you can simply ignore this message.

i'm unsure where spring.exe is created on win32, it should be in the source-root directory?!

did you compile with "make spring" ?
-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Re: Hi guys, few question about compiling.

Post by -Y- »

Ok, I missed a part about mingw32-make install-spring :X but after some tedium I managed to start installing.


However after I ran it I came upon another stumbling block:

Code: Select all

[ 29%] Built target minizip
Linking CXX executable ArchiveMover.exe
D:\dev\projects\spring\mingwlibs\lib\libboost_system-mt.a(error_code.o):error_co
de.cpp:(.text+0x1fe): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_system-mt.a(error_code.o):error_co
de.cpp:(.text+0x206): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_system-mt.a(error_code.o):error_co
de.cpp:(.text+0x40d): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_system-mt.a(error_code.o):error_co
de.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
D:\dev\projects\spring\mingwlibs\lib\libboost_filesystem-mt.a(v2_operations.o):v
2_operations.cpp:(.text+0xb7e): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_filesystem-mt.a(v2_operations.o):v
2_operations.cpp:(.text+0xcb1): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_filesystem-mt.a(v2_operations.o):v
2_operations.cpp:(.text+0xe9c): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_filesystem-mt.a(v2_operations.o):v
2_operations.cpp:(.text+0xfd1): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_filesystem-mt.a(v2_operations.o):v
2_operations.cpp:(.text+0x11bc): undefined reference to `_Unwind_Resume'
D:\dev\projects\spring\mingwlibs\lib\libboost_filesystem-mt.a(v2_operations.o):v
2_operations.cpp:(.text+0x12ce): more undefined references to `_Unwind_Resume' f
ollow
D:\dev\projects\spring\mingwlibs\lib\libboost_filesystem-mt.a(v2_operations.o):v
2_operations.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'

collect2: ld returned 1 exit status
mingw32-make[3]: *** [tools/ArchiveMover/ArchiveMover.exe] Error 1
mingw32-make[2]: *** [tools/ArchiveMover/CMakeFiles/ArchiveMover.dir/all] Error
2
mingw32-make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Err
or 2
mingw32-make: *** [install-spring] Error 2
What could be causing this?
Thank you, in advance ;)

NOTE: D:\dev\projects\spring is the source folder and I'm running this from D:\dev\project\bin\spring (which I configured as output folder in CMake).
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

you installed the wrong gcc:

http://springrts.com/wiki/Building_Spri ... e_Problems and
http://springrts.com/wiki/Building_Spri ... binstaller

i added a screenshot, hopefully this made it more clear, if you've a better idea how to make this clearer, suggestions are welcome!
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Hi guys, few question about compiling.

Post by FLOZi »

The 'wrong' gcc works fine with the right collect2.exe
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

@FLOZi:
all side-effects known? are there incompatibilities between gcc+a different version of collect2.exe? where to get the "right" file? what happens when mingw is updated? ...?

please don't give hacks as hints to others which could lead to more errors, please! only try this at home, when you know what you're doing ;)
-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Re: Hi guys, few question about compiling.

Post by -Y- »

Weird, it reports gcc installed as 4.5.2-1. But I'll comply, I've seen weirder cases popup.
Btw what is a dwarf2?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

the format, how debugging information is stored: http://en.wikipedia.org/wiki/DWARF
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Hi guys, few question about compiling.

Post by hoijui »

either markdown or pandoc should be under bin/ in mingwlibs.
i though this is already the case, but i was wrong:
https://github.com/spring/mingwlibs/tree/master/bin

I will put pandoc.exe there.

edit: done.
https://github.com/spring/mingwlibs/com ... 726da49849
-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Re: Hi guys, few question about compiling.

Post by -Y- »

Tnx, guys it seems MinGW stable wasn't installed despite being reported. However it seems the doc problem hasn't been removed

Code: Select all

[ 36%] Creating userdoc AUTHORS.html
pandoc.exe: D:\dev\projects\Spring_RTS\spring\mingwlibs\templates\html.template:
 openFile: does not exist (No such file or directory)
mingw32-make[3]: *** [doc/AUTHORS.html] Error 1
mingw32-make[2]: *** [doc/CMakeFiles/userdocs.dir/all] Error 2
mingw32-make[1]: *** [rts/builds/default/CMakeFiles/install-spring.dir/rule] Err
or 2
mingw32-make: *** [install-spring] Error 2
I turned off the Flags for generating docs so will try it again.

If I understand correctly this is only needed if I want to generate multi-threaded applications, right?

Code: Select all

set MAKE_COMMAND=mingw32-make -j2
EDIT:
i added a screenshot, hopefully this made it more clear, if you've a better idea how to make this clearer, suggestions are welcome!
Well a screencast that guides you through it would be ideal, though I might be asking a bit too much.
Last edited by -Y- on 25 Jul 2011, 23:53, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

no, -j2 instructs the build-system to run compiling in parallel to use all avaiable cpu-cores to speed up compiling.

if you only want to compile the single-threaded you've to run

mingw32-make spring


for the multithreaded version

mingw32-make spring-multithreaded

(for all possible targets run "mingw32-make help")

what do you want to do?
-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Re: Hi guys, few question about compiling.

Post by -Y- »

abma wrote:what do you want to do?
Nothing I thought maybe that was a reason for the compiler failing... Still thanks for that, will try it next time.

EDIT: So compilation went ok (I did disable the tags for generating docs and I used D:\spring\bin for building binaries, while they are installed in C:\Program Files (x86)\) but running this application i yielded an application error - "The application was unable to start correctly (0xc0000005). Click OK to close application." ?
Is there any additional step I have to perform to have a working application?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Hi guys, few question about compiling.

Post by hoijui »

please attach infolog.txt as a file to your post.

thanks for the report about doc generation still failing.
i made an other mingwlibs commit, which should fix it (i tested it with wine).
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

does the build from the buildbot crash for you, too?

http://springrts.com/dl/buildbot/defaul ... ortable.7z
-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Re: Hi guys, few question about compiling.

Post by -Y- »

@hoijui: I can't seem to find infolog.txt anywhere (not in source, or the build folder or the install folder). Anyway doc problem has been resolved.

@abma: No the buildbot build works... The strange thing is mingw32-make install-spring works, but sometimes hangs when using multithreaded command :/ Whenever it finishes the result is same - that error I described. And there is no infolog.txt...

I'm using Windows 7 64-bit, Intel Core2 Due, NVidia GeForce 9600M GS. Did anyone of these caused problems before?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

strange! can you run it with "gdb spring.exe" and then type "bt full" ? (afaik gdb needs to be installed with mingw online installer and can be installed later on...)
-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Re: Hi guys, few question about compiling.

Post by -Y- »

Yeah I installed the debugger for CDT.
Here is the stack trace:
http://pastebin.com/ZdBWwmLj

Here are some Windows text dumps:
http://pastebin.com/VjQrd4fy

http://pastebin.com/ndMJxMpL

EDIT: Sorry about text dump. I was not aware of your conventions regarding text dumps.
Last edited by -Y- on 28 Jul 2011, 22:27, edited 2 times in total.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Hi guys, few question about compiling.

Post by hoijui »

please don't include files like this, but rather attach as files or use pastebin.com (or likewise).

when starting gdb, you first have to type "run", and wait till ti crashes, and then run "bt" or "bt full".
-Y-
Posts: 12
Joined: 24 Jul 2011, 22:08

Re: Hi guys, few question about compiling.

Post by -Y- »

:oops: Sorry about that, I updated my previous post. For the record I never ran gdb in console (or it was long time ago). Anyway backtrace or stack strace has been added it's on this location:

http://pastebin.com/ZdBWwmLj
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Hi guys, few question about compiling.

Post by abma »

do you have commondo firewall installed?
Post Reply

Return to “Engine”