Rockbox Development > Starting Development and Compiling
rockboxdev.sh doesn't seem to run on Mac OS?
speachy:
--- Quote from: rockbox_dev123 on September 27, 2023, 02:47:05 PM ---I made the greadlink changes myself and then gave up when I patched everything and realised as chris said, that the cross compilation fails. I went down the rabbit hole and tried different compilers but eventually got out of my depth.
--- End quote ---
I have a toolchain bump to GCC 8.5 sitting in gerrit, that should have a better shot of successfully building on MacOS. (I've been holding it off until we get the 4.0 release out)
(See https://gerrit.rockbox.org/r/c/rockbox/+/4676 )
Mudb0y:
Thanks for all the suggestions! I think I'll just go with the Linux VM, it seems like the easiest approach. Say, is there a way to compile a Mac OS simulator build from Linux? I know people have been building sims for recent Mac OS and I wonder how they did that if the toolchain doesn't run on the platform it self.
speachy:
Simulator builds typically use the platform's native toolchain rather than a cross-compiler. (Except Windows, because it's a special snowflake)
That said, there is a series of WIP patches in gerrit to greatly improve MacOS simulator situation.
rockbox_dev123:
--- Quote from: speachy on September 27, 2023, 08:48:52 PM ---
--- Quote from: rockbox_dev123 on September 27, 2023, 02:47:05 PM ---I made the greadlink changes myself and then gave up when I patched everything and realised as chris said, that the cross compilation fails. I went down the rabbit hole and tried different compilers but eventually got out of my depth.
--- End quote ---
I have a toolchain bump to GCC 8.5 sitting in gerrit, that should have a better shot of successfully building on MacOS. (I've been holding it off until we get the 4.0 release out)
(See https://gerrit.rockbox.org/r/c/rockbox/+/4676 )
--- End quote ---
Nice.
I did the following:
--- Code: ---$ git clone https://gerrit.rockbox.org/r/rockbox
$ cd rockbox/
$ git fetch https://gerrit.rockbox.org/r/rockbox refs/changes/76/4676/34 && git checkout -b change-4676 FETCH_HEAD
$ sed -i '' 's/readlink/greadlink/g' tools/rockboxdev.sh
--- End code ---
I had to add "gmp" to the $needs_libs variable passed to the "build" function (for target "a") to get it to find the gmp include directory correctly.
e.g.
--- Code: ---- build "binutils" "arm-elf-eabi" "2.37" "" "$binopts --disable-werror" "isl"
+ build "binutils" "arm-elf-eabi" "2.37" "" "$binopts --disable-werror" "gmp isl"
--- End code ---
This allows me to build binutils.
However, the compilation of gcc fails.
I remember now that this was where I gave up when I last tried this.
The relevant gcc failure from the log file:
--- Code: ---checking dependency style of g++... /bin/sh ../../gcc-8.5.0/gcc/../move-if-change tmp-mlib.h multilib.h
echo timestamp > s-mlib
Undefined symbols for architecture arm64:
"_arm_abi", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch3m", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch4", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch5", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch5e", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch6", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch6k", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch6m", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch7", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch7em", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch8", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch_arm_hwdiv", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch_iwmmxt", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch_lpae", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch_notm", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_arch_thumb2", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_base_arch", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_disable_literal_pool", referenced from:
___cxx_global_var_init in gencondmd.o
"_arm_restrict_it", referenced from:
___cxx_global_var_init in gencondmd.o
"_flag_pic", referenced from:
___cxx_global_var_init in gencondmd.o
"_operands", referenced from:
___cxx_global_var_init in gencondmd.o
"_optimize_size", referenced from:
___cxx_global_var_init in gencondmd.o
"_reload_completed", referenced from:
___cxx_global_var_init in gencondmd.o
"_reload_in_progress", referenced from:
___cxx_global_var_init in gencondmd.o
"_target_flags", referenced from:
___cxx_global_var_init in gencondmd.o
"_this_target_rtl", referenced from:
___cxx_global_var_init in gencondmd.o
"_unaligned_access", referenced from:
___cxx_global_var_init in gencondmd.o
"_use_cmse", referenced from:
___cxx_global_var_init in gencondmd.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:2870: build/gencondmd] Error 1
--- End code ---
EDIT: I believe gcc would need to be updated to at least 11 to have arm64-apple-darwin support.
speachy:
--- Quote from: rockbox_dev123 on September 29, 2023, 05:15:44 PM ---EDIT: I believe gcc would need to be updated to at least 11 to have arm64-apple-darwin support.
--- End quote ---
Well, that's disappointing. We'll get there eventually though; I expect after GCC8 I'll shoot for 12. Surprisingly, the hosted targets are the problematic ones as we have to stick to old libc to maintain ABI compatibility with the existing stuff.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version