Rockbox Development > Starting Development and Compiling

Trying and failing to build simulator for Windows10 on Ubuntu box

(1/2) > >>

I'm struggling with this.  I want to build an up-to-date simulator to run on windows (mainly in order to try and build the coverflow image database on the PC, because I can't get that to work on iflash modded ipods, presumably for the usual disk-writing ATA-driver reasons).

When I try and follow the instructions I get to this bit:

If you're getting this message during configuring: '*** Your compiler (/usr/bin/gcc) does not produce Win32 executables!', try doing this:

CC=/usr/bin/i586-mingw32msvc-gcc CXX=/usr/bin/i586-mingw32msvc-gcc ./configure --host=i586-mingw32msvc --prefix=${HOME}/mingw32-sdl

And as I do get that message, I try what it suggests, but then I end up (after lots of "checking....yes" lines) getting

"checking Win32
Your compiler (gcc) does not produce Win32 exectuables!"

Possibly relevant is that I couldn't find Mingw32 or work out how to install it, and ended up installing Mingw64.

Help on how to compile the simulator for windows (on Ubuntu), or just a download of the up-to-date compiled simulator with the current version of rockbox, would be appreciated.

You didn't mention what player you're trying to build for, so I cannot build one for you ...

--- Quote from: Frankenpod on October 08, 2020, 09:11:20 PM ---
If you're getting this message during configuring: '*** Your compiler (/usr/bin/gcc) does not produce Win32 executables!', try doing this:

CC=/usr/bin/i586-mingw32msvc-gcc CXX=/usr/bin/i586-mingw32msvc-gcc ./configure --host=i586-mingw32msvc --prefix=${HOME}/mingw32-sdl

--- End quote ---

Not sure how you're trying to build, but Rockbox doesn't use autotools, so the build process looks a bit different and that ./configure won't work like that.
When I'm trying to configure Rockbox for a cross compile sim build I'll get something like this:

--- Code: ---Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, (C)heckWPS, (D)atabase tool, (W)arble codec tool: (Defaults to N)
Advanced build selected

Enter your developer options (press only enter when done)
(D)EBUG, (L)ogf, Boot(c)hart, (S)imulator, (P)rofiling, (V)oice, (W)in32 crosscompile,
Win(6)4 crosscompile, (T)est plugins, S(m)all C lib, Logf to Ser(i)al port:, (R)TC MOD
Enabling Windows cross-compiling (32-bit)
Simulator build enabled

Unsetting APPLICATION define for SIMULATOR build
Using source code root directory: /home/dom/projects/rockbox
WARNING: unable to find cross-compiler for 32-bit Windows environment!
WARNING: it's none of "i686-w64-mingw32 i686-pc-mingw32 i586-mingw32msvc".
WARNING: set your compiler prefix with CROSS_COMPILE="your-prefix-" and
WARNING: re-run configure again!

--- End code ---

First, you need the actual cross compiler. You're trying to use the host compiler (i.e. the compiler on the Linux system for compiling Linux binaries). You need to install the cross compiler. You can either do that using the compiler your distro ships or build it yourself.

A cross compiler usually will have a prefix. You need to know this prefix. Usually it's something like i686-pc-mingw32. Now you need to make sure the compiler is in the PATH and you know the prefix. Then you run configure and pass those values. I'm using mxe ( as cross compiler, and I have it in ~/local/mxe. You need to adjust the paths and prefix values according to your setup. If you installed the cross compiler from your distro sources you'll likely don't need to adjust PATH.

--- Code: ---mkdir build && cd build
PATH=~/local/mxe/usr/bin/:$PATH CROSS_COMPILE=i686-w64-mingw32.static- ../tools/configure

--- End code ---
Configure (see above) and then simply make the sim. lua and mikmod plugins didn't build for me, so I had to disable them. The resulting binary worked find in a Windows VM.

Btw, I prefer to use mxe since it does build the cross compiler for me, and also has sdl (I only compile the packes I use though, make cc sdl should be sufficient in your case)

Oops - sorry, I started posting about it in a different thread in different sub-forum and forgot to repeat in this one what the device was.

this began in,53430.0.html

It's for the Ipod classic.  Looking to get the pictureflow plugin to work, but it doens't manage to build the database on he actual device, and I don't know if that's a bug in the plugin or if it's just because the device is flash modded (or because it has too many tracks).  The simulator builds available for download don't use the most recent version of the pictureflow plugin so I can't use those.

Will read your advice and try again to build the simulator (when I can summon up the energy to have another shot at it!  I'm not very experienced with linux)

I created one here:

Win32 binary, current development snapshot. I had to disable mikmod and lua plugins, since those didn't compile (therefore the build will show up as modified, it acually isn't modified except disabling those 2 plugins)

Also, are you working on Linux or WSL?

Oh, thanks!  Will try with that.

Was using my old 'retired' PC, which now runs Ubuntu Linux.


[0] Message Index

[#] Next page

Go to full version