Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Setting up the Win32 cross compiler from WSL
« previous next »
  • Print
Pages: [1]

Author Topic: Setting up the Win32 cross compiler from WSL  (Read 1005 times)

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9214
Setting up the Win32 cross compiler from WSL
« 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).
« Last Edit: November 07, 2021, 12:10:54 AM by saratoga »
Logged

Offline __builtin

  • Developer
  • Member
  • *
  • Posts: 405
  • iPod 6G, c200v1 (RIP), e200v1 (RIP)
    • FWEI.TK
Re: Setting up the Win32 cross compiler from WSL
« Reply #1 on: November 10, 2021, 02:41:08 AM »
What is the output of "file /home/mike/rockbox/winsim/apps/bitmaps/mono/default_icons.o"?
Logged
No support questions by PM, please.

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 9214
Re: Setting up the Win32 cross compiler from WSL
« Reply #2 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. 
Logged

Offline 7o9

  • Member
  • *
  • Posts: 117
Re: Setting up the Win32 cross compiler from WSL
« Reply #3 on: May 26, 2022, 01:56:05 PM »
To follow up on our brief exchange on IRC, I can compile the current version on my Ubuntu on Windows Subsystem for Unix following the guide at https://www.rockbox.org/wiki/Windows10CrossCompiler.

I was wrong that I compiled mine last in winter, it was actually in june 2021.

The only thing I did to make it compile was edit apps/plugins/SUBDIRS to remove midi/mikmod/lua/lua_scripts. It is quite possible some of these can be made to compile, but I did not need them.

My Ubuntu is a bit old now though, it is 20.04 (outdated too, last updated june 2021). mingw-w64 claims to be 7.0.0-2, with i686-w64-mingw32-gcc 9.3-win32.

With those 4 plugins removed, it compiles quickly and without errors.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Setting up the Win32 cross compiler from WSL
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.026 seconds with 17 queries.