forked from usnistgov/rcslib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetrcs.html
176 lines (169 loc) · 9.55 KB
/
getrcs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<title>RCS Library Installation Instructions</title>
<link REL="stylesheet" href="../../mel2.css" TYPE="text/css">
<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#990066" alink="#FF3300" vlink="#660099">
<center>
<H1>Instructions for getting and making the <BR>Real-time Control Systems(RCS) Library.</H1>
</center>
<hr>
<!--RCS_VERSION= 2017.07.19 -->
<ol>
<li>Get the source at
<a href="http://www.isd.mel.nist.gov/projects/rcslib/rcslib-2017.07.19.tar.gz">
http://www.isd.mel.nist.gov/projects/rcslib/rcslib-2017.07.19.tar.gz</a>
</a>
</li>
<li>Extract files from rcslib-2017.07.19.tar.gz</li>
<ol>
<li>Uncompress the file by using
"<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.gnu.org/directory/gzip.html">gunzip</a> rcslib-2017.07.19.tar.gz
<li>Extract all of the files from the tar file by using "
<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.gnu.org/directory/tar.html">tar</a> -xf rcslib-2017.07.19.tar
<p>With newer versions of GNU tar one can uncompress and extract with one
command."tar -xzf rcslib-2017.07.19.tar"
</p></li>
</ol>
<li>Build the RCS library.
<ul>
<li>To build using the autoconf/automake generated build system:
<ul>
<li>
<pre>
<p>cd rcslib-2017.07.19
./configure
make
# The make check is optional, but gives a little more confidence that
# everything will work, or if there is an option/function to stay away from.
make check
make install
</pre>
</li>
<li>There are lots of features that can be enabled or disabled by
configure. Run "./configure ––help" for a list. For example to build the smallest possible library use "––disable-ALL" and then enable only the features you actually need. ( ./configure ––disable-ALL ––enable-shmem ) Setting the environment variables CC,CXX,CFLAGS,CXXFLAGS,CPPFLAGS or LDFLAGS can be useful too.
</li>
<li>The command "make install" may require root or administrator
access. If this is a problem set prefix=<i>directory</i> to a directory you have write access to.</li>
<li>If you want to build for multiple platforms and use the same
source directory, use the command etc/multiplatbuild.sh. Each time it is
run the library will be installed into a platform specific subdirectory of
.multiplatinstalls and symbolic links set up for lib include and bin in
the top level directory. This should also eliminate the need for root access.
</li>
</ul>
</li>
<li>To build with the older static Makefiles:
<ul>
<li>
<pre>
<p>
<p>cd rcslib-2017.07.19
make USE_OLD_RCSLIB_MAKEFILES=1
</pre>
</li>
<li>
<p>The "<a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.gnu.org/directory/make.html">make</a>" program needs to be GNU make. You can use the following command to check:</p>
<pre>
make -v
</pre>
<p>There are similar programs also called "make" from other sources that generally do not work. Sometimes GNU make is installed on your system under the name "gmake" or "gnumake".</p>
</li>
<li>
<p>If you do not specify a platform the script rcslib/etc/platname will be run
to guess the platform name. If it fails or guesses incorrectly you should either set the environment variable "PLAT" or set it on the make command line. To set the environment variable use either
"setenv PLAT <i>platname</i>" or
"PLAT=<i>platname</i>; export PLAT" depending on the
type of shell you have. To set the platform on the command line run:
"make PLAT=<i>platname</i>"
The string to use for <i>platname</i> should match the base of one of the .def
files in the rcslib/etc directory. For example setting PLAT=sunos5 would
use the definitions in rcslib/etc/sunos5.def.</p>
<p>If no .def file exists for your platform you should copy one of the other .def files and edit it with a text editor as necessary.</p>
</li>
</ul>
</li>
<li> For Windows:
<ul>
<li>Use MinGW:
<p> Download and install first MinGW and then MSYS from <a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://www.mingw.org">http://www.mingw.org</a>.Be sure to save the rcslib tar file under the "root" directory of MSYS ie "C:\msys\1.0\" or a sub-directory of this. Then, from within the MSYS tool either run:</p>
<pre>
tar -xzf rcslib-2017.07.19.tar
<p>
<p>cd rcslib-2017.07.19
./configure
make
make install
</pre>
<p> or use the older makefiles :</p>
<pre>
<p>
<p>cd rcslib-2017.07.19
export PLAT=mingw32
make PLAT=mingw32
</pre>
</li>
<li>If you must use VC++, there is a solutions file in
rcslib-2017.07.19/etc/win_vc_2010_express/rcs/rcs.sln.
</li>
</p>
</li>
</ul>
</li>
</ul></li>
<li>To build your own applications:
<p>If you built with the old static Makefile,
you need to add the following line to your compiler options
where <i>pathtorcslib</i> and <i>platname</i> will depend on your system:<br>
-I<i>pathtorcslib</i>/plat/<i>platname</i>/include</p>
<p>The following also needs to be added to the linker options:<br>
-L<i>pathtorcslib</i>/plat/<i>platname</i>/lib -lrcs</p>
<p>For configure/autoconf based builds the flags will be different since the paths are different but typically only the -lrcs flag is needed since configure
will install files in the default location expected by the compiler.</p>
<p>Also depending on your platform you may need to add some additional libraries to the linker options. The libraries themselves are expected to be provided with your operating system or compiler but still need to be explicitly requested in the linker options. For example windows needs "-lws2_32 -lwininet" while Solaris needs "-lrpcsvc -lsocket -lnsl -lintl -lm -lposix4 -ldl" If you get undefined symbols you can check the CLINK variable of the platforms .def file or your operating systems documentation on the functions that
were undefined to determine what libraries to add. configure will also print the LIBS it is using which are also generally needed for applications. Also, since RCS is a C++ library you generally will want to link with the C++ compiler rather than directly with ld or with the C compiler or you may end up missing the standard C++ libraries.</p>
</li>
<li>OPTIONAL: Build the java tools and jar files
<p>While the precompiled version of the java code can be run on multiple platforms and therefore somewhat reduce the need for recompiling. The precompiled code might not be the latest.</p>
<p>To build from source: Download and install a Developer's Kit for Java such as the SDK for Java 2 Standard Edition (J2SE) from <a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://java.sun.com/">http://java.sun.com/</a>.</p>
<p>With the java bin directory on your PATH run:</p>
<pre>
cd <i>pathtorcslib</i>/src/java
make PLAT=java
</pre>
Sometimes it is necessary to add JDK_DIR=<i>path_to_j2se_sdk</i> to the make command line if you have multiple java programs on your path. The compiled byte code will be placed in several jar files and subdirectories in <i>pathtorcslib</i>/plat/java/lib/.
</li>
</ol>
<p>For the diagnostics tool or code generator,
download <a href="diag_NB.jar">diag_NB.jar</a> or <a href="CodeGenCmdLine.jar">CodeGenCmdLine.jar</a>, and a Java Runtime tool such as from <a href="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://java.sun.com/">http://java.sun.com/</a> and run with the command "java -jar <i><jarfile></i>". (See
the instructions for each tool.) The diagnotics tool now requires JDK or JRE 1.6 as well as <a href="plotter_NB.jar">plotter_NB.jar</a>,<a href="rcs.jar">rcs.jar</a>, <a href="CodeGenCmdLine.jar">CodeGenCmdLine.jar</a>, and <a href="swing-layout-1.0.jar">swing-layout-1.0.jar</a>. </p>
<p>Alternatively run diag tool through Java WebStart with this link:</p>
<p><a href="http://www.isd.mel.nist.gov/projects/rcslib/diag.jnlp">http://www.isd.mel.nist.gov/projects/rcslib/diag.jnlp</a></p>
<p>or with all Java classes in one .Jar file here:</p>
<p><a href="http://www.isd.mel.nist.gov/projects/rcslib/rcsjava.jar">http://www.isd.mel.nist.gov/projects/rcslib/rcsjava.jar</a></p>
<HR>
<p>Last Modified: 2017.07.19 </p>
<ul>
<li><a href="index.html">See other RCS Library Documents.</a></li>
</ul>
<p>If you have questions or comments regarding this page, please
contact
<a href="http://www.isd.mel.nist.gov/personnel/shackleford/">Will Shackleford</a>
at <address><a href="mailto:[email protected]">[email protected]</a></address>
<HR SIZE=3>
<FONT SIZE=4><B>Commercial Product Disclaimer</B></FONT>
<BLOCKQUOTE>
<FONT SIZE=2><B>DISCLAIMER: </B>Certain commercial equipment, instruments, or materials are identified in this paper to specify the experimental procedure adequately. Such identification is not intended to imply recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that the materials or equipment identified are necessarily the best available for the purpose.</FONT>
</BLOCKQUOTE><p>
<HR SIZE=3>
<FONT SIZE=4><B>Software Disclaimer</B></FONT>
<BLOCKQUOTE>
<FONT SIZE=2><B>DISCLAIMER: </B>This software was produced by the National Institute of Standards and Technology (NIST), an agency of the U.S. government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibility associated with its operation, modification, maintenance, and subsequent redistribution.
<BR><I>See NIST Administration Manual 4.09.07 b and Appendix I</I></FONT>
</BLOCKQUOTE><p>
<HR>
</body>
</html>