Sun Jul 3 15:38:12 2016 UTC ()
Add notes about common problems & mk.conf snippet for Sun Workshop users from the pkgsrc guide


(sevan)
diff -r1.14 -r1.15 pkgsrc/bootstrap/README.Solaris

cvs diff -r1.14 -r1.15 pkgsrc/bootstrap/README.Solaris (switch to unified diff)

--- pkgsrc/bootstrap/README.Solaris 2012/07/13 16:12:41 1.14
+++ pkgsrc/bootstrap/README.Solaris 2016/07/03 15:38:12 1.15
@@ -1,111 +1,128 @@ @@ -1,111 +1,128 @@
1$NetBSD: README.Solaris,v 1.14 2012/07/13 16:12:41 jperkin Exp $ 1$NetBSD: README.Solaris,v 1.15 2016/07/03 15:38:12 sevan Exp $
2 2
3You will need a working C compiler. Any version of gcc >2.8 should 3You will need a working C compiler. Any version of gcc >2.8 should
4work, 2.95.x and 3.x have been tested. SunPro 5 and 8 have been 4work, 2.95.x and 3.x have been tested. SunPro 5 and 8 have been
5tested, but versions in between should work, too. 5tested, but versions in between should work, too.
6 6
7The following packages are the minimum required on Solaris 8 to 7The following packages are the minimum required on Solaris 8 to
8bootstrap and build packages. 8bootstrap and build packages.
9 9
10 - SUNWsprot 10 - SUNWsprot
11 - SUNWarc 11 - SUNWarc
12 - SUNWbtool 12 - SUNWbtool
13 - SUNWtoo 13 - SUNWtoo
14 - SUNWscpu 14 - SUNWscpu
15 - SUNWxcu4 15 - SUNWxcu4
16 16
17Realistically you will need more, such as SUNWlibm, and SUNWlibC for 17Realistically you will need more, such as SUNWlibm, and SUNWlibC for
18C++ packages if you are using SunPro. 18C++ packages if you are using SunPro.
19 19
20Please note the use of GNU binutils on Solaris is not supported. 20Please note the use of GNU binutils on Solaris is not supported.
21 21
22pkgsrc in Solaris Zones 22pkgsrc in Solaris Zones
23----------------------- 23-----------------------
24 24
25If you are trying to bootstrap pkgsrc in a Solaris Zone then you will 25If you are trying to bootstrap pkgsrc in a Solaris Zone then you will
26need to install the following packages (assuming you will bootstrap using 26need to install the following packages (assuming you will bootstrap using
27Sun's gcc package): 27Sun's gcc package):
28 28
29 - SUNWgccruntime 29 - SUNWgccruntime
30 - SUNWgcc 30 - SUNWgcc
31 - SUNWbinutils 31 - SUNWbinutils
32 - SUNWbtool 32 - SUNWbtool
33 - SUNWggrp 33 - SUNWggrp
34 - SUNWxcu4 34 - SUNWxcu4
35 - SUNWcs 35 - SUNWcs
36 - SUNWsprot 36 - SUNWsprot
37 - SUNWlibm 37 - SUNWlibm
38 - SUNWloc 38 - SUNWloc
39 - SUNWsndm 39 - SUNWsndm
40 40
41Tested on OpenSolaris 5.11 snv_105 and pkgsrc bootstrap as at Jan 2009. 41Tested on OpenSolaris 5.11 snv_105 and pkgsrc bootstrap as at Jan 2009.
42 42
43If you are using gcc 43If you are using gcc
44-------------------- 44--------------------
45It makes life much simpler if you only use the same gcc consistently 45It makes life much simpler if you only use the same gcc consistently
46for building all packages. 46for building all packages.
47 47
48See http://www.NetBSD.org/docs/software/packages.html for 48See http://www.NetBSD.org/docs/software/packages.html for
49binary kits and initial packages, including gcc. 49binary kits and initial packages, including gcc.
50 50
51If the gcc installation is not in your $PATH you will need to pass 51If the gcc installation is not in your $PATH you will need to pass
52additional flags to bootstrap, for example: 52additional flags to bootstrap, for example:
53 53
54 env CC=/opt/gcc-4.6.3/bin/gcc \ 54 env CC=/opt/gcc-4.6.3/bin/gcc \
55 GCCBASE=/opt/gcc-4.6.3 \ 55 GCCBASE=/opt/gcc-4.6.3 \
56 ./bootstrap --abi=64 56 ./bootstrap --abi=64
57 57
58It is recommended that an external gcc be used only for bootstrapping, 58It is recommended that an external gcc be used only for bootstrapping,
59and that you set USE_PKGSRC_GCC=yes in mk.conf so that the appropriate 59and that you set USE_PKGSRC_GCC=yes in mk.conf so that the appropriate
60pkgsrc gcc is installed and used. 60pkgsrc gcc is installed and used.
61 61
62Binary packages of gcc can be found through 62Binary packages of gcc can be found through
63http://www.sunfreeware.com/ 63http://www.sunfreeware.com/
64 64
65If you are using Sun WorkShop 65If you are using Sun WorkShop
66----------------------------- 66-----------------------------
67You will need at least the following packages installed to build C and 67You will need at least the following packages installed to build C and
68C++ packages. 68C++ packages.
69 69
70WorkShop 5.0: 70WorkShop 5.0:
71 71
72 SPROcc Sun WorkShop Compiler C 5.0 72 SPROcc Sun WorkShop Compiler C 5.0
73 SPROcpl Sun WorkShop Compiler C++ 5.0 73 SPROcpl Sun WorkShop Compiler C++ 5.0
74 SPROild Sun WorkShop Incremental Linker 74 SPROild Sun WorkShop Incremental Linker
75 SPROlang Sun WorkShop Compilers common components 75 SPROlang Sun WorkShop Compilers common components
76 76
77Sun ONE Studio 8: 77Sun ONE Studio 8:
78 78
79 SPROcc Sun ONE Studio 8 Compiler C 79 SPROcc Sun ONE Studio 8 Compiler C
80 SPROcpl Sun ONE Studio 8 Compiler C++ 80 SPROcpl Sun ONE Studio 8 Compiler C++
81 SPROdwrfb DwarfSupportLibrary binaries 81 SPROdwrfb DwarfSupportLibrary binaries
82 SPROild Sun ONE Studio 8 Incremental Linker 82 SPROild Sun ONE Studio 8 Incremental Linker
83 SPROlang Sun ONE Studio 8 Compilers Common Components 83 SPROlang Sun ONE Studio 8 Compilers Common Components
84 SPROsbld Sun ONE Studio 8 Linker Stab Library 84 SPROsbld Sun ONE Studio 8 Linker Stab Library
85 SPROscl Sun ONE Studio 8 Standard Class Library for C++ 85 SPROscl Sun ONE Studio 8 Standard Class Library for C++
86 SPROtlbn7 Sun ONE Studio 8 Tools.h++ 7.1 Class Library for C++ 86 SPROtlbn7 Sun ONE Studio 8 Tools.h++ 7.1 Class Library for C++
87 SPROutool Sun ONE Studio 8 Common Tools 87 SPROutool Sun ONE Studio 8 Common Tools
88 88
89The corresponding 64-bit packages are also required to build 64-bit 89The corresponding 64-bit packages are also required to build 64-bit
90binaries and libraries. 90binaries and libraries.
91 91
92To build 64-bit binaries, pass '--abi=64' to bootstrap, and also see the 92To build 64-bit binaries, pass '--abi=64' to bootstrap, and also see the
93crle(1) man page to configure the runtime linking environment. 93crle(1) man page to configure the runtime linking environment.
94 94
95pkgsrc defaults to finding the Sun compiler in /opt/SUNWspro. If you use a 95pkgsrc defaults to finding the Sun compiler in /opt/SUNWspro. If you use a
96different prefix, pass SUNWSPROBASE in the environment to bootstrap. If 'cc' 96different prefix, pass SUNWSPROBASE in the environment to bootstrap. If 'cc'
97is not in your path, pass CC as well. So, to build 64-bit Sun compiler 97is not in your path, pass CC as well. So, to build 64-bit Sun compiler
98bootstrap with a non-standard install: 98bootstrap with a non-standard install:
99 99
100 env CC=/opt/studio12/SUNWspro/bin/cc \ 100 env CC=/opt/studio12/SUNWspro/bin/cc \
101 SUNWSPROBASE=/opt/studio12/SUNWspro \ 101 SUNWSPROBASE=/opt/studio12/SUNWspro \
102 ./bootstrap --abi=64 102 ./bootstrap --abi=64
103 103
104When bootstrap is finished your default mk.conf will contain ABI and 104When bootstrap is finished your default mk.conf will contain ABI and
105SUNWSPROBASE so you will not need to set these variables again. 105SUNWSPROBASE so you will not need to set these variables again.
106 106
107Whichever compiler you use, please ensure the compiler tools and 107Whichever compiler you use, please ensure the compiler tools and
108your $prefix are in your PATH. This includes /usr/ccs/{bin,lib} 108your $prefix are in your PATH. This includes /usr/ccs/{bin,lib}
109and eg. /usr/pkg/{bin,sbin}. 109and eg. /usr/pkg/{bin,sbin}.
110 110
 111You should set the following variables in your mk.conf file:
 112 CC= cc
 113 CXX= CC
 114 CPP= cc -E
 115 CXXCPP= CC -E
 116
 117Common problems
 118---------------
 119Sometimes, when using libtool, /bin/ksh crashes with a segmentation fault. The
 120workaround is to use another shell for the configure scripts, for example by
 121installing shells/bash and adding the following lines to your mk.conf:
 122
 123 CONFIG_SHELL= ${LOCALBASE}/bin/bash
 124 WRAPPER_SHELL= ${LOCALBASE}/bin/bash
 125
 126Then, rebuild the devel/libtool-base package.
 127
111bootstrap-pkgsrc has been tested on Solaris 2.6 -> 10. 128bootstrap-pkgsrc has been tested on Solaris 2.6 -> 10.