Mingw: the Nov 2012 attempt

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

shenle wrote:15. Grr I forgot that python doesn't compile straightforward on mingw. There's a port of python to mingw at http://mingw-and-ndk.googlecode.com/fil ... n-mingw.7z (it's python 2.7.1 so I think it will do) Installing this and testing before moving forward.

(edit) Still get the same errors as above. I even explicitly added the path where python is installed to the build properties (mingw/include and mingw/lib) and still I can't get over those.
python-mingw.7z contains no import lib. Maybe this is your problem? See also http://www.mingw.org/wiki/CreateImportLibraries

I need to check against what python I am linking.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

Looks like I've built python27 with mingw.

I've uploaded my stuff to save you from the pain. vegastrike_mingw.zip contains all required dependencies to build vegastrike using codeblocks/mingw-w64(it should also build with standard mingw I think).

Download: http://sourceforge.net/projects/vegaogr ... p/download
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

Great - that's the exact type of package that I was aiming to put together at the end of this thread, so others can compile VS with mingw. I'll check it in a few hours.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

So now the revisited build steps from scratch are:

1. install mingw
2. install code::blocks
3. dovnload the current svn repository for vegastrike and vega-vc9
4. apply the mingw patch from post http://forums.vega-strike.org/viewtopic ... 00#p130327
5. add

Code: Select all

#include <stdlib.h>
to src/audio/codecs/OggStream.cpp
6. Add HAVE_TR1_UNORDERED_MAP and _WCHAR_T_DEFINED to the current project's build properties/compiler #defines
7. add the headers and libs from http://sourceforge.net/projects/vegaogr ... p/download to mingw (and the binaries to the game dir after compilation is done)
8. in project build options/linker settings remove "static" from the name of the libs

>> still missing alut.

9. compile and install freealut-1.1.0, includes in /include/al/alut.h, lib in /lin/libalut.a

10. Still getting the python linker errors:

