Trouble building Vector DBC on Cent OS 7
Hi Toby,
First, sorry for bothering you via your personal email - I didn't see the issues list here until today. And thanks for helping me past the first problem I had!
I'm still having trouble getting the build to pass. I get several warnings from bison with Parser.yy, and then an error in lalr1.cc. I've saved the cmake output and make output to a couple of files and uploaded them here.
Any ideas on how I can fix this? I'm very eager to try this library as I'm working on a project with multiple DBC files for CAN communication!
Thanks, Matt
Comments (13)
-
reporter -
reporter I added the screenshot of the make output above.
-
repo owner Hi Maik, I'm using gcc 8.2.0, which should be even more strict than gcc 7.3.0. But currently I don't have this issue here. I'll install CentOS in a docker and try with it. Bye Tobias
-
repo owner - changed status to open
-
repo owner -
assigned issue to
-
assigned issue to
-
repo owner I checked the mailing lists of bison. It seems that the error "undefined macro b4_symbol" is generated for every "useless nonterminal" in the grammar. I have these nonterminals to document, what I know about them, without further using them in the grammar. I'll just remove them. Then it should work.
-
reporter Sounds good, please let me know if you have something you'd like me to try to builld on my system!
Matt
-
repo owner Hi Matt,
I commented the useless nonterminal parts of the grammar. You can check if this change solves the issue? It's in this branch: https://bitbucket.org/tobylorenz/vector_dbc/branch/drop-useless-nonterminal
Bye Tobias
-
reporter That did it! I still get a couple of warnings but it builds. Here's a screenshot of the warning
-
reporter Tobias,
I'm also looking for something a little different from your Vector_DBC. I'd love to find a tool that can scan a DBC file and auto-generate C source code files to pack and unpack signals from CAN messages. This would avoid the tedious and error-prone process of hand-writing pack/unpack routines for all the signals and messages in the DBC. I'm working on a C-based embedded system with an RTOS and no file system, so I think the Vector_DBC library wouldn't work well for me in that environment. Are you aware of anything for auto generating CAN pack/unpack functions?
Thanks for any insight you may have!
Matt
-
repo owner Hi Matt,
the two warnings are in the source code generated by Bison. The first has something to do with the way how C++ is implemented. The second one, is default behavior. Good, but then I'll merge it into master and make a new release.
Actually this is also one of my use cases to generate code based on database content. In my case it's conversion of Vector::CAPL to C++. The generated code is based on classes that just need to be parameterized based. The signal extraction code is embedded in the classes. I intend to publish this sooner or later.
Bye Tobias
-
repo owner - changed status to resolved
v2.0.2 released
-
reporter Thanks for fixing my compilation issue so quickly and for your reply regarding auto-code generation. I'm surprised that there isn't a readily available DBC-> embedded C code generator, as that seems to be such a common need. Wish I had the time and knowledge to generate one myself!
Regards, Matt
- Log in to comment