README.after_install
1This is the CDF V3.2 online software distribution directory for Unix
2systems. This directory contains the following files:
3
4Welcome.txt The welcome information for the current version.
5
6CDF_copyright.txt The copyright information from CDF.
7
8CHANGES.txt The software change log for the current CDF version.
9
10Makefile Make file for various Unix platforms. Type "make" for
11 installation instructions for the supported Unix platforms.
12 This makefile builds the CDF library and the command line
13 version of the CDF tools.
14
15 This makefile utilizes the following files:
16 - Help.all
17 - Help.install
18 - Help.test
19 - Note.1st
20 - Note.noCC
21 - Note.solaris
22 - Note.macosx
23 - Note.MacX
24
25README.after_install This is the file your are browsing.
26
27README.install CDF library installation instructions.
28
29README.install_java_APIs Instructions on how to build and use the Java
30 Native Interface (JNI) to CDF library.
31
32Release.notes CDF 3.2 release notes.
33
34cdfjava This directory contains the CDF Java APIs, the JNI code,
35 and example programs that demonstrate how to create
36 a CDF file and read data from it. It also contains the CDF
37 XML utilities.
38
39 NOTE: This directory will only exist if the CDF Java APIs
40 are installed.
41
42samples This directory contains sample CDF files and programs
43 written in C.
44
45src This directory contains the CDF source code and some test
46 programs that can be used to check whether the CDF
47 library is properly installed.
48
49
README.install
1 CDF Version 3.3.0, UNIX/POSIX Systems
2
3Common Data Format (CDF) is a conceptual data abstraction for storing
4multi-dimensional data sets. The basic component of CDF is a software
5programming interface that is a device independent view of the CDF data
6model. The application developer is insulated from the actual physical
7file format for reasons of conceptual simplicity, device independence,
8and future expandability. CDF files created on any given platform can be
9transported to any other platform on to which CDF is ported and used with
10any CDF tools or layered applications. A more detailed introduction to
11CDF can be found in the CDF User's Guide.
12
13!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14!! You must have a C compiler in order to build the CDF distribution. !!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
17The CDF library and toolkit programs are written in C. A C compiler is
18necessary to build the CDF distribution. The CDF distribution also contains
19several Fortran source files which support the Fortran interface. If a
20Fortran compiler is not available, the distribution can be built without
21Fortran support.
22
23The CDF distribution package now contains CDF Java APIs as well as Java
24version of the CDF tools (e.g., CDFEdit, CDFExport, SkeletonTable, SkeletonCDF,
25etc.). The Java APIs, built on top of the CDF library written in C, allow
26users to develop platform-independent CDF applications, and by default, they
27are not installed as part of standard installation. The APIs can be
28installed by following the installation instructions described in the
29README.install file located under the cdf33_*-dist/cdfjava directory (where
3033_* represents a release of 33_0, 33_1, 33_2, ... etc).
31
32Documentation for CDF consists of the CDF User's Guide, the CDF C Reference
33Manual, and the CDF Fortran Reference Manual. The `Release.notes' file
34explains how to get/print the documents.
35
36Requests for assistance or documentation should be sent to:
37
38 Internet -- cdfsupport@listserv.gsfc.nasa.gov
39
40If you get the distribution, please send CDFSUPPORT a message so we can put
41you on our mailing list. That way you will be notified of new releases.
42
43
44UNIX/POSIX Installation Instructions
45------------------------------------
46
47CDF V3.3 is distributed for UNIX and POSIX systems as a gzipped compressed
48'tar' file .
49
50To uncompress cdf33_*-dist-all.tar.gz, cdf33_*-dist-cdf.tar.gz,
51cdf33_*-dist-java.tar.gz, use the `gzip' command as follows...
52
53 gunzip <file name>
54
55The resulting file will be named cdf33_*-dist-all.tar, cdf33_*-dist-cdf.tar, or
56cdf33_*-dist-java.tar.
57
58Then use the `tar' command to extract the CDF source files. `tar' will create
59a directory named `cdf33_*-dist' containing several subdirectories. The source
60files for the distribution will be placed into these directories.
61
62The syntax for the `tar' command is different on some flavors of UNIX. For
63most UNIX systems (and the POSIX shell) use...
64
65 tar -xvf cdf33_*-dist-all.tar
66
67For the IBM-RS6000/AIX use...
68
69 tar -x -v -f cdf33_*-dist-all.tar
70
71
72CDF V3.3 has a makefile setup to automatically build the CDF library and
73tools. The following steps should be taken to build and install CDF V3.3.
74
75 1. Set your current directory (cd) to the top level CDF directory
76 (the directory named `cdf33_*-dist' created by `tar').
77
78 2. If desired, modify the include file named `cdfconfig.h' in the
79 `src/include' directory to the desired default parameters for
80 your distribution. These default parameters affect a number
81 of actions taken by the CDF library and toolkit programs in
82 various situations (the comments in `cdfconfig.h' describe these
83 default parameters).
84
85 3. Compile/link the distribution. First enter...
86
87 make all.help
88
89 to determine the required/optional `make' variables to be used.
90 Then enter...
91
92 make `make variables...' all
93
94 Some informational/warning messages from the compilers may be
95 displayed. These can be ignored and should have no effect on
96 the operation of the CDF library or toolkit programs.
97
98 Examples:
99 To build the distribution on a SunOS system using the
100 System V C compiler enter...
101
102 make OS=sunos ENV=sysV all
103
104 To build the distribution on Linux system using the GNU C
105 compiler enter...
106
107 make OS=linux ENV=gnu all
108
109 The `OS' and `ENV' variables are described in the `make all.help'
110 part of this step.
111
112 4. Test that the distribution was built correctly by entering...
113
114 make test
115
116 The name of each test executed will be displayed. No other
117 messages will be displayed unless an error occurs. Entering...
118
119 make test.help
120
121 will display additional information about the testing of the
122 CDF distribution.
123
124 5. Install the definitions files, libraries, include files, toolkit
125 programs, and help files. First enter...
126
127 make install.help
128
129 to determine the required/optional `make' variables to be used.
130 Then enter...
131
132 make `make variables...' install
133
134 The appropriate files will be copied to the `include', `lib',
135 `bin', and `lib/cdf/help' directories (from the `src/...'
136 directories).
137
138 Examples:
139 1) The following command will install the CDF distribution under
140 the current working directory (i.e CDF base directory).
141
142 make install
143
144 2) If you want to install the CDF distribution in the user-specified
145 directory called '/user/local/cdf33_*', enter ...
146
147 make INSTALLDIR=/usr/local/cdf33_* install
148
149 6. Delete the library(s), object files, and executables in the
150 `src/...' directories by entering...
151
152 make clean
153
154 This will free approximately 9.0 megabytes of disk space. You may
155 also delete the entire `src/...' directory tree if you have no need
156 for the source code.
157
158 7. If you have Fortran applications which include `CDF.INC' instead
159 of `cdf.inc', you may want to add a soft logical link in the
160 `include' directory which will point `CDF.INC' to `cdf.inc'. To
161 do so set your current directory to the `include' directory and
162 use the command `ln -s cdf.inc CDF.INC'. (Note that this logical
163 link existed automatically in previous CDF distributions after
164 the `make install' step was performed.)
165
166 8. (Optional) JAVA Support
167 Please read the file README.install_java_APIs in the top level of
168 CDF directory for instructions on how to build and install the Java
169 Native Interface (JNI) and Java-CDF APIs.
170
171
README.install_java_APIs
1 CDF Version 3.3, UNIX/POSIX Systems
2
3The CDF distribution package now contains the CDF Java APIs, in addition to
4the existing C and Fortran APIs, to allow users to develop platform-independent
5CDF applications. By default, the Java APIs are not installed as part of
6standard installation, and the APIs can be installed by following the
7installation instructions listed below.
8
9Documentation for the CDF Java APIs is available at
10 http://cdf.gsfc.nasa.gov/cdfjava_doc/index.html.
11
12
13***************************************************************************
14* Please make sure that you have done the following before proceeding *
15* with the CDF Java APIs installation: *
16* *
17* - installed the JDK 1.5 or later. *
18* - untarred the CDF distribution package *
19* - installed the CDF distribution package using the 'make' command *
20* from the cdf33_0-dist directory. Make sure that CDF is compiled *
21* with shared library support. *
22* - executed the definitions.C file located under the cdf33_0-dist/bin*
23* directory (e.g. `source definitions.C' for C shell). This file *
24* defines the environment variables (e.g. CDF_BASE, CDF_LIB, etc) *
25* that are used by the installation instructions described below. *
26***************************************************************************
27
28Installation instructions of the CDF Java APIs
29----------------------------------------------
301. Set your current directory (cd) to the top level CDF directory
31 (the directory named `cdf33_0-dist' created by `tar').
32
332. If you downloaded a tar file that contains both the CDF library and the
34 CDF Java APIs (i.e. cdf33_0-dist-all.tar), go to step 3.
35
36 Untar the CDF Java APIs, cdf33_0-dist-java.tar, as follows:
37 tar xvf cdf33_0-dist-java.tar
38
393. Set your current directory (cd) to the cdfjava/jni directory.
40
414. Compile the JNI code, cdfNativeLibrary.c. If gcc is used, specify the option
42 "-m32" or "-m64" to comiple it into 32/64-bit object. Or, use the default by
43 not specifying any option, which will compile the code into the same mode as
44 the iunderling system. Command to compile is as follows:
45
46 cc -c cdfNativeLibrary.c
47 -I${CDF_BASE}/include
48 -I<Java include directory for jni.h>
49 -I<Java include directory for jni_md.h>
50 -o cdfNativeLibrary.o
51
52 NOTE: During compilation, you may get the following warning message or
53 something similar on some platforms. Don't be alarmed about the
54 message and proceed to the next step.
55
56 "cdfNativeLibrary.c: In function `getJavaField':
57 cdfNativeLibrary.c:398: warning: assignment discards
58 qualifiers from pointer target type"
59
60 Examples:
61 The examples below assume that the appropriate environmental variables
62 have been properly defined. The CDF_BASE and CDF_LIB variables are
63 defined in the definitions.<shell> file located under the cdf33_0-dist/bin
64 directory. The JAVA_HOME environment variable refers to the name of
65 the root/base directory where the Java virtual machine is installed.
66
67 If you have Linux on a PC, the following command will compile the JNI
68 code:
69
70 gcc -I${CDF_BASE}/include -fPIC \
71 -I${JAVA_HOME}/include \
72 -I${JAVA_HOME}/include/linux \
73 -c cdfNativeLibrary.c
74
75 If you have Linux on a PPC, the following command will compile the JNI
76 code into 32-bit mode:
77
78 gcc -I${CDF_BASE}/include -fPIC \
79 -I${JAVA_HOME}/include \
80 -I${JAVA_HOME}/include/linux \
81 -c cdfNativeLibrary.c
82
83 For 64-bit mode, add "-m64" option.
84
85 For a Sun OS or Solaris sparc, the following command
86 will compile the JNI code into 32-bit mode (using Sun's compiler):
87
88 cc -DSOLARIS -DHAVE_CONFIG_H -Kpic \
89 -I${CDF_BASE}/include \
90 -I${JAVA_HOME}/include \
91 -I${JAVA_HOME}/include/solaris \
92 -c cdfNativeLibrary.c
93
94 For a Solaris sparc, the following command
95 will compile the JNI code into 64-bit mode (using Sun's compiler):
96
97 cc -DSOLARIS -DSOLARIS64 -DHAVE_CONFIG_H -xarch=v9a -Kpic \
98 -I${CDF_BASE}/include \
99 -I${JAVA_HOME}/include \
100 -I${JAVA_HOME}/include/solaris \
101 -c cdfNativeLibrary.c
102
103 For a Solaris sparc (8/9), the following command
104 will compile the JNI code into 64-bit mode (using Gnu's gcc compiler):
105
106 gcc -DSOLARIS -DSOLARIS64 -m64 -fpic \
107 -I${CDF_BASE}/include \
108 -I${JAVA_HOME}/include \
109 -I${JAVA_HOME}/include/solaris
110 -c cdfNativeLibrary.c
111
112 If you have OSF1 on a DEC Alpha, the following command will compile the
113 JNI code:
114
115 gcc -I${CDF_BASE}/include \
116 -I${JAVA_HOME}/include/java \
117 -I${JAVA_HOME}/include/java/alpha \
118 -c cdfNativeLibrary.c
119 (You may need to include "-pthread" option if you use DEC's C
120 compiler.)
121
122 If you are using the IBM JDK under Linux, the following command
123 will compile the JNI code:
124
125 cc -I${CDF_BASE}/include \
126 -I${JAVA_HOME}/include \
127 -I${JAVA_HOME}/include/linux \
128 -c cdfNativeLibrary.c
129
130 If you are using Mac OS X, the following command will compile the
131 JNI code as well as create a shared library. It covers both this
132 step and next step (go to step 6 after successful execution):
133
134 (Refer Apple's "Mac OS X GM Release Notes: Java" for more information.)
135
136 Power PC
137 --------
138 gcc -isysroot/Developer/SDKs/MacOSX10.4u.sdk -arch ppc
139 -D__MACH__ -D__APPLE__ -D_FILE_OFFSET_BITS=64
140 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
141 -bundle -I/System/Library/Frameworks/JavaVM.framework/Headers
142 -I../../src/include -I.
143 -framework JavaVM
144 -o ../lib/libcdfNativeLibrary.jnilib
145 ../../lib/libcdf.dylib cdfNativeLibrary.c
146
147 Intel Mac
148 ---------
149 gcc -isysroot/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -Di386
150 -D__MACH__ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
151 -D_LARGEFILE_SOURCE
152 -bundle -I/System/Library/Frameworks/JavaVM.framework/Headers
153 -I../../src/include -I.
154 -framework JavaVM
155 -o ../lib/libcdfNativeLibrary.jnilib
156 ../../lib/libcdf.dylib cdfNativeLibrary.c
157
158
159 NOTE: The include path is slightly different depending upon which
160 JDK version and operating system you use.
161
1625. Create a shared library for the JNI code just compiled as follows:
163
164 If you are using OSF1, Linux, Irix5|6, or AIX, use the following
165 command:
166
167 ld -shared cdfNativeLibrary.o \
168 -o ../lib/libcdfNativeLibrary.so -L${CDF_LIB} -lc -lm -lcdf
169
170 For 64-bit mode on Linux PPC, add "-melf64ppc" option.
171
172 If you are using a Solaris or Sun OS, use the following
173 command to make a 32-bit mode library:
174
175 ld -G cdfNativeLibrary.o \
176 -o ../lib/libcdfNativeLibrary.so -L${CDF_LIB} -lc -lm -lcdf
177
178 If you are using a Solaris sparc (8|9), use the following command for
179 Sun's linker to make a 64-bit mode library:
180
181 ld -G cdfNativeLibrary.o -64 -L/usr/lib/sparcv9 \
182 -o ../lib/libcdfNativeLibrary.so -L${CDF_LIB} -lc -lm -lcdf
183
184 Note: assume that 64-bit library is at /usr/lib/sparcv9.
185
186 If you are using a Solaris sparc (8|9), use the following command for
187 Gnu's gcc linker to make a 64-bit mode library:
188
189 gcc -G cdfNativeLibrary.o -m64 -L/usr/local/gcc-3.2/lib/sparcv9 \
190 -o ../lib/libcdfNativeLibrary.so -L${CDF_LIB} -lc -lm -lcdf
191
192 Note: assume that Gnu's 64-bit library is at /usr/local/gcc-3.2/lib/sparcv9.
193
194 If you are using HP-UX, use the following command:
195
196 ld -b cdfNativeLibrary.o \
197 -o ../lib/libcdfNativeLibrary.sl -L${CDF_LIB} -lc -lm -lcdf
198
1996. Set the CLASSPATH and LD_LIBRARY_PATH (DYLD_LIBRARY_PATH for Mac OS X)
200 environment variables.
201
202 1) CLASSPATH should point to the following file(s):
203 - the location (full path name) of the cdfjava.jar file that is included
204 in cdfjava.tar. It's located in the cdfjava/classes directory.
205
206 Example:
207 setenv CLASSPATH ${CLASSPATH}:.: \
208 /home/cdf/cdf33_0-dist/cdfjava/classes/cdfjava.jar
209
210 Optionally, if the Java-based CDF tools will be used, then also include
211 CDFToolsDriver.jar in the CLASSPATH. This jar file resides in the
212 cdfjava/cdftools directory.
213
214 2) LD_LIBRARY_PATH should point to the following files:
215 - the location (full path name) of the libcdfNativeLibrary.[so|sl|jnilib]
216 created in step 5 (it should be under cdfjava/lib)
217
218 - the location (full path name) of the CDF library (libcdf.[so|sl|jnilib]
219 that is defined by the environment variable CDF_LIB that is defined when
220 the CDF library is installed.
221
222 Example:
223 setenv LD_LIBRARY_PATH .:/home/cdf/cdf33_0-dist/cdfjava/lib:${CDF_LIB}
224
225 Or for Mac OS X,
226
227 setenv DYLD_LIBRARY_PATH .:/Users/cdf/cdf33_0-dist/cdfjava/lib:${CDF_LIB}
228
229