-
Notifications
You must be signed in to change notification settings - Fork 2
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
Kaitai build error #42
Comments
Can you share the generated C++ files too? It would make easier to investigate. From what I see, it looks like the current implementation doesn't support parametric types and will need an implementation for the same. Have you tried running other tests from the |
Here's the link for kv_pairs.cpp for ParametricParser.ksy and animal.cpp for animal.ksy. |
Ok, I ran the generate and build commands for the other .ksy files in |
|
Yeah, no problem. Here is that for you. |
@maraMaraschino Do you have a data file for this Maybe you can try reversing the arguments lines 36 and 45 in |
Here is the bin file generated by the Parametric Generator. |
Yes, exactly! |
It looks like that worked! Thank you. I'll try to keep doing this with other .ksy files I've made for additional examples. |
Great. I'll add the fix tomorrow so that the code gets generated correctly. |
@maraMaraschino Instead of having the Also, I have added the fix, so you should be able to generate the files correctly without changing anything. But it is failing when you pass the |
In trying to create an example file that works alongside the instructions under the kaitai struct runtime library for Awkward, I have generated the file "ParametricParser.ksy" in a separate repository which is meant to be able to parse key-value pairs with lengths of 3 or 8.
When following the instructions, I simply replace the command:
./kaitai-struct-compiler -t awkward --outdir src-animal example_data/schemas/animal.ksy
With:
$ ./kaitai-struct-compiler -t awkward --outdir src-parametric ~/dataReaderWriter/kaitai/ksy/ParametricParser.ksy
And then, instead of running:
awkward-kaitai-build src-animal/animal.cpp -b build
I run:
$ awkward-kaitai-build src-parametric/kv_pairs.cpp -b build
Which produces two errors:
error: no matching function for call to ‘kv_pairs_t::kv_pair_t::kv_pair_t(awkward::LayoutBuilder::Record<std::map<long unsigned int, std::__cxx11::basic_string<char> >, awkward::LayoutBuilder::Field<0, awkward::LayoutBuilder::ListOffset<long int, awkward::LayoutBuilder::Numpy<unsigned char> > >, awkward::LayoutBuilder::Field<1, awkward::LayoutBuilder::ListOffset<long int, awkward::LayoutBuilder::Numpy<unsigned char> > > >&, int, kaitai::kstream*&, kv_pairs_t*, kv_pairs_t*&)’
error: no matching function for call to ‘kv_pairs_t::kv_pair_t::kv_pair_t(awkward::LayoutBuilder::Record<std::map<long unsigned int, std::__cxx11::basic_string<char> >, awkward::LayoutBuilder::Field<0, awkward::LayoutBuilder::ListOffset<long int, awkward::LayoutBuilder::Numpy<unsigned char> > >, awkward::LayoutBuilder::Field<1, awkward::LayoutBuilder::ListOffset<long int, awkward::LayoutBuilder::Numpy<unsigned char> > > >&, int, kaitai::kstream*&, kv_pairs_t*, kv_pairs_t*&)’
The two errors point to lines 36 and 45 of the generated file respectively.
The text was updated successfully, but these errors were encountered: