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

Test program build failure #14

Open
realteck-ky opened this issue Sep 30, 2024 · 0 comments
Open

Test program build failure #14

realteck-ky opened this issue Sep 30, 2024 · 0 comments

Comments

@realteck-ky
Copy link

About

Cannot build the test programs with introduced commands.

Problem

There are three problems.
First is build.sh build commands, second is file generation, and third is build errors.

1. build commands

Expected build arguments of workspace/test/udp_multicast/README.md like following.

# Build test/udp_multicast
$ bash build.bash all udp_multicast

However, it cannot build with the following error.

ERROR: can not find appname=udp_multicast on workspace/

It is a simple problem because build.sh recognize relative path from the workspace.
Then, the README and build commands should be updated like following:

- $ bash build.bash all udp_multicast
+ $ bash build.bash all test/udp_multicast

It same as test/fastdds-comp, but it is limited to updating README.

2. File generation

And then, I tried the bash build.bash all test/udp_multicast command.
However, templates_generator.py while CMake building occurs the exception.

INFO: generate header file for template functions of MsgType
Traceback (most recent call last):
  File "../mros2/mros2_header_generator/templates_generator.py", line 49, in <module>
    main()
  File "../mros2/mros2_header_generator/templates_generator.py", line 17, in main
    with open(app + "/app.cpp", 'r') as m_f:
FileNotFoundError: [Errno 2] No such file or directory: 'test/udp_multicast/app.cpp'
ERROR: failed to generate header fille for template function of test/udp_multicast's MsgType

This error (exception) is a path problem which is written in Filelists.cmake.
To update paths is resolved this generation.

Warning

Current test programs are not necessary to generate templates.hpp, because they are not ROS nodes.
Or, other programs has been committed with templates.hpp, so test programs are also.

3. Build error

After that, but test/udp_multicast cannot build.

 fatal error: 'mros2_user_config.h' file not found
  127 | #include "mros2_user_config.h"

It is caused by miss file inclusion, so deleting the line resolve the build error.

Conclusion

We can build test/udp_multicast after the updates, and it communicate successfully.
test/fastdds-comp is also run successfully, but it cannot communicate correctly.

Comment

テストプログラムをビルドするのに手順通りにできなかったため、ビルド周りを何点か修正しました。
1のREADME更新と、3のincludeの修正は問題ないとして、2の templates.hpp は今回ちゃんとパス通して生成するようにしましたが、そもそもテストプログラムだと必要ない?気もするので、別の対策あればお任せします。

あとこれらを直しても test/fastdds-comp がなぜか通信取れてないため、別チケットで起票しようかと思います。

なお修正内容のブランチは以下です。
https://github.com/realteck-ky/mros2-posix/tree/hotfix/build/test

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

No branches or pull requests

1 participant