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

add support QNX 7.1/8.0 #1591

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pkleymonov-qnx
Copy link

@pkleymonov-qnx pkleymonov-qnx commented Jan 31, 2025

These changes facilitate porting of asio for QNX7.1/8.0.
Build files are available at https://github.com/qnx-ports/build-files/tree/main/ports/asio

NOTE: QNX ports are only supported from a Linux host operating system

Create a workspace

mkdir -p ~/qnx_workspace && cd ~/qnx_workspace
git clone https://github.com/qnx-ports/build-files.git

Clone asio repository from tested release version

git clone https://github.com/qnx-ports/asio.git

Or clone it from original repository

git clone https://github.com/chriskohlhoff/asio.git

Generate GNU build tool ./configure and all needed Makefiles

cd asio/asio
./autogen.sh
cd -

Setup a Docker container

Pre-requisite:

# Build the Docker image and create a container
cd build-files/docker
./docker-build-qnx-image.sh
./docker-create-container.sh

# Now you are in the Docker container

Compile the port for QNX

cd ~/qnx_workspace
# Build asio and install it in sysroot (QNX SDP)
make -C build-files/ports/asio install JLEVEL=$(nproc)
# Or build asio and install it in a staging area
make -C build-files/ports/asio install JLEVEL=$(nproc) INSTALL_ROOT_nto=<PATH_TO_YOUR_STAGING_AREA> USE_INSTALL_ROOT=true

How to run tests

Build asio test and scp it to the QNX target.

cd ~/qnx_workspace
# Build asio test and install it in sysroot (QNX SDP)
make -C build-files/ports/asio check JLEVEL=$(nproc)

# define target IP address
TARGET_HOST=<target-ip-address-or-hostname>

# copy asio test binaries to your QNX target
scp -r $QNX_TARGET/aarch64le/usr/local/bin/asio_tests qnxuser@$TARGET_HOST:/data/home/qnxuser/
# or
scp -r $QNX_TARGET/x86_64/usr/local/bin/asio_tests qnxuser@$TARGET_HOST:/data/home/qnxuser/

Run tests on the target.

# ssh into the target
ssh qnxuser@$TARGET_HOST

## Run asio tests
cd /data/home/qnxuser/asio_tests/
./run_testsuites.sh

resolve #1411
resolve #1422
resolve #1098
resolve #976

New performance tests have to be proper configured

FAIL:performance/client
FAIL:performance/server
=========================================================================
Testsuite summary for asio 1.32.0
=========================================================================
# TOTAL: 355
# PASS: 353
# FAIL: 2

@pkleymonov-qnx pkleymonov-qnx marked this pull request as ready for review January 31, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant