Warning: Undefined array key "mailguard" in /home/rockbox/flyspray/plugins/dokuwiki/inc/common.php on line 929 Warning: Undefined array key "mailguard" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parser/xhtml.php on line 697 FS#13002 : Fails to build from source under long build path with "execvp: /bin/sh: Argument list too long".


  • Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category Infrastructure → Build environment
  • Assigned To No-one
  • Operating System Sansa AMSv2
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by oid_maps - 2014-09-22
Last edited by speachy - 2021-05-12

FS#13002 - Fails to build from source under long build path with "execvp: /bin/sh: Argument list too long".

When I try to build rockbox, I get the following error:

=⇒ make: execvp: /bin/sh: Argument list too long

My build path is a fairly long path. Building it at a location with shorter path it works. Details:

Steps to reproduce:

* Create a location where you want to have the sources; use a fairly long path name, e.g.

  mkdir -p /home/myuser/download/mediaplayer_hardware/SanDisk/Sansa_Fuze_v2/rockbox/firmware/source/

* Change to that directory:

  cd /home/myuser/download/mediaplayer_hardware/SanDisk/Sansa_Fuze_v2/rockbox/firmware/source/

* Download git sources (Tried with version from 2014-09-22, 10:55:11 GMT+1, Commit by “Marcin Bukat marcin.bukat@gmail.com“, Change-Id: “Ie3aa9b208e3f4f17d4d02f11f69839e9b381217d”) to a long path:

  git clone git://git.rockbox.org/rockbox 

* Make a build directory and change into it:

  mkdir -p /home/myuser/download/mediaplayer_hardware/SanDisk/Sansa_Fuze_v2/rockbox/firmware/source/build_FuzeV2
  cd /home/myuser/download/mediaplayer_hardware/SanDisk/Sansa_Fuze_v2/rockbox/firmware/source/build_FuzeV2

* Configure the build:

  ../rockbox/tools/configure --target=63 --type=N
prodces the output

Using temporary directory /tmp
Platform set to sansafuzev2
Normal build selected
Using source code root directory: /home/myuser/download/mediaplayer_hardware/SanDisk/Sansa_Fuze_v2/rockbox/firmware/source/rockbox
Using arm-elf-eabi-gcc 4.4.4 (404)
Using arm-elf-eabi-ld
Found and uses ccache (/sbin/ccache)
Automatically selected arch: arm (ver 5)
Created Makefile


* Running “make”:

produces the output

Generating dependencies
make: execvp: /bin/sh: Argument list too long
make: *** No rule to make target ‘/home/myuser/download/mediaplayer_hardware/SanDisk/Sansa_Fuze_v2/rockbox/firmware/source/build_FuzeV2/make.dep’, needed by ‘all’. Stop.

and returns with exit code 2.


Building it in a directory with shorter path, e.g. doing everything in “/tmp”, works.

But that is only a workaround; it should not fail when building in arbitrary locations, and especially not with a message not making it clear _what_ the underlying problem ist. (I had to do a long internet search to get to the idea that the build place can be the problem).

Closed by  speachy
2021-05-12 21:42
Reason for closing:  Wont Fix
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

I don't think there is anything we can do about this, as it's a problem with the underlying OS.

But patches are always welcome.

"/bin/sh: Argument list too long"

It looks like your OS can't handle arguments long enough to generate the dependencies with such long paths. You could try updating, although I have no idea if that will fix it. I'm guessing that line is something like a full path list of all dependencies, which will be quite huge if the base path is very long.

I am using Arch Linux, bash version 4.3.24(1)-release, 64bit system; everything up to date ("bleeding edge", what Arch Linux' policy is) ca. mid of September 2014.

So I doubt that my OS is especially vulnerable to long paths.

But yes, the dependency list got very long.


Available keyboard shortcuts


Task Details

Task Editing