{
    "content": [
        {
            "type": "text",
            "text": "# PERLQNX (man)\n\n## NAME\n\nperlqnx - Perl version 5 on QNX\n\n## DESCRIPTION\n\nAs of perl5.7.2 all tests pass under:\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION** (5 subsections)\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "PERLQNX",
        "section": "",
        "mode": "man",
        "summary": "perlqnx - Perl version 5 on QNX",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": [
                    {
                        "name": "Required Software for Compiling Perl on QNX4",
                        "lines": 24
                    },
                    {
                        "name": "Outstanding Issues with Perl on QNX4",
                        "lines": 24
                    },
                    {
                        "name": "QNX auxiliary files",
                        "lines": 13
                    },
                    {
                        "name": "Outstanding issues with perl under QNX6",
                        "lines": 8
                    },
                    {
                        "name": "Cross-compilation",
                        "lines": 55
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "perlqnx - Perl version 5 on QNX\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "As of perl5.7.2 all tests pass under:\n\nQNX 4.24G\nWatcom 10.6 with Beta/970211.wcc.update.tar.F\nsocket3r.lib Nov21 1996.\n\nAs of perl5.8.1 there is at least one test still failing.\n\nSome tests may complain under known circumstances.\n\nSee below and hints/qnx.sh for more information.\n\nUnder QNX 6.2.0 there are still a few tests which fail.  See below and hints/qnx.sh for more\ninformation.\n",
                "subsections": [
                    {
                        "name": "Required Software for Compiling Perl on QNX4",
                        "content": "As with many unix ports, this one depends on a few \"standard\" unix utilities which are not\nnecessarily standard for QNX4.\n\n/bin/sh\nThis is used heavily by Configure and then by perl itself. QNX4's version is fine, but\nConfigure will choke on the 16-bit version, so if you are running QNX 4.22, link /bin/sh\nto /bin32/ksh\n\nar  This is the standard unix library builder.  We use wlib. With Watcom 10.6, when wlib is\nlinked as \"ar\", it behaves like ar and all is fine. Under 9.5, a cover is required. One\nis included in ../qnx\n\nnm  This is used (optionally) by configure to list the contents of libraries. I will generate\na cover function on the fly in the UU directory.\n\ncpp Configure and perl need a way to invoke a C preprocessor. I have created a simple cover\nfor cc which does the right thing. Without this, Configure will create its own wrapper\nwhich works, but it doesn't handle some of the command line arguments that perl will\nthrow at it.\n\nmake\nYou really need GNU make to compile this. GNU make ships by default with QNX 4.23, but\nyou can get it from quics for earlier versions.\n"
                    },
                    {
                        "name": "Outstanding Issues with Perl on QNX4",
                        "content": "There is no support for dynamically linked libraries in QNX4.\n\nIf you wish to compile with the Socket extension, you need to have the TCP/IP toolkit, and\nyou need to make sure that -lsocket locates the correct copy of socket3r.lib. Beware that the\nWatcom compiler ships with a stub version of socket3r.lib which has very little\nfunctionality. Also beware the order in which wlink searches directories for libraries. You\nmay have /usr/lib/socket3r.lib pointing to the correct library, but wlink may pick up\n/usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure they both point to the correct\nlibrary, that is, /usr/tcptk/current/usr/lib/socket3r.lib.\n\nThe following tests may report errors under QNX4:\n\ndist/Cwd/Cwd.t will complain if `pwd` and cwd don't give the same results. cwd calls\n`fullpath -t`, so if you cd `fullpath -t` before running the test, it will pass.\n\nlib/File/Find/taint.t will complain if '.' is in your PATH. The PATH test is triggered\nbecause cwd calls `fullpath -t`.\n\next/IO/lib/IO/t/iosock.t: Subtests 14 and 22 are skipped due to the fact that the\nfunctionality to read back the non-blocking status of a socket is not implemented in QNX's\nTCP/IP. This has been reported to QNX and it may work with later versions of TCP/IP.\n\nt/io/tell.t: Subtest 27 is failing. We are still investigating.\n"
                    },
                    {
                        "name": "QNX auxiliary files",
                        "content": "The files in the \"qnx\" directory are:\n\nqnx/ar\nA script that emulates the standard unix archive (aka library) utility.  Under Watcom\n10.6, ar is linked to wlib and provides the expected interface. With Watcom 9.5, a cover\nfunction is required. This one is fairly crude but has proved adequate for compiling\nperl.\n\nqnx/cpp\nA script that provides C preprocessing functionality.  Configure can generate a similar\ncover, but it doesn't handle all the command-line options that perl throws at it. This\nmight be reasonably placed in /usr/local/bin.\n"
                    },
                    {
                        "name": "Outstanding issues with perl under QNX6",
                        "content": "The following tests are still failing for Perl 5.8.1 under QNX 6.2.0:\n\nop/sprintf.........................FAILED at test 91\nlib/Benchmark......................FAILED at test 26\n\nThis is due to a bug in the C library's printf routine.  printf(\"'%e'\", 0. ) produces\n'0.000000e+0', but ANSI requires '0.000000e+00'. QNX has acknowledged the bug.\n"
                    },
                    {
                        "name": "Cross-compilation",
                        "content": "Perl supports cross-compiling to QNX NTO through the Native Development Kit (NDK) for the\nBlackberry 10.  This means that you can cross-compile for both ARM and x86 versions of the\nplatform.\n\nSetting up a cross-compilation environment\n\nYou can download the NDK from <http://developer.blackberry.com/native/downloads/>.\n\nSee\n<http://developer.blackberry.com/native/documentation/cascades/gettingstarted/settingup.html>\nfor instructions to set up your device prior to attempting anything else.\n\nOnce you've installed the NDK and set up your device, all that's left to do is setting up the\ndevice and the cross-compilation environment.  Blackberry provides a script, \"bbndk-env.sh\"\n(occasionally named something like \"bbndk-env10104828.sh\") which can be used to do this.\nHowever, there's a bit of a snag that we have to work through: The script modifies PATH so\nthat 'gcc' or 'ar' point to their cross-compilation equivalents, which screws over the build\nprocess.\n\nSo instead you'll want to do something like this:\n\n$ origpath=$PATH\n$ source $locationofbbndk/bbndk-env*.sh\n$ export PATH=\"$origpath:$PATH\"\n\nBesides putting the cross-compiler and the rest of the toolchain in your PATH, this will also\nprovide the QNXTARGET variable, which we will pass to Configure through -Dsysroot.\n\nPreparing the target system\n\nIt's quite possible that the target system doesn't have a readily available /tmp, so it's\ngenerally safer to do something like this:\n\n$ ssh $TARGETUSER@$TARGETHOST 'rm -rf perl; mkdir perl; mkdir perl/tmp'\n$ export TARGETDIR=`ssh $TARGETUSER@$TARGETHOST pwd`/perl\n$ export TARGETENV=\"export TMPDIR=$TARGETDIR/tmp; \"\n\nLater on, we'll pass this to Configure through -Dtargetenv\n\nCalling Configure\n\nIf you are targetting an ARM device -- which currently includes the vast majority of phones\nand tablets -- you'll want to pass -Dcc=arm-unknown-nto-qnx8.0.0eabi-gcc to Configure.\nAlternatively, if you are targetting an x86 device, or using the simulator provided with the\nNDK, you should specify -Dcc=ntox86-gcc instead.\n\nA sample Configure invocation looks something like this:\n\n./Configure -des -Dusecrosscompile \\\n-Dsysroot=$QNXTARGET          \\\n-Dtargetdir=$TARGETDIR         \\\n-Dtargetenv=\"$TARGETENV\"       \\\n-Dcc=ntox86-gcc                \\\n-Dtarghost=... # Usual cross-compilation options\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Norton T. Allen (allen@huarp.harvard.edu)\n\n\n\nperl v5.34.0                                 2025-07-25                                   PERLQNX(1)",
                "subsections": []
            }
        }
    }
}