Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since commit 11ab5a3 of Examples/Chip-Tool, Compiling Examples/Chip-Tool through Ninja failed #16897

Closed
RudyGOGOGO opened this issue Mar 31, 2022 · 9 comments
Labels
stale Stale issue or PR

Comments

@RudyGOGOGO
Copy link

RudyGOGOGO commented Mar 31, 2022

Since this commit 11ab5a3, when I ran the following command suggested in this doc, I got the error "fatal error: readline/history.h: No such file or directory" which did not happen before the commit 11ab5a3 of Examples/Chip-Tool "Chip tool interactive(#16135)"
scripts/examples/gn_build_example.sh examples/chip-tool out/

Please check the attached file with all details about the error above
errorLogsAboutNinjaCompileFailed.txt

@RudyGOGOGO RudyGOGOGO changed the title Since commit 11ab5a3 of Example/Chip-Tool, Ninja Compile for Example/Chip-Tool failed Since commit 11ab5a3 of Example/Chip-Tool, Compiling Example/Chip-Tool through Ninja failed Mar 31, 2022
@RudyGOGOGO
Copy link
Author

RudyGOGOGO commented Mar 31, 2022

@vivien-apple @tcarmelveilleux @manjunath-grl @bluebin14 would you mind checking it for me?

@RudyGOGOGO RudyGOGOGO changed the title Since commit 11ab5a3 of Example/Chip-Tool, Compiling Example/Chip-Tool through Ninja failed Since commit 11ab5a3 of Examples/Chip-Tool, Compiling Examples/Chip-Tool through Ninja failed Mar 31, 2022
@RudyGOGOGO
Copy link
Author

RudyGOGOGO commented Apr 1, 2022

looks like it happened because the new dependency was introduced libreadline-dev since 11ab5a3
After I installed it, it works for me.
It would be better to update the Installing prerequisites on Linux in https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/BUILDING.md

@andy31415
Copy link
Contributor

This needs fixing in the vscode image: we need chip-build-vscode to be able to compile all builds out of the box, right now it does not:

2022-04-02 13:13:25 INFO    FAILED: obj/commands/interactive/chip-tool-utils.InteractiveCommands.cpp.o 
2022-04-02 13:13:25 INFO    clang++ -MMD -MF obj/commands/interactive/chip-tool-utils.InteractiveCommands.cpp.o.d --target=aarch64-linux-gnu -O0 -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -Wall -Werror -Wextra -Wshadow -Wunreachable-code -Wvla -Wformat -Wformat-nonliteral -Wformat-security -Wimplicit-fallthrough …-tool/third_party/connectedhomeip/third_party/jsoncpp/repo/include -I../../examples/chip-tool/third_party/connectedhomeip/examples/common/tracing -c ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp -o obj/commands/interactive/chip-tool-utils.InteractiveCommands.cpp.o
2022-04-02 13:13:25 INFO    ../../examples/chip-tool/commands/interactive/InteractiveCommands.cpp:21:10: fatal error: 'readline/history.h' file not found
2022-04-02 13:13:25 INFO    #include <readline/history.h>

@andy31415
Copy link
Contributor

It looks like this is related to ARM specifically - our images compile for x64 but not for arm build cross-compiles.

I will for now add a noglob and will see about what needs to be done to add libreadline to the arm sysroot.

@andy31415
Copy link
Contributor

created #17084 for the glob bit. The build requirements and arm sysroot will have to be done separately (hoping to get time soon ... but it is somewhat tedious).

@RudyGOGOGO
Copy link
Author

RudyGOGOGO commented Apr 6, 2022

@andy31415 I see you mentioned the cross-compile in your comment. I have got stuck for many days, I will appreciate any insight from you!

I am working on cross compiling the ChipTool for OpenWrt, I get the OpenWrt Cross Compiling Environment ready, however, I could not find an easy way to modify the BUILD.GN in order to use OpenWrt Cross Compiler as well as all other dependencies like headers

Would you mind providing some instructions or hints about how to cross compile the ChipTool for OpenWrt?

@stale
Copy link

stale bot commented Oct 3, 2022

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 stale bot added the stale Stale issue or PR label Oct 3, 2022
@stale
Copy link

stale bot commented Oct 12, 2022

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Oct 12, 2022
@xlfdan
Copy link

xlfdan commented Aug 4, 2023

@RudyGOGOGO Have you find a way to cross compile the ChipTool for OpenWrt? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issue or PR
Projects
None yet
Development

No branches or pull requests

3 participants