Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: Inclement Death on August 21, 2020, 11:05:45 PM

Title: Error while compiling UI Simulator using Win10 cross compiler instructions
Post by: Inclement Death on August 21, 2020, 11:05:45 PM
Used the instructions from https://www.rockbox.org/wiki/Windows10CrossCompiler and received the following error when compiling with the "make" command in WSL Ubuntu:

Quote
LD rockboxui.exe
/home/rob/rockbox/build-simulator/apps/action.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make: *** [/home/rob/rockbox/uisimulator/uisimulator.make:34: /home/rob/rockbox/build-simulator/rockboxui.exe] Error 1


Also, the instructions need some updating simplification.

Installing SDL 1.2.15 "sudo make install" did not create the "cross-tools" folder in "usr/local/bin" due to a permissions issue. Had to create the folder manually.

Compiling instructions are... umm... vague.

From the Windows 10 Cross Compiler Wiki page:

Quote
Now you can compile the simulator:
enter your build directory and run somewhere/rockbox/configure
select platform, enter "A" (advanced), "S" (simulator) and "W" (Win32 cross-compile)
make it!


Should be (for us Windows devs that have been spoiled by Visual Studio and its built in compiler):

Quote
Enter or create a build folder in your rockbox directory (eg. rockbox/build-simulator)
Enter build directory and run "../tools/configure"
Select your platform ("22" for iPod Video)
Enter "A" for "(A)dvanced" option
Enter "S" for "(S)imulator", then press enter
Enter"W" for "(W)in32 cross-compile", then press enter twice

After build is configured, run "make".

Title: Re: Error while compiling UI Simulator using Win10 cross compiler instructions
Post by: Inclement Death on August 22, 2020, 12:30:24 AM
Ok, ran "../tools/configure" again and have a different error.

Code: [Select]
CC apps/recorder/jpeg_idct_arm.S
CC apps/usb_keymaps.c
CC firmware/timer.c
CC firmware/debug.c
CC firmware/libc/atoi.c
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:25:31: error: apps/core_asmdefs.h: No such file or directory
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S: Assembler messages:
CC firmware/libc/errno.c/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:322:
Error: undefined symbol `pix8_size' in operationCC firmware/libc/ctype.c

In file included from /home/rob/rockbox/apps/usb_keymaps.c:24/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:323: :
Error: /home/rob/rockbox/build-simulator/lang/lang.h:15:47:CC firmware/libc/sprintf.cundefined symbol `pix8_size' in operation

error: /home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:625: /home/rob/rockbox/build/lang_enum.h: No such file or directoryCC firmware/libc/memchr.cError:

undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:626: Error: undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:627: Error: undefined symbol `pix8_size' in operation
CC firmware/libc/memcmp.c/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:628:
Error: undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:629: Error: undefined symbol `pix8_size' in operation/home/rob/rockbox/apps/usb_keymaps.c:52: error: ‘LANG_MULTIMEDIA_MODE’ undeclared here (not in a function)

/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:630: /home/rob/rockbox/apps/usb_keymaps.c:68: error: ‘LANG_PRESENTATION_MODE’ undeclared here (not in a function)Error:
CC firmware/libc/qsort.cundefined symbol `pix8_size' in operation/home/rob/rockbox/apps/usb_keymaps.c:89: error: ‘LANG_BROWSER_MODE’ undeclared here (not in a function)


/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:721: CC firmware/libc/random.c/home/rob/rockbox/apps/usb_keymaps.c:112: error: ‘LANG_MOUSE_MODE’ undeclared here (not in a function)Error:

undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:722: Error: undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:723: Error: undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:724: make: *** [/home/rob/rockbox/tools/root.make:409: /home/rob/rockbox/build-simulator/apps/usb_keymaps.o] Error 1
Error: make: *** Waiting for unfinished jobs....
undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:725: Error: undefined symbol `pix8_size' in operation
/home/rob/rockbox/apps/recorder/jpeg_idct_arm.S:726: Error: undefined symbol `pix8_size' in operation
make: *** [/home/rob/rockbox/tools/root.make:413: /home/rob/rockbox/build-simulator/apps/recorder/jpeg_idct_arm.o] Error 1

Ran "../tools/configure" again and...
Code: [Select]
    LD rockboxui.exe
    /home/rob/rockbox/build-simulator/apps/action.o: file not recognized: file format not recognized
    collect2: error: ld returned 1 exit status
    make: *** [/home/rob/rockbox/uisimulator/uisimulator.make:34: /home/rob/rockbox/build-simulator/rockboxui.exe] Error 1

...back to the same error.
Title: Re: Error while compiling UI Simulator using Win10 cross compiler instructions
Post by: Bilgus on August 22, 2020, 09:19:21 AM
I always see people having issues due to dependencies missing maybe try these from the more recent beginners guide?

Code: [Select]
sudo apt-get install automake bison build-essential ccache flex libc6-dev libgmp3-dev libmpfr-dev libsdl1.2-dev libtool-bin texinfo zip gawk
https://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling (https://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling)
Title: Re: Error while compiling UI Simulator using Win10 cross compiler instructions
Post by: Inclement Death on August 22, 2020, 02:27:13 PM
I solved it about an hour ago by running "make clean".

Just needed to get some sleep. Woke up this morning and realized I'd seen a similar issue when compiling a media player I wrote a few years ago that I wrote in C++ using VS2015, but wrote for multiple platforms. I remembered spending hours going through options, searching the web, and rebuilding repeatedly. Then, I realized I had turned off the option to clean before build. I turned it back on and my code compiled just fine.

I looked up how to clean the configuration output using make (yes, there was a facepalm involved), ran the clean command, and I now have a working UI Simulator.

Thank you for your assistance.

P.S. May want to add that to the build wiki