| @@ -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 | |
3 | You will need a working C compiler. Any version of gcc >2.8 should | | 3 | You will need a working C compiler. Any version of gcc >2.8 should |
4 | work, 2.95.x and 3.x have been tested. SunPro 5 and 8 have been | | 4 | work, 2.95.x and 3.x have been tested. SunPro 5 and 8 have been |
5 | tested, but versions in between should work, too. | | 5 | tested, but versions in between should work, too. |
6 | | | 6 | |
7 | The following packages are the minimum required on Solaris 8 to | | 7 | The following packages are the minimum required on Solaris 8 to |
8 | bootstrap and build packages. | | 8 | bootstrap 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 | |
17 | Realistically you will need more, such as SUNWlibm, and SUNWlibC for | | 17 | Realistically you will need more, such as SUNWlibm, and SUNWlibC for |
18 | C++ packages if you are using SunPro. | | 18 | C++ packages if you are using SunPro. |
19 | | | 19 | |
20 | Please note the use of GNU binutils on Solaris is not supported. | | 20 | Please note the use of GNU binutils on Solaris is not supported. |
21 | | | 21 | |
22 | pkgsrc in Solaris Zones | | 22 | pkgsrc in Solaris Zones |
23 | ----------------------- | | 23 | ----------------------- |
24 | | | 24 | |
25 | If you are trying to bootstrap pkgsrc in a Solaris Zone then you will | | 25 | If you are trying to bootstrap pkgsrc in a Solaris Zone then you will |
26 | need to install the following packages (assuming you will bootstrap using | | 26 | need to install the following packages (assuming you will bootstrap using |
27 | Sun's gcc package): | | 27 | Sun'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 | |
41 | Tested on OpenSolaris 5.11 snv_105 and pkgsrc bootstrap as at Jan 2009. | | 41 | Tested on OpenSolaris 5.11 snv_105 and pkgsrc bootstrap as at Jan 2009. |
42 | | | 42 | |
43 | If you are using gcc | | 43 | If you are using gcc |
44 | -------------------- | | 44 | -------------------- |
45 | It makes life much simpler if you only use the same gcc consistently | | 45 | It makes life much simpler if you only use the same gcc consistently |
46 | for building all packages. | | 46 | for building all packages. |
47 | | | 47 | |
48 | See http://www.NetBSD.org/docs/software/packages.html for | | 48 | See http://www.NetBSD.org/docs/software/packages.html for |
49 | binary kits and initial packages, including gcc. | | 49 | binary kits and initial packages, including gcc. |
50 | | | 50 | |
51 | If the gcc installation is not in your $PATH you will need to pass | | 51 | If the gcc installation is not in your $PATH you will need to pass |
52 | additional flags to bootstrap, for example: | | 52 | additional 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 | |
58 | It is recommended that an external gcc be used only for bootstrapping, | | 58 | It is recommended that an external gcc be used only for bootstrapping, |
59 | and that you set USE_PKGSRC_GCC=yes in mk.conf so that the appropriate | | 59 | and that you set USE_PKGSRC_GCC=yes in mk.conf so that the appropriate |
60 | pkgsrc gcc is installed and used. | | 60 | pkgsrc gcc is installed and used. |
61 | | | 61 | |
62 | Binary packages of gcc can be found through | | 62 | Binary packages of gcc can be found through |
63 | http://www.sunfreeware.com/ | | 63 | http://www.sunfreeware.com/ |
64 | | | 64 | |
65 | If you are using Sun WorkShop | | 65 | If you are using Sun WorkShop |
66 | ----------------------------- | | 66 | ----------------------------- |
67 | You will need at least the following packages installed to build C and | | 67 | You will need at least the following packages installed to build C and |
68 | C++ packages. | | 68 | C++ packages. |
69 | | | 69 | |
70 | WorkShop 5.0: | | 70 | WorkShop 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 | |
77 | Sun ONE Studio 8: | | 77 | Sun 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 | |
89 | The corresponding 64-bit packages are also required to build 64-bit | | 89 | The corresponding 64-bit packages are also required to build 64-bit |
90 | binaries and libraries. | | 90 | binaries and libraries. |
91 | | | 91 | |
92 | To build 64-bit binaries, pass '--abi=64' to bootstrap, and also see the | | 92 | To build 64-bit binaries, pass '--abi=64' to bootstrap, and also see the |
93 | crle(1) man page to configure the runtime linking environment. | | 93 | crle(1) man page to configure the runtime linking environment. |
94 | | | 94 | |
95 | pkgsrc defaults to finding the Sun compiler in /opt/SUNWspro. If you use a | | 95 | pkgsrc defaults to finding the Sun compiler in /opt/SUNWspro. If you use a |
96 | different prefix, pass SUNWSPROBASE in the environment to bootstrap. If 'cc' | | 96 | different prefix, pass SUNWSPROBASE in the environment to bootstrap. If 'cc' |
97 | is not in your path, pass CC as well. So, to build 64-bit Sun compiler | | 97 | is not in your path, pass CC as well. So, to build 64-bit Sun compiler |
98 | bootstrap with a non-standard install: | | 98 | bootstrap 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 | |
104 | When bootstrap is finished your default mk.conf will contain ABI and | | 104 | When bootstrap is finished your default mk.conf will contain ABI and |
105 | SUNWSPROBASE so you will not need to set these variables again. | | 105 | SUNWSPROBASE so you will not need to set these variables again. |
106 | | | 106 | |
107 | Whichever compiler you use, please ensure the compiler tools and | | 107 | Whichever compiler you use, please ensure the compiler tools and |
108 | your $prefix are in your PATH. This includes /usr/ccs/{bin,lib} | | 108 | your $prefix are in your PATH. This includes /usr/ccs/{bin,lib} |
109 | and eg. /usr/pkg/{bin,sbin}. | | 109 | and eg. /usr/pkg/{bin,sbin}. |
110 | | | 110 | |
| | | 111 | You 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 | |
| | | 117 | Common problems |
| | | 118 | --------------- |
| | | 119 | Sometimes, when using libtool, /bin/ksh crashes with a segmentation fault. The |
| | | 120 | workaround is to use another shell for the configure scripts, for example by |
| | | 121 | installing 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 | |
| | | 126 | Then, rebuild the devel/libtool-base package. |
| | | 127 | |
111 | bootstrap-pkgsrc has been tested on Solaris 2.6 -> 10. | | 128 | bootstrap-pkgsrc has been tested on Solaris 2.6 -> 10. |