Skip to content
New issue

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

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

Already on GitHub? # to your account

compilation failure for vehicle_gateway_multi #144

Open
inisider opened this issue Dec 16, 2024 · 2 comments
Open

compilation failure for vehicle_gateway_multi #144

inisider opened this issue Dec 16, 2024 · 2 comments

Comments

@inisider
Copy link

I clone the current repo and started to build using docker container but faced the following issue:

$ colcon build --event-handlers console_direct+ --packages-select vehicle_gateway_multi
Starting >>> vehicle_gateway_multi
Consolidate compiler generated dependencies of target vehicle_gateway_multi_bridge_client
Consolidate compiler generated dependencies of target vehicle_gateway_multi_bridge
[ 25%] Building CXX object CMakeFiles/vehicle_gateway_multi_bridge_client.dir/src/vehicle_gateway_multi_bridge_client.cpp.o
[ 50%] Building CXX object CMakeFiles/vehicle_gateway_multi_bridge.dir/src/vehicle_gateway_multi_bridge.cpp.o
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp:21:25: error: ‘z_sample_t’ does not name a type; did you mean ‘z_time_t’?
   21 | void data_handler(const z_sample_t * sample, void * /*arg*/)
      |                         ^~~~~~~~~~
      |                         z_time_t
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp: In function ‘void data_handler(const int*, void*)’:
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp:23:3: error: ‘z_owned_str_t’ was not declared in this scope; did you mean ‘z_owned_string_t’?
   23 |   z_owned_str_t keystr = z_keyexpr_to_string(sample->keyexpr);
      |   ^~~~~~~~~~~~~
      |   z_owned_string_t
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp:25:73: error: request for member ‘kind’ in ‘* sample’, which is of non-class type ‘const int’
   25 |     ">> [Subscriber] Received %s ('%s': '%.*s')\n", kind_to_str(sample->kind), z_loan(keystr),
      |                                                                         ^~~~
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp:25:87: error: ‘keystr’ was not declared in this scope; did you mean ‘key_t’?
   25 |     ">> [Subscriber] Received %s ('%s': '%.*s')\n", kind_to_str(sample->kind), z_loan(keystr),
      |                                                                                       ^~~~~~
      |                                                                                       key_t
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp:26:30: error: request for member ‘payload’ in ‘* sample’, which is of non-class type ‘const int’
   26 |     static_cast<int>(sample->payload.len), sample->payload.start);
      |                              ^~~~~~~
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp:26:52: error: request for member ‘payload’ in ‘* sample’, which is of non-class type ‘const int’
   26 |     static_cast<int>(sample->payload.len), sample->payload.start);
      |                                                    ^~~~~~~
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp: In function ‘int main(int, char**)’:
/root/vg/src/vehicle_gateway/vehicle_gateway_multi/src/vehicle_gateway_multi_bridge_client.cpp:37:45: error: too few arguments to function ‘z_result_t z_config_default(z_owned_config_t*)’
   37 |   z_owned_config_t config = z_config_default();

I am not familiar yet with the build system of the project so I would be happy with any hints what is the reason for this issue.

thanks.

@inisider
Copy link
Author

inisider commented Dec 16, 2024

It seems like the latest version where the mentioned types exist was in 0.7.2-rc.1 of zenohc but in dependency file it is mentioned main ( 1.0.0 ) where this types were renamed a little bit.

Or we have to set lower version of zenohc or update the code of vehicle_gateway_multi.

@inisider
Copy link
Author

With the following patch I've been able to build the project without chaning of depencencies:
0001-WIP.txt

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

No branches or pull requests

1 participant