1 (This file public domain. Originally written by Mojca Miklavec, 2015.)
3 Compiling TeX binaries on Solaris
5 (The document describes the procedures used on Sparc Solaris binaries,
6 but the same rules should apply to i386 and x86_64 as well.)
8 Solaris 9 has been out of official support for a while and making
9 software compile on that platform is challenging, so it hardly makes any
10 sense to try to support it.
12 Solaris 10 reaches end of support in January 2021:
13 http://en.wikipedia.org/wiki/Solaris_(operating_system)#Version_history
14 and TeX Live binaries try to stay compatible with that OS version.
16 Every once in a while a new Update is shipped:
28 and the problem is that binaries compiled on an updated system might not
31 You can check the libc version with
32 > pvs -no /usr/lib/libc.so
34 > pvs -d /lib/libc.so.1 | grep SUNW
47 Building wget on the latest version of Solaris 10 will make the binary
48 useless on older Updates of Solaris 10 as it would depend on SUNW_1.22.7.
50 One option to build wget in a "compatible way" would be to build it on
51 Solaris 9 with "cc". The other hack is the usage of map files.
53 To make it work on older systems the following hack was used (thanks to
54 the OpenCSW community):
55 https://buildfarm.opencsw.org/source/xref/opencsw/csw/mgar/pkg/wget/trunk/files/map.wget
58 libc.so - SUNW_1.22.5 SUNWprivate_1.1 $ADDVERS=SUNW_1.22.5;
60 export LD_OPTIONS="-M $PWD/mapfile"
62 And the following configuration was used to get rid of dependencies (which
63 are not installed on Solaris by default):
65 > ./configure --enable-ipv6 --disable-iri --disable-nls \
66 --disable-ntlm --disable-pcre --without-libiconv-prefix \
67 --without-libintl-prefix --without-libuuid --without-libpsl \
68 --without-ssl --without-zlib
70 The binary was built with gcc 4.9.2.
72 > pvs Master/tlpkg/installer/wget/wget.sparc-solaris
73 libsocket.so.1 (SUNW_1.4);
74 libnsl.so.1 (SUNW_1.7);
75 librt.so.1 (SUNW_1.2);
76 libc.so.1 (SUNW_1.22.5, SUNWprivate_1.1);
78 > ./Master/tlpkg/installer/wget/wget.sparc-solaris --version
79 GNU Wget 1.16.3 built on solaris2.10.
80 +digest -https +ipv6 -iri +large-file -nls -ntlm +opie -psl -ssl
82 (That list of configure options is current as of the above version of
83 wget; not all those dependencies are present in earlier versions.)
88 The xz binaries would likewise depend on SUNW_1.22.6 by default, so we
89 used the same hack with a map file to make it work on slightly older
92 > export LD_OPTIONS="-M $PWD/mapfile"
93 > ./configure --disable-nls --disable-shared
95 > pvs Master/tlpkg/installer/xz/xz.sparc-solaris
96 librt.so.1 (SUNW_1.2);
97 libpthread.so.1 (SUNW_1.2);
98 libc.so.1 (SUNW_1.22);
99 > pvs Master/tlpkg/installer/xz/xzdec.sparc-solaris
100 libc.so.1 (SUNW_1.22);
102 If users need binaries to run on even older systems, we can target what
103 is desired by changing the map file.
108 Two extra settings were needed to compile TeX Live with gcc 5.2:
109 * export LIBPNG_USER_CPPFLAGS="-D_XOPEN_SOURCE=600"
110 * ./Build --without-iconv
112 The second option makes sure to avoid linking against libiconv
113 which is not available on SunOS by default.
115 The first option is only needed on Solaris 10 to circumvent a problem
116 in libpng <https://sourceforge.net/p/libpng/bugs/245/>.
118 Using `#define _POSIX_SOURCE 1` will fail to compile on Solaris 10 with gcc 5.x
119 unless one of `_XPG6`, `_XOPEN_SOURCE = 600`, or `_POSIX_C_SOURCE = 200112L` is set.