docs: add QNX toolchain integration contract#99
Conversation
9f528a1 to
6046f7c
Compare
There was a problem hiding this comment.
Pull request overview
Adds an “Integration Contract” guide to document how to acquire, install, configure, and verify a local QNX SDP + licensing setup so Bazel workspaces can use the QNX toolchains provided by this repository (addresses #96).
Changes:
- Added step-by-step instructions for obtaining QNX SDP and licenses, and expected local installation layout.
- Documented environment variables,
.bazelrcsetup, sandbox writable paths, and verification build steps. - Added troubleshooting guidance for common setup failures.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The license is typically a file that must be accessible at runtime. See | ||
| [License Configuration](#license-configuration) for how to configure the license path. |
| - **`license_path`**: Path to the QNX license file directory | ||
| (default: `/opt/score_qnx/license/licenses`) | ||
| - **`license_info_variable`**: Custom environment variable name for license configuration | ||
| - **`license_info_value`**: Custom value for license environment variable |
| # Or use the explicit toolchain: | ||
| bazel build --extra_toolchains=@qnx_toolchain//:x86_64-qnx-gcc_8.0.0 //:hello_qnx |
|
|
||
| #### 5. Troubleshooting | ||
|
|
||
| - **License not found**: Ensure `QNXLM_LICENSE_FILE` is set and points to a valid license file |
| The following environment variable is commonly used for QNX license configuration: | ||
|
|
||
| - **`QNXLM_LICENSE_FILE`**: Path to the QNX license file. If the license is | ||
| installed in the default location, this may not need to be set explicitly. | ||
|
|
||
| Example: | ||
| ```bash | ||
| export QNXLM_LICENSE_FILE=/opt/score_qnx/license/licenses | ||
| ``` |
| # Enable the QNX toolchain | ||
| --extra_toolchains=@{repository_name}//:x86_64-qnx-gcc_8.0.0 | ||
| # Or for ARM64: | ||
| --extra_toolchains=@{repository_name}//:aarch64-qnx-gcc_8.0.0 | ||
|
|
||
| # Configure QNX license location (if not in default path) | ||
| # If QNXLM_LICENSE_FILE is set in your environment, this may not be needed | ||
| build --action_env=QNXLM_LICENSE_FILE=/opt/score_qnx/license/licenses | ||
|
|
||
| # Allow Bazel to write temporary files to /var/tmp for QNX compiler configuration | ||
| build --sandbox_writable_path=/var/tmp | ||
|
|
||
| # If using the credential helper for authenticated downloads: | ||
| common --credential_helper=*.qnx.com=/path/to/qnx_credential_helper.py |
4ebbe5a to
1e0140d
Compare
Document QNX SDP acquisition, local installation layout, required environment variables, Bazel configuration (.bazelrc), sandbox writable paths, and verification procedures for QNX toolchain setup. resolves #96
1e0140d to
3facac9
Compare
The latest module version is 0.5.4, not 0.4.0.
Small fixes for QNX integration docs to increase clarity and avoid possible issues during QNX integration. resolves #96
|
Hi @nradakovic, great guide! I would maybe split it in two parts:
The second one should be as straightforward as possible, ideally a step-by step guide that would explain what needs to be done locally to be able to run bazel build & bazel test after cloning a repository. |
aaf0a23 to
9c4ce80
Compare
412bfd7 to
e670e22
Compare
The documentation is split with clear focus topics for maintainers and for users.
e670e22 to
03b0ba8
Compare
|
|
||
| - [ ] **Replace SDP version**: Update `8.0.0` to your module's target SDP version | ||
| - [ ] **Update paths**: Adapt default paths and examples to your environment conventions | ||
| - [ ] **Update configuration variables**: Adapt configuration variables to your moodule configurations |
| gcc.toolchain( | ||
| name = "qnx_toolchain", | ||
| target_cpu = "x86_64", | ||
| target_os = "qnx", | ||
| sdp_version = "8.0.0", | ||
| use_default_package = True, | ||
| license_path = "/path/to/your/license/file", | ||
| ) |
| gcc.toolchain( | ||
| name = "qnx_toolchain", | ||
| target_cpu = "x86_64", | ||
| target_os = "qnx", | ||
| sdp_version = "8.0.0", | ||
| use_default_package = True, | ||
| license_path = "/path/to/your/license/file", | ||
| license_info_url = "https://your-license-server.com/qnx-license", | ||
| ) |
| bazel test --config=x86_64-qnx //... | ||
| ``` | ||
|
|
||
| > NOTE: For running tests, host platform must be QNX or use `--run_under=`. Check Bazel documentation for details. |
There was a problem hiding this comment.
The part about tests won't work out of the box. Users have to integrate https://github.com/eclipse-score/qnx_unit_tests and configure it properly.
Same applies to bazel test occurrences below in this md.
Maybe simply adding a sentence to refer to that module if one wants to execute unit tests?
There was a problem hiding this comment.
On top it says:
Example for GitHub Actions
I do not want to depend on documentation from another module, plus the toolchain will be used beyond S-CORE (at least that's the idea). So for S-CORE QNX Integration, it make sense to mention it. For toolchain setup example, not so much.
| sdp_version = "7.1.0", | ||
| use_default_package = True, |
There was a problem hiding this comment.
does default package work for qnx7?
I would completely skip mentioning version 7
There was a problem hiding this comment.
It does if you set it. QORIX is using QNX7 internally. In the end it, it's module responsability to ensure which SDP version they want to support. Toolchain can do whatever.
There was a problem hiding this comment.
And this is just an example. The goal of this section is to present posibilites. When it comes to supported platforms on S-CORE, that on reference integration to define. Doesn't make too much sense that toolchain configuration dictates which platform project supports.
Document QNX SDP acquisition, local installation layout, required environment variables, Bazel configuration (.bazelrc), sandbox writable paths, and verification procedures for QNX toolchain setup.
resolves #96