GCC preprocessor - maximum path length of the included header files

Asked by JiriJ

Dear all,
I have got a weird error message during the compile. Please see the console log:

Compiling xxx/yyyyyyyyyyyyyyyyyyyyyy/eeeeeeeeeeeeeeeee.c
In file included from xxx/yyyyyyyyyyyyyyyyyyyyyy/../zzzzzzzzzzzzzzzzzzzzzzzzzz/../project/uuuuu/../../qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/ssss/jjjjjjj.h:12:0,
make[1]: Leaving directory `/c/ddddd/bbbb.ccccccc/sssssssss/dddddddddddd/ffffffffffffffffffffffff'
                 from xxx/yyyyyyyyyyyyyyyyyyyyyy/../zzzzzzzzzzzzzzzzzzzzzzzzzz/../project/uuuuu/../../qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/ssss/bbbbbbbbbb.h:26,
                 from xxx/yyyyyyyyyyyyyyyyyyyyyy/../zzzzzzzzzzzzzzzzzzzzzzzzzz/../project/uuuuu/kkkkkkkkkkkk.h:21,
                 from xxx/yyyyyyyyyyyyyyyyyyyyyy/../zzzzzzzzzzzzzzzzzzzzzzzzzz/nnnnnnnnn.h:20,
                 from xxx/yyyyyyyyyyyyyyyyyyyyyy/mmmmmmmmmmmmm.h:19,
                 from xxx/yyyyyyyyyyyyyyyyyyyyyy/eeeeeeeeeeeeeeeee.c:23:
xxx/yyyyyyyyyyyyyyyyyyyyyy/../zzzzzzzzzzzzzzzzzzzzzzzzzz/../project/uuuuu/../../qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/ssss/../../qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq_cfg/hhhhhhhhhhh.h:13:48: fatal error: ../aaaaaaaaaaaaaaZ/ggggggg.h: No such file or directory

The header ggggggg.h is found if I changed the name of the parent directory - to be more precise: if I reduced the directory name length from "aaaaaaaaaaaaaaZ" to "aaaaaaaaaaaaaa".

Frankly I cannot change the directories structure and naming. I have not modified my previously working setting of the compiler etc.

Used GCC version: 4.7 2013q2

Many thanks for your hints,
Best regards, JiriJ

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Joey Ye (jinyun-ye) said :
#1

Are you using GCC on Windows? Windows has length constrain on path, which might be the cause.

Revision history for this message
JiriJ (jirij-0) said :
#2

Hello Joey,
I have just wanted to extend my information - you were faster ;-)
The GCC is being run on Windows 7. It seems my dir structure really exceeded the limit of WIn path length (MAX_PATH = 260).
Although I am using the "virtual drive" made by subst command it obviously is not enough - probably I will have to reduce the names length, damned.
Well, I will try to ask Google once more - maybe I will find some "patch"...

Thanks a lot,
Best regards, JiriJ

Revision history for this message
Joey Ye (jinyun-ye) said :
#3

Reduce the name length is all I can think of to solve it.

Thanks,
Joey

On Mon, Oct 14, 2013 at 5:21 PM, JiriJ <<email address hidden>
> wrote:

> Question #237311 on GCC ARM Embedded changed:
> https://answers.launchpad.net/gcc-arm-embedded/+question/237311
>
> JiriJ posted a new comment:
> Hello Joey,
> I have just wanted to extend my information - you were faster ;-)
> The GCC is being run on Windows 7. It seems my dir structure really
> exceeded the limit of WIn path length (MAX_PATH = 260).
> Although I am using the "virtual drive" made by subst command it obviously
> is not enough - probably I will have to reduce the names length, damned.
> Well, I will try to ask Google once more - maybe I will find some
> "patch"...
>
> Thanks a lot,
> Best regards, JiriJ
>
> --
> You received this question notification because you are an answer
> contact for GCC ARM Embedded.
>

Revision history for this message
JiriJ (jirij-0) said :
#4

Thanks Joey Ye, that solved my question.

Revision history for this message
JiriJ (jirij-0) said :
#5

Dear all,
my colleague has found the general solution:

http://gcc.gnu.org/ml/gcc-help/2013-05/msg00155.html

Enjoy it ;-)

Best regards,
JiriJ

Revision history for this message
jdobry (jdobry) said :
#6

here is patch (based on Vladimir Simonov code) port for 4.7 2013q3
http://pastebin.com/yUvdHySG

Revision history for this message
JiriJ (jirij-0) said :
#7

Joey,
May you estimate which release could include this patch? Hass a change list for 4.7q4 been already closed?

Thanks,
Best regards,
JiriJ

Revision history for this message
Joey Ye (jinyun-ye) said :
#8

JiriJ,

First of all, thanks for sharing, which could be very helpful. But there are more work to do:

1. The patch should be sent to <email address hidden>, rather than gcc-help. I guess that's the reason it got no response.

2. Has your colleague signed the FSF assignment in http://gcc.gnu.org/contribute.html? That is the Legal Prerequisites before his patch got accepted. Basically it makes the patch legal to GCC.

3. To be accepted by GCC mainline, it is required to have corresponding maintainers to approve it. Although I can approve it for embedded gcc branch once reviewed it, but I'd prefer it be accepted by GCC mainline first.

So far I can review and try the patch. It is highly encourage for you or your colleague to follow up above 3 points before we can talk about which release to include it.

Thanks,
Joey

Revision history for this message
jdobry (jdobry) said :
#9

Joey,

This patch was sent to "gcc-help at gcc dot gnu dot org", not <email address hidden> already.
See to achieve http://gcc.gnu.org/ml/gcc-help/2013-05/msg00155.html

I am not author of this patch, I made only backport for 4.7.

Question is, if it can be included on ARM GCC release independent to GCC mainline. (It haven't any public reaction yet)

Jiri

Revision history for this message
jdobry (jdobry) said :
#10

I try to contact author of this patch and he isn't member of gcc-patches.
A am not member too and I don't want to be.

What to do now?

PS: new version of patch for 4.8.1 from author http://gcc.gnu.org/ml/gcc-help/2013-10/msg00043.html

Revision history for this message
Joey Ye (jinyun-ye) said :
#11

So far can you please ask the author to send patch to gcc-patches, which is the right place for patch review? I don't think it is required to be a member to send.

Thanks,
Joey

Revision history for this message
jdobry (jdobry) said :
#12

Patch is in correct gcc-patches forum. Thanks to autor Vladimir Simonov.

http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01170.html

Is it possible use it in ARM GCC backported? (if it will included in newer version than next ARM GCC 4.8 2013q4 ??)

Revision history for this message
Joey Ye (jinyun-ye) said :
#13

Jdobry,

Thanks for this. As you can see I'm reviewing this patch. As long as relative maintainers approve it, we can bring it in. Hopefully it can meet deadline of 4.8, though not guaranteed.

Joey

Revision history for this message
juliaop (jjuliaop) said :
#14

Just install **Long Path Tool** For this problem.

regards,

Revision history for this message
aiden carter (aidencarter) said :
#15

Thanks,

The Long path tool is the very best program for error, unlock solution.
Try it and solved your problem.
I used the long path tool and I solved my error, unlocks problem solution.

Can you help with this problem?

Provide an answer of your own, or ask JiriJ for more information if necessary.

To post a message you must log in.