connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

CMake Error: : System Error: File name too long

Open RudyGOGOGO opened this issue 2 years ago • 8 comments

In order to cross-compile the examples/chip-tool for OpenWrt, I want to generate the makefile at first. However, I faced the error same as the title, for details, please check the attached errorLogsOfCMake.txt

To reproduce the issue with the latest commit (fbcaa81a96c9d372cb217c356bdbb6e7fd8eb7f9, I tried previous commits, it still failed due to the same error)

Step 1: Generate the JSON output through GN I have generated the json file based on the following command suggested in gn_to_cmakelist.py and gn_build_example gn gen --check --fail-on-unused-args --root=examples/chip-tool out/ --args= --ide=json

Step 2: Convert GN JSON output to CMakeList.txt python ./scripts/examples/gn_to_cmakelists.py out/project.json

Step 3: Run the cmake command cmake .

P.S. project.zip include the project.json produced by GN

project.zip

CMakeLists.txt

errorLogsOfCMake.txt

RudyGOGOGO avatar Mar 31 '22 19:03 RudyGOGOGO

@xylophone21 @tdrozdovsky @vivien-apple @bzbarsky-apple would you mind checking this for me?

RudyGOGOGO avatar Mar 31 '22 19:03 RudyGOGOGO

The filename involved is something like:

 /home/rudy/ESPIDE/connectedhomeip/out/CMakeFiles/third_party__connectedhomeip__third_party__pigweed__repo__pw_unit_test_unit_test_proto.python._mirror_sources_to_out_dir_pw_unit_test_proto.unit_test_pb2.pyi--____third_party__connectedhomeip__third_party__pigweed__repo__pw_build__python_toolchain__python.dir/compiler_depend.make.tmpbde04

Where is that coming from?

@mspang

bzbarsky-apple avatar Apr 01 '22 05:04 bzbarsky-apple

@mspang sorry to bother you, would you mind checking the question above for me?

RudyGOGOGO avatar Apr 01 '22 20:04 RudyGOGOGO

@bzbarsky-apple thanks for your quick response. So far, it looks like we still don't have the solution regarding this issue. May I ask for a suggestion about cross-compiling the chip-tool code for OpenWrt? I get the cross-compile environment of OpenWrt ready, and I could cross-compile some simple code and run it in my TP-Link Router. I tried to specify the cross-compiler of OpenWrt by using the existing GN script in CHIP-Tool, but it failed. My friend tried to do it too, and he raised this issue before: https://github.com/project-chip/connectedhomeip/issues/16902

RudyGOGOGO avatar Apr 04 '22 13:04 RudyGOGOGO

@RudyGOGOGO Sorry, I have no idea about the build system bits here, just who might know....

bzbarsky-apple avatar Apr 05 '22 19:04 bzbarsky-apple

@bzbarsky-apple Thanks for your reply! To be honest, you really helped me A LOTTTT! I feel so lucky(also guilty) to ping you since the first issue I raised, without your quick response, I cannot even make progress for the device commissioning.

I will keep this issue open, and maybe @xylophone21 @tdrozdovsky @mspang @shana-apple would like to provide some insight.

RudyGOGOGO avatar Apr 06 '22 04:04 RudyGOGOGO

Hello all, I built debug mode for an android project using Android Studio (Mac Mini Chip M1), and I got the same error. Are there any updates on this issue?

Thanks.

Task :app:generateJsonModelDebug FAILED Execution failed for task ':app:generateJsonModelDebug'. java.io.FileNotFoundException: /Users/username/connectedhomeip/src/android/CHIPTool/app/.cxx/cmake/debug/arm64-v8a/.cmake/api/v1/reply/target-third_party__pigweed__repo__pw_protobuf_compiler_test_protos.python._mirror_sources_to_out_dir_pw_protobuf_compiler_protos.nested.more_nesting.test_pb2.py--____third_party__pigweed__repo__pw_build__python_toolchain__python-Debug-ddfd1810121f70a84f71.json (File name too long)

wickyou23 avatar Jun 21 '22 06:06 wickyou23

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Dec 20 '22 18:12 stale[bot]

any solution for this issue?

egbertcao avatar Jan 10 '23 03:01 egbertcao

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Jul 11 '23 06:07 stale[bot]

@RudyGOGOGO Hello, have you generate the makefile and cross-compile the [examples/chip-tool] for OpenWrt successfully? What is the wrong about the generating the makefile? Thank you.

xlfdan avatar Aug 04 '23 06:08 xlfdan