connectedhomeip
connectedhomeip copied to clipboard
CMake Error: : System Error: File name too long
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
@xylophone21 @tdrozdovsky @vivien-apple @bzbarsky-apple would you mind checking this for me?
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
@mspang sorry to bother you, would you mind checking the question above for me?
@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 Sorry, I have no idea about the build system bits here, just who might know....
@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.
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)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
any solution for this issue?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@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.