File:  [NetBSD Developer Wiki] / wikisrc / pkgsrc / how_to_use_pkgsrc_on_linux.mdwn
Revision 1.6: download - view: text, annotated - select for diffs
Fri Feb 8 05:22:47 2013 UTC (7 years ago) by asau
Branches: MAIN
CVS tags: HEAD
Refine references to The Guide.

    1: **This page should use cross references to avoid duplicate content. Please help us by cleaning it up. ?**
    2: 
    3: **Contents**
    4: 
    5: [[!toc levels=2]]
    6: 
    7: #See
    8: 
    9: [Documentation](http://www.netbsd.org/docs/pkgsrc/)
   10: [Linux-specific documentation](http://www.netbsd.org/docs/pkgsrc/platforms.html#linux)
   11: [README.Linux](ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/bootstrap/README.Linux)
   12: #Software requirements
   13: 
   14: Before you can use pkgsrc, you may need a few packages installed on your Linux system upfront.
   15: 
   16: * gcc (and libstdc++)
   17: * libncurses-devel
   18: * zlib and zlib-devel
   19: * openssl-devel (optional but required for some packages) 
   20: 
   21: 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.
   22: 
   23: #Troubleshooting bootstrap
   24: ##Shell's echo command is not BSD-compatible
   25: 
   26: If you see this error
   27: 
   28:     ERROR: Your shell's echo command is not BSD-compatible.
   29: 
   30: This error is known to occur if /bin/sh is linked to /bin/dash (recent Ubuntu versions).
   31: 
   32: The fix is to issue the following before commencing bootstrap: export SH=/bin/bash
   33: ##ARG_MAX undeclared
   34: 
   35: If bootstrap stops at
   36: 
   37:     In file included from glob.c:12:                                                
   38:     __glob13.c: In function globextend:                                             
   39:     __glob13.c:836: error: ARG_MAX undeclared (first use in this function)
   40: 
   41: Then apply this patch [1](http://mail-index.netbsd.org/pkgsrc-bugs/2008/06/21/msg026977.html)
   42: ##FORTIFY_SOURCE
   43: 
   44: If bootstrap stops at
   45: 
   46:     /usr/pkgsrc/bootstrap/work/bmake/arch.c: In function 'Arch_Touch':
   47:     /usr/pkgsrc/bootstrap/work/bmake/arch.c:1038: warning: ignoring return
   48:     value of 'fwrite', declared with attribute warn_unused_result
   49:     *** Error code 1
   50: 
   51: This error occurs because Linux uses -DFORTIFY_SOURCES by default. Bootstrap can be achieved by:
   52: 
   53:     CFLAGS="-U_FORTIFY_SOURCE" ./bootstrap 
   54: 
   55: ##libncurses not installed
   56: 
   57: If bootstrap stops at
   58: 
   59:     ERROR: This package has set PKG_FAIL_REASON:
   60:     ERROR: No usable termcap library found on the system.
   61: 
   62: Then install the libncurses-dev package
   63: 
   64: On an RPM based system this might be via 'yum install ncurses-devel', and on a debia/ubuntu system 'apt-get install ncurses5-dev' 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb