File:  [NetBSD Developer Wiki] / wikisrc / pkgsrc / how_to_use_pkgsrc_on_linux.mdwn
Revision 1.7: download - view: text, annotated - select for diffs
Mon Mar 6 21:55:47 2017 UTC (6 years, 8 months ago) by sevan
Branches: MAIN
CVS tags: HEAD
Switch link to use cdn for README.Linux.
Switch lable for documentation to pkgsrc guide.
Correct packages name for ncurses headers on Debian.
Typo.

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

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