Category — Developer Tooling & Host Tools
QNX Port Scout finds C and C++ porting risks before the first QNX 8.0 cross-build. It turns source and build findings into a review report, a porting checklist, and a starter toolchain.
Inspiration
When a project moves to QNX, OS assumptions can hide in a header, a linker flag, or an optional backend. We wanted a way to locate those assumptions early, give reviewers the exact lines to inspect, and point them to the QNX documentation for their next step.
What it does
Scan a project to find issues such as epoll calls, GNU libc assumptions, and native compiler flags that interfere with cross-builds. Each finding includes source evidence, severity, and a suggested action. The scanner emits Markdown and HTML for review, JSON for scripts, and SARIF for CI. Teams can tune rules, suppress individual findings in source, and select a severity that fails the scan after it writes the report.
How it works
The scanner runs offline on a Python 3.10+ development host. A configurable catalog of scoped patterns checks source tokens, headers, selected string literals, and common build files while preserving file and line locations. The demo scans a small TCP service and finds 4 errors. After the codelab replaces the event loop and other platform-dependent code, the same scan reports 0 errors and 2 QNX deployment notes. The CI rehearsal writes SARIF in both cases and returns exit 1 for the starter and exit 0 for the fixed sample.
How it uses QNX
The rules cite QNX SDP 8.0 documentation. For example, the epoll rule points to poll() for level-triggered readiness, and the networking rule calls out -lsocket linkage and the io-sock service on the target image. The checklist command generates PORTING_CHECKLIST.md and a CMake toolchain for the QNX qcc and q++ compiler drivers. It selects gcc_ntoaarch64le for AArch64 little-endian or gcc_ntox86_64 for x86-64, including a matching QEMU target image. QNX 8.0 documentation
Validation covered static analysis, generated artifacts, and CI exit codes on a Windows host. We did not build with the QNX SDK or run the sample on a QNX target, including QEMU.
Challenges
An API can exist on QNX and still depend on what ships in the target image. QNX 8.0 provides inotify through libfsnotify, with filesystem event support and fsevmgr required on the image. We made the report surface those deployment checks and include locations so reviewers can distinguish active porting work from findings in optional backends or bundled tests. QNX inotify reference
What's next
Cross-build focused ABI probes with QNX SDP 8.0, smoke-test the fixed service on QEMU, and use build metadata to focus findings on the files selected for the target.
Try it
From the tool directory, run python -m qnx_port_scout scan codelab/sample --all out/codelab-before. The codelab walks through the source changes, rescan, and CI gate. The build and run instructions describe how to prepare a matching QNX 8.0 target when the SDK and image are available.
Built With
- cmake
- python
- qnx
- sarif
- static-analysis
