Skip to content

add support QNX 7.1/8.0#1591

Open
pkleymonov-qnx wants to merge 3 commits into
chriskohlhoff:masterfrom
qnx-ports:qnx-pr-asio-1-29-0
Open

add support QNX 7.1/8.0#1591
pkleymonov-qnx wants to merge 3 commits into
chriskohlhoff:masterfrom
qnx-ports:qnx-pr-asio-1-29-0

Conversation

@pkleymonov-qnx

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

Copy link
Copy Markdown

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

Tips and triks.

With your spd you can create and run virtual x86_64 TARGET of QNX.

# source qnxsdp-env.sh
source ~/qnx800/qnxsdp-env.sh

# Install on linux host virtual machine like qemu/vxbox/vmware
# Create and run virtual target of QNX
# qemu
mkqnximage --type=qemu --arch=x86_64 --clean --run --force
# or vmware
mkqnximage --type=vmware --arch=x86_64 --clean --run --force
# or virtual box
mkqnximage --type=vbox --arch=x86_64 --clean --run --force

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
@alongo-eglue

Copy link
Copy Markdown

Hi all,

Is there a reason this PR has never been merged? Is it safe to use the QNX port?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants