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

Fix C++11 check for fast-dds/2.11.2 #23657

Merged
merged 8 commits into from
Apr 23, 2024

Conversation

FannoFlow1
Copy link
Contributor

@FannoFlow1 FannoFlow1 commented Apr 19, 2024

Specify library name and version: fast-dds/2.11.2

conan install --requires=fast-dds/2.11.2 --build=missing

consolidate c++11 checks to simply use the check_min_cppstd method.
fixes #23655

fast-dds/2.11.2: package(): Packaged 289 '.h' files
fast-dds/2.11.2: package(): Packaged 128 '.hpp' files
fast-dds/2.11.2: package(): Packaged 1 '.idl' file: types.idl
fast-dds/2.11.2: package(): Packaged 4 files: fast-discovery-server, fastdds, ros-discovery, LICENSE
fast-dds/2.11.2: package(): Packaged 1 '.1' file: fast-discovery-server-1.0.1
fast-dds/2.11.2: package(): Packaged 6 '.py' files
fast-dds/2.11.2: package(): Packaged 1 '.a' file: libfastrtps.a
fast-dds/2.11.2: package(): Packaged 1 '.cmake' file: conan-official-fast-dds-targets.cmake
fast-dds/2.11.2: Created package revision 1b3c604182f2f1ba64616155771e40dd
fast-dds/2.11.2: Package 'e94df76a0eaa58f60f3f04774bd2f747f414afb9' created
fast-dds/2.11.2: Full package reference: fast-dds/2.11.2#3433faa99242ae7573a2c7d7cfe86f09:e94df76a0eaa58f60f3f04774bd2f747f414afb9#1b3c604182f2f1ba64616155771e40dd
fast-dds/2.11.2: Package folder /root/.conan2/p/b/fast-d6dfe0fa70fba/p
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'env_info' used in: foonathan-memory/0.7.3, cmake/3.29.0
WARN: deprecated:     'cpp_info.names' used in: fast-dds/2.11.2, fast-cdr/1.1.0, foonathan-memory/0.7.3
WARN: deprecated:     'cpp_info.build_modules' used in: fast-dds/2.11.2, fast-cdr/1.1.0, foonathan-memory/0.7.3

======== Finalizing install (deploy, generators) ========
cli: Generating aggregated env files
cli: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
root@4f08035457fd:/# cat /
.dockerenv                       conanrun.sh                      etc/                             mnt/                             sbin/                            var/
bin/                             conanrunenv-release-x86_64.sh    home/                            opt/                             srv/
boot/                            deactivate_conanbuild.sh         lib/                             proc/                            sys/
conanbuild.sh                    deactivate_conanrun.sh           lib64/                           root/                            tmp/
conanbuildenv-release-x86_64.sh  dev/                             media/                           run/                             usr/
root@4f08035457fd:/# cat /etc/o
opt/        os-release
root@4f08035457fd:/# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@4f08035457fd:/#
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=98
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=98
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux


======== Computing dependency graph ========
Graph root
    cli
Requirements
    asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
    fast-cdr/1.1.0#7a8cd8ddb1cf8242f0debd09c3644f5b - Cache
    fast-dds/2.11.2#3433faa99242ae7573a2c7d7cfe86f09 - Cache
    foonathan-memory/0.7.3#e15d6872869ad2a42dc4e8b95e624772 - Cache
    tinyxml2/10.0.0#832c7f8038cef53f6427577d6e66a7a8 - Cache
Build requirements
    cmake/3.29.0#a055de871f63a7904aa3dcb9f3c61242 - Cache
Resolved version ranges
    cmake/[>=3.16.3 <4]: cmake/3.29.0

======== Computing necessary packages ========
foonathan-memory/0.7.3: Checking 7 compatible configurations
foonathan-memory/0.7.3: Main binary package '463fc09f05013a0f300d697d9762ddb13a1ff22d' missing. Using compatible package '27223d5c06b56d723c34e43dbc17ecd3279040ea': compiler.cppstd=gnu14
tinyxml2/10.0.0: Checking 7 compatible configurations
tinyxml2/10.0.0: Main binary package '9c8468a1f6b3ca17c29826f382cbda1bb2d56636' missing. Using compatible package 'c4735bf28b871912194110fef2bd705f763687fc': compiler.cppstd=gnu14
Requirements
    fast-cdr/1.1.0#7a8cd8ddb1cf8242f0debd09c3644f5b:9c8468a1f6b3ca17c29826f382cbda1bb2d56636 - Invalid
    fast-dds/2.11.2#3433faa99242ae7573a2c7d7cfe86f09:5601b3353a1f6810a77f2cf6acd3684047428600 - Invalid
    foonathan-memory/0.7.3#e15d6872869ad2a42dc4e8b95e624772:27223d5c06b56d723c34e43dbc17ecd3279040ea#bcbfbddd611122d344787127ab962a5e - Cache
    tinyxml2/10.0.0#832c7f8038cef53f6427577d6e66a7a8:c4735bf28b871912194110fef2bd705f763687fc#9aad65ed1e154029e5740b1c93b88276 - Cache
