Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: saratoga on November 07, 2021, 12:09:08 AM

Title: Setting up the Win32 cross compiler from WSL
Post by: saratoga on November 07, 2021, 12:09:08 AM
I've done this before but cannot seem to get it to work now.  I've followed the instructions here:

https://www.rockbox.org/wiki/Windows10CrossCompiler#Build_Simulator

I configure a win32 simulator build and disable codecs (since mikmod won't build on win32 due to typedef conflicts).  The build process fails:

Code: [Select]
CC apps/tagcache.c
CC lang_core.c
CC firmware/powermgmt.c
CC firmware/usb.c
CC firmware/logf.c
CC firmware/panic.c
CC firmware/scroll_engine.c
CC firmware/font.c
CC firmware/drivers/lcd-16bit.c
CONVBDF fonts/08-Schumacher-Clean.bdf
CC winsim/sysfont.c
AR libfirmware.a
CC lib/rbcodec/metadata/hes.c
AR librbcodec.a
LD rockboxui.exe
/usr/bin/i686-w64-mingw32-ld: /home/mike/rockbox/winsim/apps/bitmaps/mono/default_icons.o: Relocations in generic ELF (EM: 40)
/home/mike/rockbox/winsim/apps/bitmaps/mono/default_icons.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
/home/mike/rockbox/uisimulator/uisimulator.make:34: recipe for target '/home/mike/rockbox/winsim/rockboxui.exe' failed
make: *** [/home/mike/rockbox/winsim/rockboxui.exe] Error 1
mike@Home-PC:~/rockbox/winsim$

I'm running mingw-w64 5.0.3-1 (per apt-get).
Title: Re: Setting up the Win32 cross compiler from WSL
Post by: __builtin on November 10, 2021, 02:41:08 AM
What is the output of "file /home/mike/rockbox/winsim/apps/bitmaps/mono/default_icons.o"?
Title: Re: Setting up the Win32 cross compiler from WSL
Post by: saratoga on November 11, 2021, 12:24:57 AM
Code: [Select]
mike@Home-PC:~/rockbox/winsim$ file /home/mike/rockbox/winsim/apps/bitmaps/mono/default_icons.o
/home/mike/rockbox/winsim/apps/bitmaps/mono/default_icons.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped

So something is wrong there.