Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: GiraffeMan3125 on July 29, 2020, 12:38:51 PM

Title: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: GiraffeMan3125 on July 29, 2020, 12:38:51 PM
I'm trying to install arm-elf-eabi-gcc so I can build Rockbox, but I haven't found out how to install it. Does anybody have a working method for installing it?
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: saratoga on July 29, 2020, 12:44:02 PM
https://www.rockbox.org/wiki/DevelopmentGuide
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: GiraffeMan3125 on July 29, 2020, 02:20:49 PM
Code: [Select]
rockboxdev.sh: line 35: nproc: command not found while running rockboxdev.sh
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: GiraffeMan3125 on August 06, 2020, 05:56:54 PM
I'm still having this issue
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: GiraffeMan3125 on August 06, 2020, 06:08:27 PM
I'm trying to install the GCC toolchain so I can use rockbox, but when I run rockboxdev.sh, I get the error
Code: [Select]
rockboxdev.sh: line 35: nproc: command not foundPlease help.
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: saratoga on August 06, 2020, 08:09:03 PM
What is your operating system?
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: __builtin on August 06, 2020, 09:32:58 PM
What platform are you building on? nproc is a coreutils component.
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: GiraffeMan3125 on August 07, 2020, 07:15:08 AM
macOS Catalina. I'm trying to install rockbox on an iPod 5th Gen.
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: saratoga on August 07, 2020, 09:47:37 AM
The last few versions of MacOS have broken compatibility with a lot of our development tools. When I tried a few years back, the first thing thing I had to do was install gcc (since Apple stopped supporting it in favor of llvm).

Alternatively you could use a Linux VM or find a windows machine.
Title: Re: rockboxdev.sh: line 35: nproc: command not found, arm-elf-eabi-gcc
Post by: bluebrother on August 07, 2020, 01:11:04 PM
Apply this (I'm going to add it to git later, after I checked it on Linux):

Code: [Select]
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 6b12fa015e..09b420c0c9 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -32,7 +32,12 @@ fi
 # This is the absolute path to where the script resides.
 rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
-parallel=`nproc`
+if [ `uname -s` != "Darwin" ]; then
+    parallel=`nproc`
+else
+    parallel=`sysctl -n hw.physicalcpu`
+fi
+
 if [ $parallel -gt 1 ] ; then
   make_parallel=-j$parallel
 fi

After that you'll need further tools, likely best approach is to use homebrew.