Code: Select all

Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyInt_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyInt_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyLong_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyBool_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyFloat_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyString_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyUnicode_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyComplex_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp___Py_NoneStruct'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyComplex_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyFloat_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyFloat_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyFloat_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyFloat_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyComplex_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyFloat_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyComplex_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyFloat_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp___Py_NoneStruct'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp___Py_NoneStruct'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp___Py_NoneStruct'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyComplex_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyComplex_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyComplex_Type'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyExc_OverflowError'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyExc_OverflowError'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyExc_OverflowError'|
Release Win32\vegastrike\vegastrike\boost\1_45\src\converter\builtin_converters.o:builtin_converters.cpp|| undefined reference to `_imp__PyExc_OverflowError'|
make me a sandwich
make: *** No rule to make target 'me'. Stop.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

Forget about steps 6-10
Download http://sourceforge.net/projects/vegaogr ... p/download
Follow the included readme.txt. It should build without any issues.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

Okay, I tried that; I get the following in build log:

Code: Select all

Compiling: ..\vegastrike\src\gfx\jpeg_memory.cpp
In file included from C:\games\vegastrike\mingw-work\vegastrike\src\gfx\jpeg_memory.cpp:1:0:
C:\games\vegastrike\mingw-work\vegastrike\src\gfx\jpeg_memory.h:2:0: warning: "JPEG_SUPPORT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
In file included from C:\games\vegastrike\mingw-work\vegastrike\src\gfx\jpeg_memory.h:37:0,
                 from C:\games\vegastrike\mingw-work\vegastrike\src\gfx\jpeg_memory.cpp:1:
include/jpeglib.h:96:3: error: 'boolean1' does not name a type
include/jpeglib.h:112:3: error: 'boolean1' does not name a type
include/jpeglib.h:167:3: error: 'boolean1' does not name a type
include/jpeglib.h:270:3: error: 'boolean1' does not name a type
include/jpeglib.h:285:3: error: 'boolean1' does not name a type
include/jpeglib.h:354:3: error: 'boolean1' does not name a type
include/jpeglib.h:355:3: error: 'boolean1' does not name a type
include/jpeglib.h:356:3: error: 'boolean1' does not name a type
include/jpeglib.h:357:3: error: 'boolean1' does not name a type
include/jpeglib.h:374:3: error: 'boolean1' does not name a type
include/jpeglib.h:384:3: error: 'boolean1' does not name a type
include/jpeglib.h:400:3: error: 'boolean1' does not name a type
include/jpeglib.h:460:3: error: 'boolean1' does not name a type
include/jpeglib.h:484:3: error: 'boolean1' does not name a type
include/jpeglib.h:485:3: error: 'boolean1' does not name a type
Process terminated with status 1 (7 minutes, 42 seconds)
50 errors, 6986 warnings
and in build messages:

Code: Select all

C:\games\vegastrike\mingw-work\vegastrike\src\cmd\atmosphere.cpp|62|note: 'localDir.QVector::<anonymous>.QVector::<anonymous union>::k' was declared here|
with the following code highlighted: src/cmd/atmosphere.cpp line 62

Code: Select all

  QVector localDir;
make me a sandwich
make: *** No rule to make target 'me'. Stop.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

Ahh, sorry. Here is the complete mingw compatiblity patch:
http://sourceforge.net/projects/vegaogr ... h/download
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

Still not done. I got vegastrike.exe built, but now it complains it can't find libgcc_s_sjlj-1.dll - a quick search revealed that it's a library from mingw-x64 (mine is the regular x32) and that the dependency is eliminated by using -static-libgcc as a linker flag. Well the flag is set, why is this dependency still active? I tried removing the flag and linking again, same issue still present.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

Because of the dependencies not using -static-libgcc. I'll update vegastrike_mingw.zip.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

I've included libgcc_s_sjlj and libstdc++, libwinpthread just to make sure nothing else is missing.
Download http://sourceforge.net/projects/vegaogr ... p/download
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

Hallelujah. Now it works.

Thanks for the help! Now there is a (relatively) simple to setup build system alternate.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

Great. Now if we could get the patches into trunk.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Mingw: the Nov 2012 attempt

Post by klauss »

That'll be easier to get to trunk now that we have review board again :)

PS: we must be certain not to break linux or win MSVC in the process.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

I'm doing a test tonight to see if the current SVN revision (13450) with the mingw patches (vegastrike_mingw.patch) compiles cleanly on Windows with both mingw and VSexpress2012, and on xubuntu-12.04

Will report results later. Might take all night because all I have with me is a 1GHz netbook. :)

(edit)

Pass1: toolchain=mingw with log0 patches from above:
Result=OK, binary runs with the dlls from the zip file http://sourceforge.net/projects/vegaogr ... p/download above.

Pass2: toolchain=VS express 2012 as per the notes from my other thread http://forums.vega-strike.org/viewtopic.php?f=5&t=18156
Working notes:
1.added BOOST_NO_0X_HDR_INITIALIZER_LIST to preprocessor defines,
2. replaced python 2.7 and glut with libs/includes compiled with VS2012 - note that the linker wants 2 static libs for glut, one named freeglut.lib and one glut32.lib, but which must be identical; also the python 2.7.3 includes from the original distribution miss pyconfig.h, so I left the original headers in vega-vc9/include/python
3. Resources.rc line 11: change afxres.h to WinResrc.h)
4. Using same sources patched for mingw

Result=OK, no compile problems, binary runs fine with updated freeglut and python dlls.

Pass3: toolchain=gcc 4.6.3 on xubuntu-12.04 same sources with mingw patches as above. (working)
Last edited by shenle on Mon Nov 26, 2012 4:16 am, edited 1 time in total.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Mingw: the Nov 2012 attempt

Post by klauss »

Please upload the patch to the review board, I'd like to discuss a few changes before merging.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

Huh, the Linux build fails with errors in vsimage.cpp:

Code: Select all

vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:397:27: error: field ‘pub’ has incomplete type
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:401:19: error: expected constructor, destructor, or type conversion before ‘my_error_exit’
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp: In member function ‘unsigned char* VSImage::ReadJPEG()’:
/vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:417:5: error: ‘JSAMPARRAY’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:417:20: error: expected ‘;’ before ‘row_pointers’
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:421:9: error: ‘jpeg_decompress_struct’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:421:32: error: expected ‘;’ before ‘cinfo’
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:425:9: error: ‘cinfo’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:425:43: error: ‘struct my_error_mgr’ has no member named ‘pub’
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:425:47: error: ‘jpeg_std_error’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:426:14: error: ‘struct my_error_mgr’ has no member named ‘pub’
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:426:31: error: ‘my_error_exit’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:430:45: error: ‘jpeg_destroy_decompress’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:435:40: error: ‘jpeg_create_decompress’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:437:30: error: ‘j_decompress_ptr’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:437:73: error: ‘jpeg_stdio_src’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:439:98: error: ‘jpeg_memory_src’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:440:42: error: ‘TRUE’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:440:47: error: ‘jpeg_read_header’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:446:46: error: ‘jpeg_start_decompress’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:471:9: error: ‘row_pointers’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:482:93: error: ‘jpeg_read_scanlines’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:483:47: error: ‘jpeg_finish_decompress’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:484:41: error: ‘jpeg_destroy_decompress’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:501:13: error: ‘row_pointers’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:502:9: error: ‘row_pointers’ was not declared in this scope
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp: In member function ‘unsigned char* VSImage::ReadDDS()’:
vegastrike/mingw-test/vegastrike/src/gfx/vsimage.cpp:634:20: warning: unused variable ‘internal’ [-Wunused-variable]
make me a sandwich
make: *** No rule to make target 'me'. Stop.
log0

Re: Mingw: the Nov 2012 attempt

Post by log0 »

Remove JPEG_SUPPORT check.

I've pushed mingw compatibility patches for review which should compile without problems.

http://dev.vega-strike.org/r/
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Mingw: the Nov 2012 attempt

Post by klauss »

log0 wrote:Remove JPEG_SUPPORT check.

I've pushed mingw compatibility patches for review which should compile without problems.

http://dev.vega-strike.org/r/
I just answered a few. Mail notifications seem not to work yet (I've already told www2).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Mingw: the Nov 2012 attempt

Post by pheonixstorm »

the mail notifications were a bit weird to get working the first time
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: Mingw: the Nov 2012 attempt

Post by shenle »

log0 wrote:Remove JPEG_SUPPORT check.
You mean from cmake? I can't seem to find JPEG_SUPPORT there.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
Post Reply