Skip to content

add support for QNX 7.1/8.0 #318

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pkleymonov-qnx
Copy link

@pkleymonov-qnx pkleymonov-qnx commented May 8, 2025

This PR provides changes for QNX 7.1/8.0 running on aarch64le/x86_64
issue: #314

NOTE: QNX cross-compilation are only supported from a Linux(x86_64) build machine.
For QNX, we have to explicitly build all dependencies
IMPORTANT: we cannot use option "--build=missing" for QNX build,
since conan will try to use recepies from conan default server:
- https://conan.io/center
which has no QNX ports for gtest/spdlog/fmt libs.

Pre-requisite:

  • Install QNX license and SDP installation (~/.qnx and ~/qnx800 by default)

  • Before building up-cpp we need to build all dependencies from up-conan-recipes

Build all dependencies from up-conan-recipes

Checkout up-conan-recipes

# clone up-conan-recipes
git clone https://github.com/qnx-ports/up-conan-recipes.git

or you can use fix from PR:
eclipse-uprotocol/up-conan-recipes#36

Build dependencies

cd up-conan-recipes

# source QNX SDP
source <QNX_SDP>/qnxsdp-env.sh

# build protobuf for Linux build machine
conan create --version=3.21.12 --build=missing protobuf

# IMPORTANT
# update conan settings for QNX8.0 support
conan config install tools/qnx-8.0-extension/settings_user.yml

# build protobuf for QNX host
#
# <profile-name> could be one of: nto-7.1-aarch64-le, nto-7.1-x86_64, nto-8.0-aarch64-le, nto-8.0-x86_64
#
conan create -pr:h=tools/profiles/<profile-name> --version=3.21.12 protobuf

# build up-core-api
conan create -pr:h=tools/profiles/<profile-name> --version 1.6.0-alpha2 up-core-api/release/

# build all dependencies for up-cpp
conan create -pr:h=tools/profiles/<profile-name> --version=10.2.1 fmt/all
conan create -pr:h=tools/profiles/<profile-name> --version=1.13.0 spdlog/all
conan create -pr:h=tools/profiles/<profile-name> --version=1.13.0 gtest

Build up-cpp lib and tests

cd ..

#clone up-cpp from this PR

cd up-cpp

# setup cmake generator and preset for up-cpp
conan install -pr:h=../up-conan-recipes/tools/profiles/<profile-name> --version 1.0.1 .

# setup cmake configuration
cmake --preset conan-release

# build up-cpp libary and tests
cmake --build build/Release -- -j

# all tests you can find under build/Release/bin/
# copy test binaries to your QNX target

closes #314

Copy link

github-actions bot commented May 8, 2025

Code coverage report is ready! 📈

Copy link
Contributor

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

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

Thanks @pkleymonov-qnx for the contribution!

Could you open an issue for adding tests for building for QNX in CI as well?

fix whitespace

Co-authored-by: Pete LeVasseur <[email protected]>
Copy link

Code coverage report is ready! 📈

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.

Adding QNX build support
2 participants