Failed build (#85)

Posted by @Mildred34:

Hello,
I tried to build rmf following the instruction on Ubuntu 20.04 (20.04.2) twice, one on my computer, one on the provided docker image (ghcr.io/open-rmf/rmf-web/rmf:nightly).

When I first build it on my computer, I got that error:
rmf_ws/src/rmf/rmf_traffic_editor/rmf_traffic_editor/gui/rendering_options.cpp:22:8: error: ‘size_t’ was not declared in this scope; did you mean ‘std::size_t’? 22 | for (size_t i = 0; i < show_building_lanes.size(); i++)

After correcting it by adding the name space and rebuild it: I got that time the same errors as the docker’s one, it begins by:
error: no match for ‘operator!=’ (operand types are ‘rmf_traffic::schedule::Query’ and ‘rmf_traffic::schedule::Query’) 172 | if (convert(msg->query) != query)
Do you have any idea where it could come from ?

Posted by @gbiggs:

Could you please link to the installation instructions you followed?

Posted by @Mildred34:

This one: GitHub - open-rmf/rmf: Root repository for the RMF software

Posted by @codebot:

Which compiler and compiler-version are you using? I’m surprised we haven’t seen that build error before in rendering_options.cpp, since I build this locally on Ubuntu 20.04 basically every day, and it’s in CI building on Ubuntu 20.04 on every commit.

I’ll work on a PR to fix up the size_t usage though. Didn’t realize that we’re supposed to either have a different include, or a namespace for size_t these days.

Posted by @Mildred34:

I’m using g++ compile version 10.3.0. Effectively apart from your projet, I don’t need to add the namespace for size_t.
I understand that, it must be something, I missed during the installation.


Edited by @Mildred34 at 2021-08-04T09:35:56Z

Posted by @codebot:

I can’t seem to reproduce this on Ubuntu 20.04.2 on x86_64 using either g++ or clang. Can you provide more details about your system? Thanks.

Posted by @Mildred34:

My Linux kernel version is : #71~20.04.1-Ubuntu SMP Release version: 5.8.0-63-generic - 64 bits

Posted by @codebot:

Just added the std:: prefix to all uses of size_t in rmf_traffic_editor here: resolve build error on some systems with size_t namespace by codebot · Pull Request #374 · open-rmf/rmf_traffic_editor · GitHub

That should resolve the first build error you saw. Thank you for reporting this.