This page should use cross references to avoid duplicate content. Please help us by cleaning it up. ?

Contents

  1. See
  2. Software requirements
  3. Troubleshooting bootstrap
    1. Shell's echo command is not BSD-compatible
    2. ARG_MAX undeclared
    3. FORTIFY_SOURCE
    4. libncurses not installed

See

README.Linux

pkgsrc guide

Software requirements

Before you can use pkgsrc, you may need a few packages installed on your Linux system upfront.

The names may vary, depending on what Linux distribution you are using. Also be mindful of the platform you are using (eg. i686 vs. x86_64 - some have different pre-required packages). Also note that some very basic tools such as file, patch, sed, and others are required, as well.

Troubleshooting bootstrap

Shell's echo command is not BSD-compatible

If you see this error

ERROR: Your shell's echo command is not BSD-compatible.

This error is known to occur if /bin/sh is linked to /bin/dash (recent Ubuntu versions).

The fix is to issue the following before commencing bootstrap: export SH=/bin/bash

ARG_MAX undeclared

If bootstrap stops at

In file included from glob.c:12:                                                
__glob13.c: In function globextend:                                             
__glob13.c:836: error: ARG_MAX undeclared (first use in this function)

Then apply this patch 1

FORTIFY_SOURCE

If bootstrap stops at

/usr/pkgsrc/bootstrap/work/bmake/arch.c: In function 'Arch_Touch':
/usr/pkgsrc/bootstrap/work/bmake/arch.c:1038: warning: ignoring return
value of 'fwrite', declared with attribute warn_unused_result
*** Error code 1

This error occurs because Linux uses -DFORTIFY_SOURCES by default. Bootstrap can be achieved by:

CFLAGS="-U_FORTIFY_SOURCE" ./bootstrap 

libncurses not installed

If bootstrap stops at

ERROR: This package has set PKG_FAIL_REASON:
ERROR: No usable termcap library found on the system.

Then install the libncurses-dev package

On an RPM based system this might be via 'yum install ncurses-devel', and on a Debian/Ubuntu system 'apt-get install libncurses5-dev'