2025-12-18 19:26:49 +01:00
2025-12-18 19:26:49 +01:00
2025-12-18 19:26:49 +01:00
2025-12-18 19:26:49 +01:00

Table of Contents

Mirror of Gitea-Instance

Conan 2 Profiles, Remotes and Global-Configuration and Usage

1. Overview

This directory contains Conan 2 profile files used to define the build configuration for our projects. They cover multiple architectures (x64, armv8) and GCC compiler versions (9, 13, 14).

Quick-Start

To apply these configurations to your local Conan environment, use the conan config install command pointing to this repository. Installs global.conf, remotes.json, and profiles automatically:

⚠️ Warning: This command will overwrite your existing remotes.json file. Any custom remotes you have configured will be replaced by the ones defined in this repository.

Please back up your existing remotes if needed!

conan config install https://package-cloud.dns.army/ros2/conan2-config.git --type git
# or a specific branch/tag
conan config install https://package-cloud.dns.army/ros2/conan2-config.git --type git --args="--branch main"

For authenticated access (development), use:

export CONAN_USR=<your_username>
export CONAN_PSW=<your_password>
conan remote login package-cloud-ros2-conan2 $CONAN_USR -p $CONAN_PSW

# for development/nightly builds
conan remote login package-cloud-ros2-dev-conan2 $CONAN_USR -p $CONAN_PSW
# is disabled by default, enable it with:
conan remote enable package-cloud-ros2-dev-conan2

7. Requirements

  • Conan Client: Version 2.0+ is required.

2. Naming Convention

The filenames follow a strict pattern to identify the target environment:

{arch}_{os}_{compiler}_{version}[_{variant}]

  • {arch}: Target architecture (x64, armv8)
  • {os}: Target operating system (linux)
  • {compiler}: Compiler used (gcc)
  • {version}: Major compiler version (9, 13, 14)
  • {variant}: Optional suffix for specific cross-compilation toolchains (e.g., croco for ARMv8 Cross-Compilation toolchain)

3. Profile Types

A. Base Profiles

(e.g., x64_linux_gcc_13, armv8_linux_gcc_14)

  • Define the standard settings: os, arch, compiler, build_type, cppstd.
  • Use the system-installed compiler or the default environment.
  • Content format example:
[settings]
arch=x86_64
compiler=gcc
...

B. Variant Profiles

(e.g., armv8_linux_gcc_13_croco)

  • EXTEND base profiles using the include() directive.
  • INJECT specific build tools via [tool_requires].
  • "croco" variants inject the armv8-croco-toolchain package for cross-compilation.

4. Usage

To use a profile, pass the filename to the Conan install or create command using the -pr (profile) argument.

Example 1: Build for standard x64 Linux with GCC 14

conan install . -pr x64_linux_gcc_14 --build=missing

Example 2: Cross-compile for ARMv8 "Croco" target with GCC 9

conan install . -pr armv8_linux_gcc_9_croco --build=missing

5. File List & Details

Profile Filename Arch GCC Ver Std Description
x64_linux_gcc_9 x86_64 9 gnu14 Legacy x64 build for ubuntu-focal-20.04
x64_linux_gcc_13 x86_64 13 gnu17 Modern x64 build for ubuntu-jammy-22.04
x64_linux_gcc_14 x86_64 14 gnu17 Bleeding edge x64 for ubuntu-noble-24.04
armv8_linux_gcc_9 armv8 9 gnu14 Base ARMv8 GCC 9 for ubuntu-focal-20.04
armv8_linux_gcc_13 armv8 13 gnu17 Base ARMv8 GCC 13 for ubuntu-jammy-22.04
armv8_linux_gcc_14 armv8 14 gnu17 Base ARMv8 GCC 14 for ubuntu-noble-24.04
armv8_linux_gcc_9_croco armv8 9 gnu14 Croco Toolchain (v9.3) for ubuntu-focal-20.04
armv8_linux_gcc_13_croco armv8 13 gnu17 Croco Toolchain (v13.3) for ubuntu-jammy-22.04
armv8_linux_gcc_14_croco armv8 14 gnu17 Croco Toolchain (v14.3) for ubuntu-noble-24.04

6. Global Configuration & Remotes

In addition to profiles, this repository provides standard configuration for the Conan client (global.conf) and package repositories (remotes.json).

A. Global Configuration (global.conf)

This file defines core client behavior, optimizing for build performance and system integration.

  • Networking:

    • core.net.http:timeout: Set to 6000 seconds to handle large downloads over VPN.
    • core.download:parallel / core.upload:parallel: Dynamically uses all available CPU cores ({{os.cpu_count()}}) for faster transfers.
  • System Integration:

    • tools.system.package_manager:mode: Set to install (automatically installs system dependencies like apt packages).
    • tools.system.package_manager:sudo: Enabled (True) to allow sudo for system package installs.

B. Remotes (remotes.json)

This file defines the upstream sources for packages. The order is critical for security and precedence.

Order Remote Name URL Usage
1 package-cloud-ros2-conan2 .../api/packages/ros2/conan Primary source for stable production packages.
2 package-cloud-ros2-dev-conan2 .../api/packages/ros2-dev/conan Secondary source for development/nightly builds.

Important Note: These remotes are hosted on package-cloud.dns.army. Ensure you have the necessary network access and credentials.

C. Installation

To apply these configurations to your local Conan environment, use the conan config install command pointing to this repository:

⚠️ Warning: This command will overwrite your existing remotes.json file. Any custom remotes you have configured will be replaced by the ones defined in this repository.

Please back up your existing remotes if needed!

conan config install https://package-cloud.dns.army/ros2/conan2-config.git --type git
# or a specific branch/tag
conan config install https://package-cloud.dns.army/ros2/conan2-config.git --type git --args="--branch main"

For authenticated access (development), use:

export CONAN_USR=<your_username>
export CONAN_PSW=<your_password>
conan remote login package-cloud-ros2-conan2 $CONAN_USR -p $CONAN_PSW

# for development/nightly builds
conan remote login package-cloud-ros2-dev-conan2 $CONAN_USR -p $CONAN_PSW
# is disabled by default, enable it with:
conan remote enable package-cloud-ros2-dev-conan2
Description
No description provided
Readme 62 KiB