| 1 |
\section[Solaris 10]{Solaris 10} |
| 2 |
\label{sec:solaris_10} |
| 3 |
\addcontentsline{toc}{section}{\thesection. Solaris 10} |
| 4 |
|
| 5 |
Solaris 10 with external ZeroMQ 4.0.7 library and GNU tools (OpenCSW) |
| 6 |
has be tested for \pkg{pbdZMQ} successfully. The \code{INSTALL.solaris} |
| 7 |
has the steps which basically are |
| 8 |
\begin{enumerate} |
| 9 |
\item install GNU tools from OpenCSW using \code{pkgutil}, |
| 10 |
\item set path to GNU tools, |
| 11 |
\item install external ZeroMQ 4.0.7 library using GNU tools, and |
| 12 |
\item install \pkg{pbdZMQ} linked with external ZeroMQ. |
| 13 |
\end{enumerate} |
| 14 |
The steps are tested without too much time effort for further changes and |
| 15 |
can quickly provide a compiled library and install the \pkg{pbdZMQ}. |
| 16 |
I write down some considerations about ZeroMQ library here as a note in next. |
| 17 |
\begin{enumerate} |
| 18 |
\item Current, the ZeroMQ library on OpenCSW is 2.2.0 which is too old to |
| 19 |
be compiled with \pkg{pbdZMQ}. |
| 20 |
\item Newer ZeroMQ (> 4.0.7) can not be compiled with OpenCSW, there are |
| 21 |
more bugs to fix for Solaris according github's pull request. |
| 22 |
\item Using Sun CC is even more complicated because there are more |
| 23 |
compile flags needed to take care first. |
| 24 |
\end{enumerate} |
| 25 |
|
| 26 |
|
| 27 |
\subsection[Have a Solaris 10?]{Have a Solaris 10?} |
| 28 |
\label{sec:have_solaris_10} |
| 29 |
\addcontentsline{toc}{subsection}{\thesubsection. Have a Solaris 10?} |
| 30 |
|
| 31 |
It is easy and has a lot of fun. |
| 32 |
\begin{enumerate} |
| 33 |
\item |
| 34 |
Install an Oracle VM VirtualBox which is available at |
| 35 |
\url{https://www.virtualbox.org/}. |
| 36 |
\item |
| 37 |
Download a Solaris template from \\ |
| 38 |
\url{https://www.oracle.com/technetwork/server-storage/vm/solaris-098101.html}. |
| 39 |
\item |
| 40 |
Import the template to the VM. |
| 41 |
\item |
| 42 |
Boot and setup root password, internet, share drives, etc. |
| 43 |
\item |
| 44 |
Done. |
| 45 |
\end{enumerate} |
| 46 |
|
| 47 |
The next to do is having compilers by installing OpenCSW first, then |
| 48 |
install libraries and software either from OpenCSW website or compile |
| 49 |
them manually. One can have most GNU tools and \proglang{R} installed |
| 50 |
from OpenCSW via \code{pkgutil} command, and compile ZeroMQ library externally |
| 51 |
using those tools, then install \pkg{pbdZMQ} by linking with the compiled |
| 52 |
ZeroMQ library. The details are given in the following Sections. |
| 53 |
|
| 54 |
|
| 55 |
\subsection[OpenCSW]{OpenCSW} |
| 56 |
\label{sec:opencsw} |
| 57 |
\addcontentsline{toc}{subsection}{\thesubsection. OpenCSW} |
| 58 |
The OpenCSW (\url{www.opencsw.org}) provides binary packages of GNU tools |
| 59 |
for Solaris 10. Ideally, gmake, gcc, g++, autoconf, automake, gtar are |
| 60 |
required which all available from the website. For example, the gcc is in |
| 61 |
"gcc4core" package which can be installed with a few \code{pkgutil} |
| 62 |
commands by |
| 63 |
\begin{Code} |
| 64 |
> pkgadd -d https://get.opencsw.org/now |
| 65 |
> /opt/csw/bin/pkgutil -U |
| 66 |
> /opt/csw/bin/pkgutil -y -i gcc4core |
| 67 |
> /usr/sbin/pkgchk -L CSWgcc4core # list files |
| 68 |
\end{Code} |
| 69 |
Typically, the binary packages are installed under |
| 70 |
\code{/opt/csw/}. |
| 71 |
|
| 72 |
Make sure those GNU tools are also in the path and export it to |
| 73 |
the environment. For example, I have |
| 74 |
\begin{Code} |
| 75 |
PATH=/opt/csw/gnu:/opt/csw/bin:/opt/csw/i386-pc-solaris2.10/bin: |
| 76 |
/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ucb |
| 77 |
export PATH |
| 78 |
\end{Code} |
| 79 |
in a file name \code{set_path.sh}. Then, I set it to the environment by |
| 80 |
\begin{Code} |
| 81 |
> . ./set_path.sh |
| 82 |
\end{Code} |
| 83 |
I also have a symbolic link "make" to "gmake" to avoid configuration problems. |
| 84 |
If not, use \code{ln -s} to make one. |
| 85 |
|
| 86 |
Further, the \proglang{R} may not be easy to compile in Solaris 10, but the |
| 87 |
binary package of \proglang{R} is also available in OpenCSW. It can be |
| 88 |
installed by |
| 89 |
\begin{Code} |
| 90 |
> pkgadd -d https://get.opencsw.org/now |
| 91 |
> /opt/csw/bin/pkgutil -U |
| 92 |
> /opt/csw/bin/pkgutil -y -i r_base |
| 93 |
> /usr/sbin/pkgchk -L CSWr-base # list files |
| 94 |
\end{Code} |
| 95 |
which has currently \proglang{R} version 3.1.1. It may be a little bit old, |
| 96 |
but it is good enough for testing ZeroMQ and \pkg{pbdZMQ}. |
| 97 |
The developing/daily version of \proglang{R} may not be easily compiled |
| 98 |
by the OpenCSW. |
| 99 |
|
| 100 |
|
| 101 |
\subsection[Compile ZeroMQ]{Compile ZeroMQ} |
| 102 |
\label{sec:compile_zeromq} |
| 103 |
\addcontentsline{toc}{subsection}{\thesubsection. Compile ZeroMQ} |
| 104 |
The OpenCSW also has binary packages for ZeroMQ, named \pkg{libzmq1} and |
| 105 |
\pkg{libzmq1\_dev}. |
| 106 |
The package is a little bit out of date (version 2.2.0 built in 2012). |
| 107 |
This old version is not comparable with current \pkg{pbdZMQ}. |
| 108 |
The solution is to compile and install an external ZeroMQ 4.0.7 |
| 109 |
which available from \url{https://download.zeromq.org}. |
| 110 |
This version 4.0.7 is the latest stable ZeroMQ version. |
| 111 |
The newer versions of ZeroMQ, such as >= 4.1.0, may have more bugs |
| 112 |
for Solaris 10. |
| 113 |
|
| 114 |
I install the ZeroMQ library to \code{/work-my/local/zmq} with |
| 115 |
the following commands. |
| 116 |
\begin{Code} |
| 117 |
> gtar zxvf zeromq-4.0.7.tar.gz |
| 118 |
> cd zeromq-4.0.7 |
| 119 |
> ./configure --prefix=/work-my/local/zmq |
| 120 |
> make |
| 121 |
> make install |
| 122 |
\end{Code} |
| 123 |
There may have some warnings, but they are ok. The default installs |
| 124 |
the share library which can be linked by \pkg{pbdZMQ}. |
| 125 |
|
| 126 |
|
| 127 |
\subsection[Install pbdZMQ]{Install pbdZMQ} |
| 128 |
\label{sec:install_pbdzmq} |
| 129 |
\addcontentsline{toc}{subsection}{\thesubsection. Install pbdZMQ} |
| 130 |
With the OpenCSW and external ZeroMQ 4.0.7 installed, I can install |
| 131 |
\pkg{pbdZMQ} simply via |
| 132 |
\begin{Code} |
| 133 |
> R CMD INSTALL pbdZMQ_0.2-0.tar.gz \ |
| 134 |
--configure-vars="ZMQ_INCLUDE='-I/work-my/local/zmq/include' \ |
| 135 |
ZMQ_LDFLAGS='-L/work-my/local/zmq/lib -lzmq'" |
| 136 |
\end{Code} |
| 137 |
Then, the test can be done by |
| 138 |
\begin{Code} |
| 139 |
> Rscript -e "demo(hwserver,'pbdZMQ',ask=F,echo=F)" & |
| 140 |
> Rscript -e "demo(hwclient,'pbdZMQ',ask=F,echo=F)" |
| 141 |
\end{Code} |
| 142 |
when the \pkg{pbdZMQ} installation is done correctly. |
| 143 |
|