0

Trying to deploy a small python web server to run on a Machine with QNX7.1 OS installed.

For various reasons, I cannot use docker, Pip is also not available on the machine nor can I just pre-install the third party libs I need on the machine (through something like apt-get python-aiohttp etc.). The deployment must be an easily executable file.

I've chosen Pex as the build tool, which will build in a CI Pipe somewhere and be made available over a custom service that behaves like scp.

My issue is that I'm using a couple of third party libraries and am having trouble getting the QNX compatible python 3rd party package installed at pex build time.

These are the libs I require (Not fixated on specific versions):

aiohttp==3.7.1
aiohttp-cors==0.7.0
aiohttp-jinja2==1.5
aiosignal==1.2.0
async-timeout==4.0.2
attrs==21.4.0
charset-normalizer==2.0.12
frozenlist==1.3.0
idna==3.3
Jinja2==3.1.1
MarkupSafe==2.1.1
multidict==6.0.2
RoboConfigApp==20220427
yarl==1.7.2 

From the pex documentation; there's an option to specify a platform however I'm clearly not using the correct platform string or not understanding what's happening.

Output of uname -a on the machine is: QNX-7.1.0-x86pc-x86_64 Python is 3.8.6 is system python which I must use (yes I've read the QNX docs relating to it's use.).

I've tried setting the platform as:

PLATFORM=qnx-x86_64-cp-3.8.6-cp38
PLATFORM=QNX-7.1.0-x86pc-x86_64
PLATFORM=unix-x86_64-cp-3.8.6-cp38
PLATFORM=linux-x86_64-cp-3.8.6-cp38
PLATFORM=unix-cp38-cp38-qnx_7_1_0_x86pc
PLATFORM=unix-x86pc-x86_64-cp-3.8.6-cp38

Does someone understand my issue and can point me in the right direction?

crowgers
  • 232
  • 3
  • 19
  • 1
    As far as I'm aware, most package maintainers do not supply prebuilt packages for QNX. You will likely have to build each of the packages (and all of their dependencies) for your QNX python yourself, build your own package repository, and supply pex with the location (see the --find-links flag). For what it's worth, building python packages for QNX may present its own challenges: for anything with a C component, you'll either need to find a way to cross-build them, or build your own compiler etc. to run natively on QNX. (QNX doesn't supply native build tools IIRC.) – Will Miles Apr 29 '22 at 02:36
  • Nope they don't, I thought maybe there's a potential cross-build but that's probably naive thinking. Building a package repository? What would that involve? QNX has GCC so maybe I could turn the python library into a c lib and have python call? Still in the learning phase I've been looking at (this link)[https://stackoverflow.com/questions/50167270/how-to-compile-a-whole-python-library-including-dependencies-so-that-it-can-be] to try figure it out – crowgers May 05 '22 at 10:16
  • 1
    We use [crossenv](https://github.com/benfogle/crossenv) in our build environment to cross-compile python modules. We're still using QNX 6.6 which does not come with a vendor-supplied python, though, so Python itself is also a part of our distro build - I don't know how well it might work if you point it at QNX 7's prebuilt python. One caveat is that the build system Python version should exactly match the target system Python version. – Will Miles May 06 '22 at 15:09

0 Answers0