Bug 14801

Summary: buildsys: "File name too long" errors when creating `.dep` files
Product: uClibc++ Reporter: Alois Klink <alois+busybox>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: uclibc-cvs
Priority: P5    
Version: 0.2.5   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Alois Klink 2022-05-17 15:46:55 UTC
It looks like this error has already been fixed in the `master` branch: https://git.uclibc.org/uClibc++/commit/?id=6687fc9276fa52defaf8592f2001c19b826aec93

Still, I thought I'd document it since it took me quite a while of debugging to find the cause of this error (and maybe to gently nudge for a v0.2.6 release)

Building uClibc++ encodes the path to libsup and libgcc as a filename.
On most systems, the maximum filepath is longer than the maximum filename.

Linux defaults to 4096 for the max filepath length and 255 for the max filename length.

Using cross-compiling SDKs can easily create a filepath over 255 chars, and thus cause uClibc++ to fail to build due to maximum filepath errors.

This error has reached a few people using the OpenWRT SDK:
  - https://forum.openwrt.org/t/buid-package-uclibc-failed-by-using-openwrt-sdk/64377
  - https://lists.openwrt.org/pipermail/openwrt-devel/2021-May/035321.html
  - https://github.com/trojan-gfw/trojan/issues/588