Build requirements
Skipped binaries
    asio/1.29.0, cmake/3.29.0
ERROR: There are invalid packages:
fast-cdr/1.1.0: Invalid: Current cppstd (98) is lower than the required C++ standard (11).
fast-dds/2.11.2: Invalid: Current cppstd (98) is lower than the required C++ standard (11).
root@4f08035457fd:/#

@CLAassistant
Copy link

CLAassistant commented Apr 19, 2024

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@RubenRBS RubenRBS self-assigned this Apr 19, 2024
Copy link
Member

@RubenRBS RubenRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks a lot for taking the time to open the issue AND the PR, we really appreciate it!

recipes/fast-dds/all/conanfile.py Outdated Show resolved Hide resolved
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

RubenRBS
RubenRBS previously approved these changes Apr 20, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@FannoFlow1

This comment was marked as resolved.

@FannoFlow1
Copy link
Contributor Author

Hmm.. @RubenRBS could I get some assistance here? The pipeline is failing due to what appears to be a missing brace initialization, but the braces clearly exist

/home/conan/workspace/prod-v1/bsr/29560/fbfcd/.conan/data/fast-dds/2.13.3/_/_/build/d41f72be482e99d2b017874b5ac0eda4003f4a21/src/src/cpp/statistics/types/types.h:174:37: error: array must be initialized with a brace-enclosed initializer
     std::array<uint8_t, 4> m_value{0};
                                     ^
/home/conan/workspace/prod-v1/bsr/29560/fbfcd/.conan/data/fast-dds/2.13.3/_/_/build/d41f72be482e99d2b017874b5ac0eda4003f4a21/src/src/cpp/statistics/types/types.h:267:38: error: array must be initialized with a brace-enclosed initializer
     std::array<uint8_t, 12> m_value{0};
                                      ^
/home/conan/workspace/prod-v1/bsr/29560/fbfcd/.conan/data/fast-dds/2.13.3/_/_/build/d41f72be482e99d2b017874b5ac0eda4003f4a21/src/src/cpp/statistics/types/types.h:751:40: error: array must be initialized with a brace-enclosed initializer
     std::array<uint8_t, 16> m_address{0};
                                        ^
In file included from /home/conan/workspace/prod-v1/bsr/29560/fbfcd/.conan/data/fast-dds/2.13.3/_/_/build/d41f72be482e99d2b017874b5ac0eda4003f4a21/src/src/cpp/rtps/participant/RTPSParticipantImpl.h:58:0,
                 from /home/conan/workspace/prod-v1/bsr/29560/fbfcd/.conan/data/fast-dds/2.13.3/_/_/build/d41f72be482e99d2b017874b5ac0eda4003f4a21/src/src/cpp/rtps/writer/RTPSWriter.cpp:28:
/home/conan/workspace/prod-v1/bsr/29560/fbfcd/.conan/data/fast-dds/2.13.3/_/_/build/d41f72be482e99d2b017874b5ac0eda4003f4a21/src/src/cpp/statistics/types/monitorservice_types.h:729:56: error: array must be initialized with a brace-enclosed initializer
     std::array<uint8_t, 16> m_last_publication_handle{0};
                                                        ^
/home/conan/workspace/prod-v1/bsr/29560/fbfcd/.conan/data/fast-dds/2.13.3/_/_/build/d41f72be482e99d2b017874b5ac0eda4003f4a21/src/src/cpp/statistics/types/monitorservice_types.h:843:53: error: array must be initialized with a brace-enclosed initializer
     std::array<uint8_t, 16> m_last_instance_handle{0};

I'm not super familiar with how the pipelines are set up. Is it possible this is failing because the compiler.cppstd is not set to 11 in the profile?

https://godbolt.org/z/hzac1M87E

Jk, this error turns out specifically happens when the array is a class member in gcc < 6.
WHere you need a secondary brace initializer to initialize the array = {{0}}
https://godbolt.org/z/5dqKaxEvK

using gcc >=6 resolves the issue.
Going to update the min supported ver
https://godbolt.org/z/nbTx4GaE6

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 9 (827e576398002b9784b453326223fc0d2e159886):

  • fast-dds/2.13.3:
    All packages built successfully! (All logs)

  • fast-dds/2.11.2:
    All packages built successfully! (All logs)

  • fast-dds/2.10.1:
    All packages built successfully! (All logs)

  • fast-dds/2.3.4:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 9 (827e576398002b9784b453326223fc0d2e159886):

  • fast-dds/2.13.3:
    All packages built successfully! (All logs)

  • fast-dds/2.11.2:
    All packages built successfully! (All logs)

  • fast-dds/2.10.1:
    All packages built successfully! (All logs)

  • fast-dds/2.3.4:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 06e98b7 into conan-io:master Apr 23, 2024
28 checks passed
@FannoFlow1 FannoFlow1 deleted the fast-dds/cpp11-check-fix branch April 23, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[package] fast-dds/2.11.2: Incorrect detection of C++11 compiler support
5 participants