Skip to content
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

[release 1.0.0] Compile error on gcc 11.2 due to missing <limits> include #1092

Closed
dkroenke opened this issue Feb 11, 2022 · 1 comment · Fixed by #1093
Closed

[release 1.0.0] Compile error on gcc 11.2 due to missing <limits> include #1092

dkroenke opened this issue Feb 11, 2022 · 1 comment · Fixed by #1093
Assignees
Labels
bug Something isn't working

Comments

@dkroenke
Copy link
Member

dkroenke commented Feb 11, 2022

Required information

Operating system:
E.g. Ubuntu 22.04 LTS

Compiler version:
E.g. GCC 11.2.0

Observed result or behaviour:
The ROS 2 buildfarm cannot build iceoryx_utils from the iceoryx 1.0.0 release on ROS Rolling.

Build log:

08:08:58 /tmp/binarydeb/ros-rolling-iceoryx-utils-1.0.0/include/iceoryx_utils/internal/relocatable_pointer/pointer_repository.hpp:52:45: error: ‘numeric_limits’ is not a member of ‘std’
08:08:58    52 |     static constexpr id_t INVALID_ID = std::numeric_limits<id_t>::max();

Links to failing builds:
https://build.ros2.org/job/Rbin_uJ64__iceoryx_utils__ubuntu_jammy_amd64__binary/3/
https://build.ros2.org/job/Rbin_ujv8_uJv8__iceoryx_utils__ubuntu_jammy_arm64__binary/3/

This problem applies also to cpptoml where the <limits> include is missing too. It is solved on master by adding a patch to cpptoml.

Expected result or behaviour:
iceoryx 1.0.0 should compile successfully on gcc 11.2

Conditions where it occurred / Performed steps:
Install gcc 11 and checkout v1.0.0 tag of iceoryx to build.

Additionally a compiler warning from the cxx::string is thrown:

iceoryx_utils/include/iceoryx_utils/internal/cxx/string.inl:104:69: error: ‘size_t strnlen(const char*, size_t)’ specified bound 99 exceeds source size 37 [-Werror=stringop-overread]
  104 |     : string(TruncateToCapacity, other, strnlen(other, Capacity - 1))

Discussion

All these errors are already solved on master, so it would be necessary to backport the fixes on the release branch.

dkroenke added a commit to ApexAI/iceoryx that referenced this issue Feb 11, 2022
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Feb 11, 2022
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Feb 11, 2022
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Feb 11, 2022
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Feb 11, 2022
dkroenke added a commit to ApexAI/iceoryx that referenced this issue Feb 11, 2022
@elBoberido elBoberido added the bug Something isn't working label Feb 11, 2022
@elBoberido
Copy link
Member

@dkroenke I'm wondering if we should have nightly builds on the actively supported release branches with the latest gcc and clang. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants