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

Compilation of the plugin fails with "No rule to make target [...] libantlr4-runtime.a" #203

Closed
vifactor opened this issue Jul 6, 2024 · 4 comments · Fixed by #204
Closed
Assignees
Labels
build_failure Issues related to the failed builds
Milestone

Comments

@vifactor
Copy link

vifactor commented Jul 6, 2024

Describe the bug
I follow the instructions on how to build and install the plugin and get the following error at compilation step:
make[2]: *** No rule to make target 'plugin/DLT-Message-Analyzer/dltmessageanalyzerplugin/src/antlr4_runtime/src/antlr4_runtime/runtime/Cpp/dist/libantlr4-runtime.a', needed by 'plugin/DLT-Message-Analyzer/dltmessageanalyzerplugin/src/CMakeFiles/antlr4_PCRE_static_autogen_timestamp_deps'. Stop. make[1]: *** [CMakeFiles/Makefile2:1716: plugin/DLT-Message-Analyzer/dltmessageanalyzerplugin/src/CMakeFiles/antlr4_PCRE_static_autogen_timestamp_deps.dir/all] Error 2 make: *** [Makefile:156: all] Error 2

To Reproduce
Steps to reproduce the behavior:

Expected behavior
Build should not fail

Desktop (please complete the following information):

  • Ubuntu 22.04
  • cmake version 3.28.1
  • g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
@svlad-90
Copy link
Owner

svlad-90 commented Jul 7, 2024

Hi @vifactor, first of all, thanks for reporting this issue.

I was able to reproduce it in the specified environment. Luckily, I'm also using Ubuntu 22.04.

I did the following things:

  • I compiled the CMake 3.28.1 from the source code and installed it in my system
  • I got the same compilation error

I thought the root cause was the old-style CMake scripting used by the Antlr4 C++ runtime. The core root cause is probably located somewhere there. However, I decided to go the easier way and update the newer CMake to exclude the possibility of the bug within CMake 3.28.1.

=> I switched to CMake 3.29.6 and discovered this issue was not reproducible after the update.
=> Also, it wasn't reproducible with the initial version of the CMake that I was using - 3.22.1.

This issue looks like a CMake bug. I suggest changing the CMake version to a newer ( or older ) one.

If you follow my advice, please remember to clean up your build folder and run the CMake configuration on the dlt-viewer once again to get an update of all the files generated by the CMake.

=> Please let me know whether my proposal is functional for you once you try it out.

@svlad-90 svlad-90 self-assigned this Jul 7, 2024
@svlad-90 svlad-90 added the build_failure Issues related to the failed builds label Jul 7, 2024
@svlad-90 svlad-90 added this to the v.1.0.28 milestone Jul 7, 2024
@vifactor
Copy link
Author

vifactor commented Jul 7, 2024

Thanks for your very quick reply! Indeed with other version of cmake (I tried cmake v3.22.0) it worked out. Should I make a PR to installation instructions with this hint?

Btw, I suspect because my system has both Qt6 and Qt5, and I do not explicitly provide Qt version via CMAKE_PREFIX_PATH, I had also issues at configure step. These can be overcome by providing explicit QT_PREFIX:
cmake -DQT_PREFIX=Qt5 ...

Unfortunately, this trick does not work with the "original" dlt viewer, even if I checkout to the recommended 2.25-version tag.

svlad-90 pushed a commit that referenced this issue Jul 7, 2024
This patch extends the documentation of the DLT Message Analyzer. A
clarification is added regarding the issue #203.

Signed-off-by: Vladyslav Goncharuk <[email protected]>
@svlad-90
Copy link
Owner

svlad-90 commented Jul 7, 2024

Hi @vifactor,

Thanks for your very quick reply! Indeed with other version of cmake (I tried cmake v3.22.0) it worked out. Should I make a PR to installation instructions with this hint?

I've prepared the following PR that extends the documentation:
#204

Please review it and reply whether it meets your expectations. If it does, I'll merge it and close this issue. ))

Btw, I suspect because my system has both Qt6 and Qt5, and I do not explicitly provide Qt version via CMAKE_PREFIX_PATH, I had also issues at configure step. These can be overcome by providing explicit QT_PREFIX:
cmake -DQT_PREFIX=Qt5 ...

Unfortunately, this trick does not work with the "original" dlt viewer, even if I checkout to the recommended 2.25-version tag.

Please get in touch with the dlt-viewer dev team to resolve this issue. I'm reusing their QT_PREFIX concept in my implementation and can't do anything in this respect on my side.

@vifactor
Copy link
Author

vifactor commented Jul 7, 2024

Your PR looks good, thanks again for fast support!

@vifactor vifactor closed this as completed Jul 7, 2024
svlad-90 added a commit that referenced this issue Jul 7, 2024
[ISSUE #203] Compilation of the plugin fails with CMake 3.28.1
@svlad-90 svlad-90 moved this to Done in DLTMessageAnalyzer Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build_failure Issues related to the failed builds
Projects
Development

Successfully merging a pull request may close this issue.

2 participants