Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki1428: Bootstrap (Version 5)

Building from source with pkgsrc.#

Set up your kit#

Before building packages from source under QNX, it's recommended you download and install a tar archive containing fixes and omissions to our kit this entire exercise has uncovered. This may be updated periodically and the fixes contained within will eventually be part of general distribution of QNX. You may want to verify its contents and backup any existing components. At the time of writing this archive contains:

  • usr/bin/patch
    • The shipped one doesn't do anything. PR 21085.
  • usr/qnx632/target/qnx6/x86/usr/lib/libtermcap.a
    usr/qnx632/target/qnx6/x86/usr/lib/libtermcapS.a
    • tgetent() can pull out terminal definition for ansi rather than qansi. PR 45283.
      • tcsh can tickle this one.
  • usr/bin/expr
    • regular expression matching done with the ':' operator must be anchored to the beginning of the string. PR 49169.
      • libtool can tickle this one.
    • work buffer for ':' operator is too small. PR 50882.
      • configure scripts can tickle this one.
  • bin/uname
    • trailing space if muliple options are passed or -a specified is not POSIX. PR 44076.
  • usr/bin/comm
    • comm is needed for POSIX conformance. PR 19760.
      • perl needs this one.
  • usr/bin/ftp
    • This is the latest one from our next scheduled networking release and adds http support which pkgsrc likes to have.
  • bin/pwd
    • No terminating newline if stdout isn't a tty isn't POSIX. PR 44519.
  • usr/bin/tr
    • '\\' , '\a' , '\b' , '\f' , '\n' , '\r' , '\t' , '\v' should be supported as POSIX escape sequences. PR 24740.
  • bin/ksh
    • This is a weird one. libtool-1.5.24 consistently caused ksh to fault while building ncurses. Wasn't really able to debug it but recompiling the HEAD ksh seemed to remedy it so maybe something fixed along the way?

Optionally update your procnto#

  • This is _probably_ not needed. The building of groff passes a lot of args via its environment. There was a case where processes with a large PATH would not inherit their environment correctly (PR 44407). So depending on where you check it out to, the build of groff may show issues.

Set up your environment#

  • Add /usr/pkg/bin:/usr/pkg/sbin to your PATH
  • Add /usr/pkg/lib to your CS_LIBPATH
    • I have the following in my /etc/rc,d/rc.local
      setconf CS_LIBPATH $(getconf CS_LIBPATH):/usr/pkg/lib
  • Your default compiler will be used. 3.3.5 works much better.
    # qcc -V 3.3.5,gcc_ntox86 -set-default
    4.2.1 might be better still? Someone try it out :)

Bootstrap#

  • Download pkgsrc with QNX diffs. Familiarize yourself with the repository layout (see the 'Source Code' link above). The vendor branch contains snapshots of the unmodified NetBSD tree. These are useful for diffs and merges to the entire tree but otherwise aren't that interesting. The real work WRT QNX support is done under pkgsrc/HEAD so why not give it a whirl?
  • # cd pkgsrc/bootstrap
    # ./bootstrap

Set up the resulting /usr/pkg/etc/mk.conf#

  • We've taken the route to try to leverage qcc for future cross platform support so add the following line:
    PKGSRC_COMPILER=qcc
  • You'll probably want globally disable x11 support for now. To do so add the following line:
    PKG_DEFAULT_OPTIONS+= -x11
    Alternatively you can disable it on a per package basis as per the following example:
    # cd textproc/groff
    # bmake PKG_OPTIONS.groff=-x11

Try your first package#

# cd misc/figlet
# bmake install



Active Tab Versions Inactive Tab - left sideAssociations Inactive Tab - left sideAttachments Inactive Tab - left sideBack LinksInactive Tab - right side  
    Version From To Version Comment Created By
    Version 37 Sean Boudreau(deleted)  -  07/26/2011
    Version 36 Sean Boudreau(deleted)  -  07/26/2011
    Version 35 Sean Boudreau(deleted)  -  07/26/2011
    Version 34 Sean Boudreau(deleted)  -  06/15/2010
    Version 33 Sean Boudreau(deleted)  -  06/15/2010
    Version 32 Sean Boudreau(deleted)  -  08/30/2009
    Version 31 Sean Boudreau(deleted)  -  08/30/2009
    Version 30 Sean Boudreau(deleted)  -  11/28/2008
    Version 29 Sean Boudreau(deleted)  -  11/28/2008
    Version 28 Sean Boudreau(deleted)  -  12/19/2007
    Version 27 Sean Boudreau(deleted)  -  10/24/2007
    Version 26 Sean Boudreau(deleted)  -  10/23/2007
    Version 25 Sean Boudreau(deleted)  -  10/16/2007
    Version 24 Sean Boudreau(deleted)  -  10/15/2007
    Version 23 Sean Boudreau(deleted)  -  10/02/2007
    Version 22 Sean Boudreau(deleted)  -  10/01/2007
    Version 21 Sean Boudreau(deleted)  -  09/29/2007
    Version 20 Sean Boudreau(deleted)  -  09/29/2007
    Version 19 Xiaodan Tang(deleted)  -  09/25/2007
    Version 18 Xiaodan Tang(deleted)  -  09/25/2007
    Version 17 Sean Boudreau(deleted)  -  09/23/2007
    Version 16 Sean Boudreau(deleted)  -  09/23/2007
    Version 15 Sean Boudreau(deleted)  -  09/22/2007
    Version 14 Xiaodan Tang(deleted)  -  09/21/2007
    Version 13 Sean Boudreau(deleted)  -  09/21/2007
    Version 12 Sean Boudreau(deleted)  -  09/21/2007
    Version 11 Xiaodan Tang(deleted)  -  09/21/2007
    Version 10 Sean Boudreau(deleted)  -  09/21/2007
    Version 9 Sean Boudreau(deleted)  -  09/21/2007
    Version 8 Sean Boudreau(deleted)  -  09/21/2007
    Version 7 Sean Boudreau(deleted)  -  09/21/2007
    Version 6 Sean Boudreau(deleted)  -  09/21/2007
    Version 5 Sean Boudreau(deleted)  -  09/21/2007
    Version 4 Sean Boudreau(deleted)  -  09/21/2007
    Version 3 Sean Boudreau(deleted)  -  09/21/2007
    Version 2 Sean Boudreau(deleted)  -  09/21/2007
    Version 1 Sean Boudreau(deleted)  -  09/21/2007