-
Notifications
You must be signed in to change notification settings - Fork 19
/
INSTALL.html
2720 lines (2111 loc) · 77.2 KB
/
INSTALL.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<head>
<title>How to build NCL and NCAR Graphics version 6.3.0 from source code</title>
</head>
</head>
<h1>How to build NCL and NCAR Graphics version 6.3.0 from source code</h1>
<p>
<i>March 15, 2015</i><p>
<b>The latest version of this document can be found at
<a href="http://www.ncl.ucar.edu/Download/build_from_src.shtml">http://www.ncl.ucar.edu/Download/build_from_src.shtml</a>.</b>
<p>
This is an all-encompassing document on:
<ul>
<li>How to set up your environment to build NCL and NCAR Graphics from
source code.
<li>What external software packages you need, which are optional, and
how to build them.
<li>How to build and test NCL and NCAR Graphics.
</ul>
<p>
NCL and NCAR Graphics can only be built on UNIX systems.
<p>
<blockquote>
<b>We highly recommend that you use a precompiled NCL binary rather
than attempting a build from source code. If you tried a precompiled
binary and ran into problems, you can post your problem to
the <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install">ncl-install</a>
email list.</b>
</blockquote>
<p>
If you decide to go forth with building from source code, good luck!
<p>
<b>Note on building NCAR Graphics only:</b> you have the option during
the build process to indicate you do not want to build NCL,
effectively building just NCAR Graphics. This simplifies the build
somewhat, since you can get by with not having to install most, if
any, of the external software packages listed below. If you are
already familiar with building NCAR Graphics from source code, then
all the instructions you know from before are the same. When you run
"./Configure", be sure to answer "n" when it asks if you want to build
NCL.
<p>
Before you start building NCL/NCAR Graphics, look over this document
to see what functionality you want to include. This will help you
figure out what packages you'll need and what options they need to be
built with. Check if you already have any of these packages on your
system <i>and if they were built with the correct options</i>.
<p>
Some of the required softwre libraries may already be on your
system. On Linux and Mac systems, you can use a command called
"locate" to look for libraries.
<p>
<pre>
locate libcairo
</pre>
<p>
NCL/NCAR Graphics has been successfully built on 32 and 64 bit Linux
systems, Macs (32 or 64 bit) running MacOSX, and Windows running
Cygwin.
<p>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install">Email
ncl-install</a> if you have any problems understanding this document
or building any of this software. We've included
a <A HREF="#Troubleshooting">troubleshooting</A> section for common
problems encountered when building NCL and/or NCAR Graphics.
<p>
<i>Note that in the instructions below, "NCL" will sometimes be used
to mean both NCL and NCAR Graphics. If something is for NCAR Graphics
only, we try to indicate this.</i>
<hr>
<h2>Table of Contents</h2>
<p>
<UL>
<LI><A HREF="#WhatsNew">What's new in build instructions since last
NCL release</A>
<LI><A HREF="#Troubleshooting">Visit the Troubleshooting section in
advance</A>
<LI><A HREF="#SetupBuildEnvironment">Set up build environment for
NCL</A>
<UL>
<LI><A HREF="#CompilersNeeded">Compilers needed to build NCL</A>
<LI><A HREF="#SetEnvVars">Set environment variables</A>
<LI><A HREF="#X11Libs">Install X11 developer libraries and include files</A>
</UL>
<LI><A HREF="#BuildNonOptionalSoftware">Download and build
non-optional external software</A><br>
<UL>
<LI><A HREF="#JPEG">JPEG</A> (6b)
<LI><A HREF="#ZLIB">ZLIB</A> (1.2.8)
<LI><A HREF="#cairo">cairo</A> (1.12.18)
<UL>
<LI><A HREF="#PNG">PNG</A> (1.2.52)
<LI><A HREF="#pkgconfig">pkg-config</A> (0.28)
<LI><A HREF="#freetype">FreeType</A> (2.5.5)
<LI><A HREF="#pixman">pixman</A> (0.32.6)
</UL>
<LI><A HREF="#NetCDF">NetCDF</A> (4.3.3.1)
<UL>
<LI><A HREF="#szip">szip</A> (2.1)
<LI><A HREF="#HDF5">HDF-5</A> (1.8.14)
<LI><A HREF="#libcurl">libcurl</a> (7.40.0)
</UL>
<LI><A HREF="#HDF4">HDF-4</A> (4.2.11)
</UL>
<LI><A HREF="#BuildOptionalSoftware">Download and build optional
external software</A><br>
<UL>
<LI><A HREF="#GRIB2">GRIB2</A>
<UL>
<LI><A HREF="#Jasper">Jasper</a> (1.900.1)
<LI><A HREF="#PNG">PNG</a> (1.2.52)
<LI><A HREF="#g2clib">g2clib</a> (1.5.0-patch)
</UL>
<LI><A HREF="#GDAL_PROJ4">GDAL/PROJ.4</A>
<UL>
<LI><A HREF="#PROJ4">PROJ.4</A> (4.8.0)
<LI><A HREF="#GDAL">GDAL</A> (1.11.2)
</UL>
<LI><A HREF="#HDFEOS2">HDF-EOS 2</A> (2.19)
<LI><A HREF="#HDFEOS5">HDF-EOS 5</A> (1.15)
<UL>
<LI><A HREF="#szip">szip</A> (2.1)
<LI><A HREF="#HDF5">HDF-5</A> (1.8.14)
</UL>
<LI><A HREF="#Triangle">Triangle</A>
<LI><A HREF="#UDUNITS2">UDUNITS-2</A> (2.2.18)
<LI><A HREF="#Vis5D">Vis5D+</A>
</UL>
<LI><A HREF="#GetNCLSourceCode">Download the source code for NCL</A>
<LI><A HREF="#CustomizeNCLBuildEnvironment">Customize NCL build
environment</A>
<UL>
<LI><A HREF="#TestIfSystemRecognized">Test if your system is
recognized by NCL build environment</A>
<LI><A HREF="#GetConfigFileName">Get name of configuration file</A>
<LI><A HREF="#ModifySystemConfigFile">Modify system configuration file
to change default values</A> (may not be necessary)
</UL>
<LI><A HREF="#BuildNCLFromSource">Build NCL from source code</A>
<UL>
<LI><A HREF="#RunConfigure">Run Configure script</A>
<UL>
<LI><A HREF="#Linux">Special note for Linux systems</A>
<LI><A HREF="#MacOSX">Special note for MacOSX systems</A>
<LI><A HREF="#Cygwin">Special note for Cygwin systems</A>
</UL>
<LI><A HREF="#StartBuildAndInstall">Start the build and install process</A>
<LI><A HREF="#CheckTheInstallation">Check that the installation was
successful</A>
</UL>
<LI><A HREF="#SetUpEnvironment">Set up your environment to run NCL
and/or NCAR Graphics</A>
<LI><A HREF="#TestInstallation">Test the NCL and/or NCAR Graphics
installation</A>
<LI><A HREF="#Troubleshooting">Troubleshooting and known problems</A>
<LI><A HREF="#AppendixA">Appendix A - Modifying configuration files to
recognize your system</A>
<UL>
<LI><A HREF="#ModifyYmakeFile">Modify the "ymake" file to recognize
your system</A>
<LI><A HREF="#SetUpConfigFile">Set up a configuration file</A>
<LI><A HREF="#ExampleConfigFile">Example configuration file</A>
<LI><A HREF="#ModifyMachineDependentRoutines">Modify machine-dependent
routines</A>
</UL>
<LI><A HREF="#AppendixB">Appendix B - General information on build process</A>
<UL>
<LI><A HREF="#ConfigurationFiles">Configuration files</A>
<LI><A HREF="#RestartingInstallation">Restarting the installation</A>
<LI><A HREF="#ymake">ymake</A>
<LI><A HREF="#MachineDependentRoutines">machine-dependent support
routines</A>
</UL>
</UL>
</UL>
<A NAME="WhatsNew"></A>
<HR>
<H2>What's new in build instructions since last NCL release</H2>
<p>
The instructions for building haven't changed much since version
5.2.1. Here's what's new about the source code instructions since
version 6.0.0 of NCL:
<p>
<ol>
<li>The graphical display model has been upgraded, and hence
building <a href="#cairo">cairo</a> and some supplemental
software is no longer optional.
<p>
<li>The
new <a href="http://www.ncl.ucar.edu/Applications/ESMF.shtml">ESMF
regridding software</a> in NCL uses an application called
"<a href="http://www.earthsystemmodeling.org/esmf_releases/public/ESMF_3_1_0rp3/ESMF_usrdoc/node7.html">ESMF_RegridWeightGen</a>",
which is part of
the <a href="http://www.earthsystemmodeling.org/">Earth System
Modeling Framework</a>. A serial version of this application is
included when you download a precompiled NCL binary. If you want to
build a parallelized version of this application, then see the
<a href="http://www.earthsystemmodeling.org/esmf_releases/public/last/ESMF_usrdoc/">Quick
Start</a> section of the ESMF User Guide.
<p>
<li>Some external software packages have newer versions. For example,
<a href="http://www.unidata.ucar.edu/software/netcdf/">NetCDF</a> is
at <a href="http://www.unidata.ucar.edu/downloads/netcdf/index.jsp">version
4.3</a> and has split up its software into three separate packages (C,
Fortran, and C++ interfaces).
<p>
<li>There are experimental calls to OpenMP code in NCL V6.2.0 and
higher; by default the code is compiled with "-fopenmp", but you can
remove this option from the appropriate configuration file.
</ol>
<p>
<A NAME="SetupBuildEnvironment"></A>
<HR>
<H2>Set up build environment for NCL</H2>
<p>
<A NAME="CompilersNeeded"></A>
<b>Compilers needed to build NCL</b><p>
To build NCL, you need a Fortran compiler that can compile both
Fortran 77 and 90 and an ANSI C compiler. If your system has native
Fortran and C compilers (for example "xlf" on IBM/AIX systems), we
recommend using these. To build the ESMF software (only required if
you want a parallel version of ESMF_RegridWeightGen), you additionally
need a C++ compiler. In addition to native compilers, NCL has been
successfully built with a wide-range of compilers
including <a href="http://gcc.gnu.org/">gcc</a>, <a href="http://gcc.gnu.org/wiki/GFortran">gfortran</a>, <a href="http://g95.org/">g95</a>, <a href="http://software.intel.com/en-us/articles/intel-compilers/">Intel
Fortran/C</a>, and <a href="http://www.pgroup.com/">Portland
Group</a>. <i>You cannot use g77 as a Fortran compiler</i>.
<p>
<A NAME="SetEnvVars"></A>
<b>Set up environment variables for external software</b><p>
Most of the external software packages that NCL and NCAR Graphics
depend on are configured using a "configure" script. These "configure"
scripts recognize a number of standard environment variables that
allow you to set compilers and compile options.
<p>
Decide what compilers and compile options you want to use, and then
set the following environment variables as appropriate:
<p>
<TABLE BORDER=1 CELLPADDING=3>
<TR>
<TH bgcolor=beige>Environment variable name <TH bgcolor=beige>Description
<TH bgcolor=beige>Example
<TR>
<TD><b>CC</b> <TD>C compiler
<TD>bash/ksh:<br>
export CC=gcc<br>
csh/tcsh:<br>
setenv CC gcc
<TR>
<TD><b>CFLAGS</b> <TD>C compile flags
<TD>bash/ksh:<br>
export CFLAGS='-O -ansi -fopenmp -fPIC'<br>
export CFLAGS='-O -m64 -ansi -fopenmp -fPIC'<br>
csh/tcsh:<br>
setenv CFLAGS '-O -ansi -fopenmp -fPIC'<br>
setenv CFLAGS '-O -m64 -ansi -fopenmp -fPIC'
<TR>
<TD><b>FC</b></b> <TD>Fortran compiler
<TD>bash/ksh:<br>
export FC=gfortran<br>
csh/tcsh:<br>
setenv FC gfortran
<TR>
<TD><b>FFLAGS</b> <TD>Fortran compile flags
<TD>bash/ksh:<br>
export FFLAGS='-fPIC -fopenmp'<br>
csh/tcsh:<br>
setenv FFLAGS '-fPIC -fopenmp'
<TR>
<TD><b>F90</b> <TD>Fortran 90 compiler
<TD>bash/ksh:<br>
export FC=gfortran<br>
csh/tcsh:<br>
setenv FC gfortran
<TR>
<TD><b>F90FLAGS</b> <TD>Fortran 90 compile flags
<TD>bash/ksh:<br>
export F90FLAGS='-fPIC -fopenmp'<br>
export F90FLAGS='-m64 -fPIC -fopenmp'<br>
csh/tcsh:<br>
setenv F90FLAGS '-fPIC -fopenmp'<br>
setenv F90FLAGS '-m64 -fPIC -fopenmp'
<TR>
<TD><b>CXX</b> <TD>C++ compiler
<TD>bash/ksh:<br>
export CXX=g++<br>
csh/tcsh:<br>
setenv CXX g++
<TR>
<TD><b>CXXFLAGS</b> <TD>C++ compile flags
<TD>bash/ksh:<br>
export CXXFLAGS='-O -ansi -fopenmp -fPIC'<br>
export CXXFLAGS='-O -m64 -ansi -fopenmp -fPIC'<br>
csh/tcsh:<br>
setenv CXXFLAGS '-O -ansi -fopenmp -fPIC'<br>
setenv CXXFLAGS '-O -m64 -ansi -fopenmp -fPIC'
<TR>
<TD><b>CPPFLAGS</b> <TD>preprocessor compile flags<br>
<TD>bash/ksh:<br>
export CPPFLAGS='-DNDEBUG'<br>
csh/tcsh:<br>
setenv CXXFLAGS '-DNDEBUG'
</TABLE>
<p>
<A NAME="X11Libs"></A>
<HR>
<b>Install X11 developer libraries and include files</b><p>
In order to build some of the X applications that are part of NCL
(like <a href="http://www.ncl.ucar.edu/Document/Tools/idt.shtml">idt</a>),
you must have some of the X11 developer's libraries installed on your
system. At a minimum, you should have the following libraries (and
associated include files) installed on your system: X11, Xaw, Xext,
Xm, Xmu, Xt.
<p>
These libraries are usually installed as part of an X developer's
package, and will reside in a directory like /usr/lib, /usr/lib64,
/usr/X11R6/lib, or /usr/X11R6/lib64.<P>
For Linux systems, you can get these libraries using a command like
one of the following:
<pre>
sudo apt-get install x11-dev
sudo apt-get install xorg-dev
sudo apt-get install libx11-dev
yum install libx11-devel
</pre>
<p>
<A NAME="BuildNonOptionalSoftware"></A>
<HR>
<H2>Download and build non-optional external software</H2>
<p>
The software listed below is not optional if you plan to build NCL.
If you are building NCAR Graphics only, then read the blurb next to
each software package name to see if it is needed.
<p>
<blockquote>
<i>Once you download and install any external software to use with
NCL, you must comply with the license of that software, regardless of
what NCL's license is.</i>
</blockquote>
<p>
<b>Note:</b> it makes things easier if you install all of the external
software needed (with the exception of the X11 libraries and X11
include files) to the same parent directory. This will be important
later when you have to tell the NCL build system where all the
external software has been installed.
<p>
We will use <i>/usr/local</i> in all of our examples below for
installing external software. You may need to be "root" in order to
have permission to install software to /usr/local. If you don't have
the "root" password, then you may want to use a directory other than
/usr/local, like a directory under your home directory.
<p>
You may not need to install all of this software from source code! If
you are on a Linux system, you might be able to use "yum" or "apt-get"
to download the desired software. On Macs, you might be able to
use <a href="http://www.macports.org/">MacPorts</a>. Under Cygwin, the
"setup.exe" program can be used.
<p>
Each package is listed below, along with the version we used to build
NCL V6.3.0 on our own systems. In most cases you don't need to have
the exact version of the software we used, but it's a good idea to
match them as much as possible. We've included the "wget" command we
used for the retrieving the source code, where applicable.
<ul>
<A NAME="JPEG"></A>
<li><a href="http://www.ijg.org/">JPEG</a> (6b) - not
needed if you are only doing an NCAR Graphics build.<p>
Download version 6b (jpeg-7 supposedly has some problems and we
haven't tried jpeg-8b or later).
<p>
<pre>
wget http://www.ijg.org/files/jpegsr6b.zip
</pre>
<p>
Once you have the jpeg source code, you can build and install it
with:
<p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
If you downloaded version 6b, you will additionally need to do this:
<p>
<pre>
make install-lib
make install-headers
</pre>
<p>
<A NAME="ZLIB"></A>
<li><a href="http://www.zlib.net/">zlib</a> (1.2.8) - not optional,
but mostly likely already available on your system
<p>
Download version 1.2.6 or later.
<p>
<pre>
wget http://zlib.net/zlib-1.2.8.tar.gz
</pre>
<p>
Once you have the zlib source code, you can build and install it
with:
<p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
<p>
<A NAME="cairo"></A>
<b>cairo software</b>
<p>
As of NCL V6.1.0, cairo is no longer an optional package. Cairo and
its supplemental packages are required for the new graphics display
model introduced in NCL and NCAR Graphics V6.1.0.
<p>
Cairo and its supplemental packages may already be on your system
(Linux, MacOSX, and Cygwin), so check this before you start building
them.<p>
You can also install many of these packages on Linux systems using a
package installer like <a href="http://yum.baseurl.org/">yum</a>
<a href="http://linux.die.net/man/8/apt-get">apt-get</a>, or
<a href="http://en.opensuse.org/YaST_Software_Management">YaST</a>,
and on a Mac system using <a href="http://www.macports.org/">MacPorts</a>.
The package(s) to install have names like "libcairo-devel",
"libpixman-devel", etc. It is very likely that once you install
"libcairo-devel", the other packages will get installed automatically,
so check for this before you install all the packages.
<p>
<ul>
<A NAME="PNG"></A>
<a href="http://www.libpng.org/pub/png/libpng.html">PNG</a> library
(1.2.52) - required
<p>
Download version 1.2.x (not 1.4.x or 1.5.x).
<p>
<pre>
wget http://sourceforge.net/projects/libpng/files/libpng12/1.2.52/libpng-1.2.52.tar.gz/download
</pre>
<p>
Once you have the libpng source code, you can build and install it
with:
<p>
<pre>
./configure --with-pic --prefix=/usr/local
make all install
</pre>
<p>
<a name="pkgconfig"></a>
<li><a href="http://pkgconfig.freedesktop.org/releases/">pkg-config</a>
(0.28) - Download version 0.25 or later.
<p>
<pre>
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
</pre>
<p>
Once you have the pkg-config source code, you can build and install it
with:
<p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
<p>
Make sure that the location of pkg-config is on your search path and
library path. For example, if you installed pkg-config to
"/usr/local", then you also need to do the following:
<p>
From tcsh or csh:
<p>
<pre>
setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig
setenv LD_LIBRARY_PATH /usr/local/cairo/lib
set path=(/usr/local/bin $path)
</pre>
<p>
From ksh or bash:
<p>
<pre>
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/cairo/lib
export PATH=/usr/local/bin:$PATH
</pre>
<p>
[On a Mac, use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.]
<p>
<a name="freetype"></a>
<li><a href="http://freetype.sourceforge.net/index2.html">FreeType</a>
(2.5.5) - Download version 2.5 or later.
<p>
<pre>
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.gz
</pre>
<p>
Once you have the FreeType source code, you can build and install it
with:
<p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
<p>
<a name="pixman"></a>
<li><a href="http://cairographics.org/releases/">pixman</a>
(0.32.6) - Download version 0.2x.x or later.
<p>
<pre>
wget http://cairographics.org/releases/pixman-0.32.6.tar.gz
</pre>
<p>
Once you have the pixman source code, you can build and install it
with:
<p>
Macs:<p>
<pre>
./configure --prefix=/usr/local --disable-openmp --disable-arm-iwmmxt \
--disable-dependency-tracking
make all install
</pre>
<p>
Linux, Cygwin, others:<p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
<p>
<li><a href="http://cairographics.org/releases/">cairo</a> (1.12.18) -
Download version 1.12.18 or later. Older versions have known bugs.
<p>
<pre>
wget http://cairographics.org/releases/cairo-1.12.18.tar.xz
</pre>
<p>
You can't build cairo until you have installed FreeType, pixman, and
pkg-config.
<p>
Make sure the "pkg-config" you built is on your search path.
For example, if you installed it to /usr/local, then /usr/local/bin
needs to be in your search path.
<p>
From tcsh or csh:
<p>
<pre>
setenv PATH /usr/local/bin:$PATH
which pkg-config
</pre>
<p>
From ksh or bash:
<p>
<pre>
export PATH=/usr/local/bin:$PATH
which pkg-config
</pre>
Once you have the cairo source code, you can build and install it
with:
<p>
Linux, Cygwin, others:<p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
<p>
Macs:<p>
<pre>
./configure --prefix=/usr/local --enable-quartz-font=no --enable-quartz=no \
--enable-shared=no --enable-static=yes
make all install
</pre>
<p>
</ul>
<p>
<A NAME="NetCDF"></A>
<li><a
href="http://www.unidata.ucar.edu/software/netcdf/">NetCDF</a> - do
not install if you are only doing an NCAR Graphics build.
<p>
Download
version <a href="http://www.unidata.ucar.edu/downloads/netcdf/index.jsp">4.3.3.1</a>.
<p>
Note that <glossary term="netCDFclassic">NetCDF classic</glossary>
(sometimes referred to as NetCDF-3)
and <glossary term="netCDF4">NetCDF-4</glossary> are different <b>file
formats</b> and have nothing to do with the version of the NetCDF
software. NetCDF software version 4.<i>x</i> supports both NetCDF-3
and NetCDF-4 file formats, but as noted below, you may have to set
some flags in order to get support for both. NetCDF-4 files are
actually written as HDF5 under the hood.<p>
<glossary term="netCDF4classic">Classic NetCDF-4</glossary> is another
supported format, which looks like NetCDF-3 files to the user, but
they allow for compression for potentially smaller files. Classic
NetCDF-4 files cannot be read by programs that only support NetCDF-3.
<p>
NetCDF versions 4.1.1 and later support OPenDAP, and this is built in
by default. Unidata recommends you use V4.3.3.1 or later. NetCDF 4.1.x also
includes the UDUNITS-2 software, but the stand-alone UDUNITS-2 library
is more up-to-date so we recommend this over the one that comes with
NetCDF. See <a href="#UDUNITS2">instructions on building and
installing UDUNITS-2</a>.
<p>
This software can be built different ways: with or without "classic"
NetCDF-4 support, and with or without OPeNDAP support. Classic
NetCDF-4 support gives you file compression capabilities. Full
NetCDF-4 support gives you groups, unlimited dimensions, file compression,
and compound structures. OPeNDAP support allows you to read NetCDF
files served on the web by OPeNDAP servers. We recommend building with
both NetCDF-4 and OPeNDAP support.
<p>
Decide which version you want to build and follow one of the four set
of instructions:
<p>
<b>1. Without "classic" NetCDF-4 support, without OPeNDAP support</b><p>
<pre>
./configure --disable-dap --prefix=/usr/local
make all install
</pre>
<p>
<b>2. Without "classic" NetCDF-4 support, with OPeNDAP support</b><p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
<p>
<b>3. With "classic" NetCDF-4 support, with OPeNDAP support</b><p>
You first need to download and install the following packages.
Unidata has provided all of these software packages in
<a href="ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/">one
convenient location</a>, or you can download them at their individual
locations using the links given below.
<p>
<ul>
<LI>zlib - see <a href ="#ZLIB">instructions</a> above.
<p>
<A NAME="szip"></A>
<li><a
href="http://www.hdfgroup.org/HDF5/release/obtain5.html">szip</a> -
Download version 2.1 or later. (Click on "External Libraries Used By HDF5".)
<p>
The szip 2.<i>x</i> software is available from same page where you
download HDF-5. Use this version, rather than the one on the official
szip page.
<p>
<pre>
./configure --prefix=/usr/local
make all install >& make-output
</pre>
<p>
<A NAME="HDF5"></A>
<li><a
href="http://www.hdfgroup.org/HDF5/release/obtain5.html">HDF-5</a>
(1.8.12) - Download version 1.8.12 or later.
<p>
<pre>
wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.12.tar.gz
</pre>
<p>
<pre>
./configure --with-zlib=/usr/local --with-szlib=/usr/local --prefix=/usr/local
make all install >& make-output
</pre>
<p>
<A NAME="libcurl"></A>
<li><a href="http://curl.haxx.se">libcurl</a> (7.40.0)
<p>
<pre>
wget http://curl.haxx.se/download/curl-7.40.0.tar.gz
</pre>
<p>
Download version 7.35.x or later. Once you have the source code, you
can build and install it with:
<p>
<pre>
./configure --prefix=/usr/local --with-zlib=/usr/local --with-pic
make all install >& make-output
</pre>
<p>
</ul>
Then, build NetCDF as follows and be sure to include the
"--enable-netcdf-4" option:
<p>
<pre>
./configure --with-hdf5=/usr/local --with-zlib=/usr/local --with-szlib=/usr/local \
--prefix=/usr/local --enable-netcdf-4
make all install >& make-output
</pre>
<p>
Note that OPeNDAP support will be built in by default. This means
that you may need the "curl" library later when building NCL. This
library may already be on your system.
<p>
<b>4. With "classic" NetCDF-4 support, without OPeNDAP support</b><p>
Follow the instructions above, but you don't need "libcurl",
and include "--disable-dap" on the above configure line for NetCDF.
<p>
<b>Troubleshooting for either NetCDF build</b>:
<p>
Note: if during the "make all install" phase of building the NetCDF
software you see an error message like:
<p>
<pre>
"cfortran.h", line 138.3: 1506-205 (S) #error cfortran.h: Can't find your environment among:
- MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...)
. . .
make[3]: *** [fort-attio.lo] Error 1
</pre>
then you need to "help" the NetCDF build recognize your system by
adding the appropriate "-D" macro definition to your CPPFLAGS line. The
error message above suggests some of them for you, or you can go to
the "<a
href="http://www.unidata.ucar.edu/software/netcdf/docs/other-builds.html">Other
Builds of the NetCDF Package</a>" page for some tips.
<p>
<A NAME="HDF4"></A>
<li><a href="http://www.hdfgroup.org/products/hdf4/">HDF-4</a> -
(4.2.10) if you want to build NCAR Graphics only, then HDF-4 is optional,
unless you need HDF support in <a
href="http://www.ncl.ucar.edu/Document/Tools/ctrans.shtml">ctrans</a>,
<a
href="http://www.ncl.ucar.edu/Document/Tools/ictrans.shtml">ictrans</a>,
and <a
href="http://www.ncl.ucar.edu/Document/Tools/idt.shtml">idt</a>.
<p>
Download version 4.2.x or later. (HDF version 5.<i>x.y</i> is a
different software package).
<p>
<pre>
wget http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.10.tar.gz
</pre>
<p>
<b>Note:</b> As of NCL V6.2.0, you no longer need to install the HDF
include files to a special directory (in older versions you
had to use a special "--includedir" option).
<p>
Build and install HDF-4 with:
<p>
<pre>
./configure --prefix=/usr/local --with-zlib=/usr/local \
--with-jpeg=/usr/local --disable-netcdf
make all install
</pre>
Note: if you are having problems with "make", one user reported that
he used "gmake" instead.
<p>
The paths used for the "--with-zlib" and "--with-jpeg" options must be
set to whatever you used above for these two software packages. If
you choose to build HDF-4 with the szip compression library, be sure
to add "--with-szip=/usr/local" (or whatever location you used when
building it) to the configuration process.
<p>
</ul>
<p>
<A NAME="BuildOptionalSoftware"></A>
<HR>
<H2>Download and build optional external software, if needed</H2>
<p>
Again, as with the above section, it makes things easier if you
install all of the external software needed to the same parent
directory. We will use <i>/usr/local</i> in all of our examples below
for installing external software.
<p>
<A NAME="GRIB2"></A>
<b>GRIB2 software</b> - not needed if you are only doing an NCAR
Graphics build.<p>
If you need support for reading <a
href="http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc.shtml">GRIB2</a>
files, then you will need to download and install the following
packages.
<p>
<ul>
<a name="Jasper"></a> <li><a
href="http://www.ece.uvic.ca/~mdadams/jasper/">Jasper</a>
(1.900.1) - Download version 1.900 or later.
<p>
Once you have the Jasper source code, you can build and install it
with:
<p>
<pre>
./configure --prefix=/usr/local
make all install
</pre>
<p>
<li>libpng - see <a href ="#PNG">instructions</a> above.
<p>
<a name="g2clib"></a>