Debian Codegraph @

INSTALL

raw
1 ### Read pbdZMQ vignettes "pbdZMQ-guide.pdf" first at
2 ### "https://cran.r-project.org/package=pbdZMQ".
3 ###
4 ### pbdZMQ can be installed with/without external ZeroMQ 4.2.2 library
5 ### since pbdZMQ includes a minimum requirement of ZeroMQ 4.2.2 library.
6 ###
7 ### pbdZMQ is also tested mainly on Linux (XUbuntu-14.04.1), Windows 7, and
8 ### Mac OSX 10.7 systems.
9 ###
10 ### Solaris needs ZeroMQ 4.0.7 library with GNU Make 4.1 (OpenCSW).
11 ### See Section for Solaris in next for installation steps and read pbdZMQ
12
13 --- 'pbdZMQ' installation:
14 0. 'pkg-config' and system ZeroMQ library (libzmq, libzmq-dev) are requrired.
15
16 1. Default installation:
17
18 > R CMD INSTALL pbdZMQ_*.*-*.tar.gz
19
20 --- 'pbdZMQ' installation with internal ZeroMQ library:
21
22 1. Enable internal ZeroMQ:
23 This should work with most platforms.
24
25 > R CMD INSTALL pbdZMQ_0.*-*.tar.gz \
26 --configure-args="--enable-internal-zmq"
27
28 --- 'pbdZMQ' installation with external ZeroMQ library such as version 4.2.2:
29 0. Minimum steps for installing ZeroMQ 4.2.2 shared library
30
31 > ./configure \
32 --prefix=/usr/local/zmq \
33 --enable-static=no \
34 --enable-shared=yes \
35 --with-poller=select \
36 --without-documentation \
37 --without-libsodium
38 > make -j 4; make install
39
40 or ZeroMQ 4.2.2 static library
41
42 > ./configure \
43 --prefix=/usr/local/zmq \
44 --with-pic=yes \
45 --enable-static=yes \
46 --enable-shared=no \
47 --with-poller=select \
48 --without-documentation \
49 --without-libsodium
50 > make -j 4; make install
51
52 1. Steps for pbdZMQ with the external ZeroMQ shared library
53
54 > R CMD INSTALL pbdZMQ_*.*-*.tar.gz \
55 --configure-vars="ZMQ_INCLUDE='-I/usr/local/zmq/include' \
56 ZMQ_LDFLAGS='-L/usr/local/zmq/lib -lzmq'"
57
58 or with the external ZeroMQ static library
59
60 > R CMD INSTALL pbdZMQ_*.*-*.tar.gz \
61 --configure-vars="ZMQ_INCLUDE='-I/usr/local/zmq/include' \
62 ZMQ_LDFLAGS='/usr/local/zmq/lib/libzmq.a'"
63
64 provided the external library is installed at "/usr/local/zmq" where
65 "include/" subdirectory contains "zmq.h" and "lib/" subdirectory contains
66 the shared library such as "libzmq.so" or the static library such as
67 "libzmq.a".
68
69 --- Testing:
70 Suppose 'pbdZMQ' is installed correctly. I can run the next from one
71 terminal.
72
73 > Rscript -e "demo(hwserver,'pbdZMQ',ask=F,echo=F)" &
74 > Rscript -e "demo(hwclient,'pbdZMQ',ask=F,echo=F)"
75
76 --- Installation with different polling system:
77 By default 'select' method is used in 'pbdZMQ' for Linux, Windows, and
78 Mac OSX. However, users may want to use 'autodetect' or try others for
79 better polling. Currently, the options as given by ZeroMQ may be 'kqueue',
80 'epoll', 'devpoll', 'poll', or 'select' depending on libraries and system.
81
82 > R CMD INSTALL pbdZMQ_*.*-*.tar.gz \
83 --configure-vars="ZMQ_POLLER='autodetect'"
84
85
86 ### Section for Solaris
87 --- Install OpenCSW and 'ZeroMQ 4.0.7' library:
88 0. Make sure GNU tools are installed including gmake, gcc, g++, autoconf,
89 automake, gtar, etc. Usually, OpenCSW hase them at
90 "https://www.opencsw.org/get-it/packages/" and can be installed
91 by "pkgutil". For example, "gcc4core" can be installed by
92
93 > pkgadd -d https://get.opencsw.org/now
94 > /opt/csw/bin/pkgutil -U
95 > /opt/csw/bin/pkgutil -y -i gcc4core
96 > /usr/sbin/pkgchk -L CSWgcc4core # list files
97
98 1. Make sure gmake, gcc, g++, autoconf, automake are in the PATH and export
99 it to environment. For example, I have
100
101 PATH=/opt/csw/gnu:/opt/csw/bin:/opt/csw/i386-pc-solaris2.10/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ucb
102 export PATH
103
104 I also have a symbolic link "make" to "gmake" to avoid configuration
105 problems. If not, use "ln -s" to make one.
106
107 2. Download 'zeromq-4.0.7.tar.gz' from "https://download.zeromq.org".
108
109 3. Untar, configure, make, and make install as next:
110
111 > gtar zxvf zeromq-4.0.7.tar.gz
112 > cd zeromq-4.0.7
113 > ./configure --prefix=/work-my/local/zmq
114 > make
115 > make install
116
117 where I install the ZeroMQ library to "/work-my/local/zmq".
118
119 --- 'pbdZMQ' installation with external ZeroMQ library such as version 4.0.7:
120 1. Steps for pbdZMQ with the external ZeroMQ library.
121
122 > R CMD INSTALL pbdZMQ_*.*-*.tar.gz \
123 --configure-vars="ZMQ_INCLUDE='-I/work-my/local/zmq/include' \
124 ZMQ_LDFLAGS='-L/work-my/local/zmq/lib -lzmq'"
125
126 provided the external library is installed at "/work-my/local/zmq" where
127 "include/" subdirectory contains "zmq.h" and "lib/" subdirectory contains
128 the shared library such as "libzmq.so".
129
130 --- Testing:
131 Suppose 'pbdZMQ' is installed correctly. I can run the next from one
132 terminal.
133
134 > Rscript -e "demo(hwserver,'pbdZMQ',ask=F,echo=F)" &
135 > Rscript -e "demo(hwclient,'pbdZMQ',ask=F,echo=F)"
136