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

Infrastructure support for QNX #1483

Merged
merged 3 commits into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bin/yaml/cpp.yaml
Original file line number Diff line number Diff line change
@@ -1028,6 +1028,14 @@ compilers:
- 5.7.0
- 6.0.2
- 6.1.2
qnx:
if: non-free
compression: xz
type: non-free-s3tarballs
# NB use a check_file here to avoid license issues
check_file: host/linux/x86_64/usr/bin/q++
targets:
- "800"
edg:
if: non-free
type: edg
34 changes: 34 additions & 0 deletions docs/packaging_qnx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Packing QNX

QNX is a _proprietary_ compiler for which we have been given permissiong to use and install with the educational license. For reference: Matt has an email Dec 19, 2024, 1:01 PM UTC subject "ETAS-VOS / QNX Alignment Discussion Points" granting the permission.

Packaging the QNX compilers is a pain. They have to be installed via a byzantine process downloading installers from [the website](https://www.qnx.com/download/group.html?programid=29178) and applying the license (type the license number and an empty password). The login for the site is in Matt's 1pass; speak to him if you're on the team and you'd like access.

### Installation

Install on a local linux machine with a process similar to:
- download the Linux host from QNX Software Centre
- run the .run file with bash in a terminal (bear in mind it will launch a GUI)
- accept the license
- specify the installation path (e.g. `qnx`) for the installation software itself.
- this then automatically launches the Software Centre GUI
- inside the GUI:
- log in
- "Add Installation" and install QNX 8 (not the SDP)
- select "Advanced Installation Variants" and select all architectures as well as experimental packages (not sure what those are but why not)
- click through and install (probably to `qnx800`)

(With thanks to `@doodspav`).

The license file was found to have been installed in `~/.qnx/licenses/license` and was manually copied to a safe location on the network.

For each version supported, we then manually tar Jcvf up the _contents_ of the `qnx800` or similar directory (`$ tar Jcvf (pwd)/qnx-800.tar.xz -C ~/qnx800 .`) and `aws s3 cp` the image to the `s3://compiler-explorer/opt-nonfree/`. Note the `-` in the name to make it "nicer" in CE-land.

### Running

The compiler requires some environment variables to run:
- `QNX_SHARED_LICENSE_FILE` points at the license file.
- `QNX_HOST` needs to point at the `host/linux/x86_64/` subdir.
- `QNX_TARGET` needs to point at the `target/qnx` subdir.

The compiler's targeting is controlled by the `-V` command e.g. `-Vgcc_ntoaarch64le` (defaulting to x86).
3 changes: 3 additions & 0 deletions setup-builder-startup.sh
Original file line number Diff line number Diff line change
@@ -37,6 +37,9 @@ mount_opt() {
mkdir -p /opt/arm
mountpoint /opt/arm || mount --bind /efs/arm /opt/arm

mkdir -p /opt/qnx
mountpoint /opt/qnx || mount --bind /efs/qnx /opt/qnx

[ -f /opt/.health ] || touch /opt/.health
mountpoint /opt/.health || mount --bind /efs/.health /opt/.health

3 changes: 3 additions & 0 deletions start-support.sh
Original file line number Diff line number Diff line change
@@ -27,6 +27,9 @@ mount_opt() {
mkdir -p /opt/arm
mountpoint /opt/arm || mount --bind /efs/arm /opt/arm

mkdir -p /opt/qnx
mountpoint /opt/qnx || mount --bind /efs/qnx /opt/qnx

[ -f /opt/.health ] || touch /opt/.health
mountpoint /opt/.health || mount --bind /efs/.health /opt/.health

8 changes: 8 additions & 0 deletions update_compilers/install_nonfree_compilers.sh
Original file line number Diff line number Diff line change
@@ -20,6 +20,11 @@ ce_squash tools
ce_install edg
ce_squash edg

##################################
# QNX compilers
ce_install qnx
ce_squash qnx

##################################
# Intel compilers
for compiler in \
@@ -36,6 +41,9 @@ for license in COM_L__CPPFOR_HFGW-87P5C9BZ.lic NCOM_L__CPPFOR_ND83-JL4ZKB6T.lic;
s3get ${S3URL}/$license /opt/intel/licenses/$license # NB not ${OPT} as we need this actually at this absolute path
done

mkdir -p /opt/qnx
s3get ${S3URL}/qnx-licenses /opt/qnx/licenses

for version in 2016.3.210 2018.0.033; do
if [[ ! -d intel-${version} ]]; then
compiler=intel-${version}.tar.xz