eclipse-iceoryx / iceoryx

Eclipse iceoryx™ - true zero-copy inter-process-communication
https://iceoryx.io
Apache License 2.0
1.62k stars 383 forks source link

Build error with gcc-11 on release_1.0 branch #813

Closed richmattes closed 3 years ago

richmattes commented 3 years ago

Required information

Operating system: Fedora 34

Compiler version: GCC-11.1.1

Observed result or behaviour: Building the release_1.0 branch fails with the following error:

In file included from /home/rich/workspace/ros2_galactic/src/eclipse-iceoryx/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/base_relative_pointer.hpp:21,
                 from /home/rich/workspace/ros2_galactic/src/eclipse-iceoryx/iceoryx/iceoryx_utils/source/relocatable_pointer/base_relative_pointer.cpp:18:
/home/rich/workspace/ros2_galactic/src/eclipse-iceoryx/iceoryx/iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp:52:45: error: ‘numeric_limits’ is not a member of ‘std’
   52 |     static constexpr id_t INVALID_ID = std::numeric_limits<id_t>::max();

<limits> needs to be included in iceoryx_utils/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp

Expected result or behaviour: Successful build

Conditions where it occurred / Performed steps:

docker run --rm=true -it fedora:34 /bin/bash
# Inside docker image
dnf install -y gcc-c++ cmake git libacl-devel
git clone https://github.com/eclipse-iceoryx/iceoryx.git -b release_1.0
cmake -B iceoryx_utils_build -S iceoryx/iceoryx_utils/
cmake --build iceoryx_utils_build

Additional Comments The issue does not appear in the master branch. <limits> is included in iceoryx_hoofs/cxx/helplets.hpp, which is included by iceoryx_hoofs/cxx/vector.hpp, which is included by iceoryx_hoofs/internal/relocatable_pointer/pointer_repository.hpp, which is included by iceoryx_hoofs/internal/relocatable_pointer/base_relative_pointer.hpp

richmattes commented 3 years ago

The cpptoml dependency for iceoryx_posh has the same problem. cpptoml hasn't been updated since October 2018 - please consider forking or replacing the functionality with a maintained library.

mossmaurice commented 3 years ago

Thanks for the bug report @richmattes

This issue should be fixed with the backport #806

cpptoml hasn't been updated since October 2018 - please consider forking or replacing the functionality with a maintained library.

That's a good point. Will look into it.