Building for Windows on Linux

Post Reply
Bugbear
Posts: 30
Joined: Sun Jan 11, 2015 3:45 am

Building for Windows on Linux

Post by Bugbear »

Hi all,
So I've got my shiny gaming rig (with Windows 8) that runs the pre-compiled binaries fine.

Because I like to make things difficult for myself, I've installed Virtualbox on the gaming rig, spun up a Debian guest and followed the instructions in COMPILING.txt (specifically, sections 1.1 and 1.3).

When I run 'make' to build everything, I get the following errors:

Code: Select all

...<snip>...

Making all in win32
make[2]: Entering directory '/home/bugbear/Documents/Pioneer/CmdrB_pioneer/pioneer/src/win32'
  CXX      FileSystemWin32.o
../../depcomp: line 772: exec: i686-w64-mingw32.static-g++: not found
Makefile:367: recipe for target 'FileSystemWin32.o' failed
make[2]: *** [FileSystemWin32.o] Error 127
make[2]: Leaving directory '/home/bugbear/Documents/Pioneer/CmdrB_pioneer/pioneer/src/win32'
Makefile:1304: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/bugbear/Documents/Pioneer/CmdrB_pioneer/pioneer/src'
Makefile:401: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
bugbear@PioneerBuild:~/Documents/Pioneer/CmdrB_pioneer/pioneer$ 
I'm sure I've done something silly with my build environment but I'm at a loss to know what.

I don't get this error when I remove "--with-mxe=/path/to/mxe" from the ./configure command

Any suggestions?

Cheers.
impaktor
Posts: 1008
Joined: Fri Dec 20, 2013 9:54 am
Location: Tellus
Contact:

Re: Building for Windows on Linux

Post by impaktor »

Not sure I understand what you're trying to do. Are you building a windows release from a virtual linux?

If your aim is to build for windows, then why not build it directly on windows?

If your aim is to build for Linux, and run it in a virtual box (not sure what performance you'd get), then why build mxe?
I don't get this error when I remove "--with-mxe=/path/to/mxe" from the ./configure command
So then it works?
Bugbear
Posts: 30
Joined: Sun Jan 11, 2015 3:45 am

Re: Building for Windows on Linux

Post by Bugbear »

Hi Impaktor,
Like I said, I sometimes do things the hard way for no real benefit. Your understanding is correct - I'm building a Windows release using a virtual linux box.

To understand why I'm doing it this way, you'll get an insight into the insanity that is my brain. A rant is to follow. Feel free to ignore the next couple of paragraphs.

Code: Select all

Yes, it would be far simpler to install Visual Studio and compile it natively on Windows.  However, 
I've recently decided to swear off Windows (Microsoft have joined my 'list' that includes the likes 
of Facebook and Google) and so while I do have a Windows 8 gaming machine, I only do gaming 
on that machine.  I'm attempting to limit my exposure to Microsoft's data gathering machinations.  
A futile gesture?  Probably, but fuck Microsoft.  I hate what they (and Facebook and Google et al) 
have done to modern day computing.  I'm currently eyeing off System 76 for my next personal laptop...

And to make my inconsistency complete, I make a (rather good) living as a Windows Server system 
administrator and consultant.
Using my Linux VM, I have actually been able to build a Windows executable that launched, go to the start menu, then seg faulted once I started a game.

Regardless, if what I'm attempting is illogical, then perhaps I'll need to bite the bullet and download VS after all (urgh)
Last edited by Bugbear on Sat Jun 03, 2017 1:04 pm, edited 1 time in total.
FluffyFreak
Posts: 1343
Joined: Tue Jul 02, 2013 1:49 pm
Location: Beeston, Nottinghamshire, GB
Contact:

Re: Building for Windows on Linux

Post by FluffyFreak »

I seem to remember that this was a total fucker to get working, even on Linux under the usual tools.

You'll need the path to MXE, i.e: "--with-mxe=/path/to/mxe"
You also might find it easier to add the path to pioneer-thirdparty, i.e: "--with-thirdparty=/path/to/pioneer-thirdparty"

If you've gotten MXE installed then you need ot make sure that the packages we use are built/installed for it, this requires quite a lot of digging through the MXE doc's I recall.

I'm afraid it's been at least 2 years since I last did anything with MXE so I hope that helps!
Bugbear
Posts: 30
Joined: Sun Jan 11, 2015 3:45 am

Re: Building for Windows on Linux

Post by Bugbear »

Yes I'm building with the pioneer-thirdparty parameter.

Hmmm....digging around the MXE docs doesn't sound appealing (I do enough of that at work - so shoot me, I'm lazy ;-) ). At my current level of experience, I remember some of my C++ lectures from uni, although I've not done any serious C++ programming. Hell, I'm not even sure what the bootstrap, configure and make command actually do (presumably some web searching will cast light on that...).

I think I'll try spinning up a fresh VM, install everything from scratch again and see how I go.
Post Reply