1CERNLIB(1) General Commands Manual CERNLIB(1)
2
3
4
6 cernlib - print CERN library dependencies
7
9 cernlib [options] libraries
10
12 cernlib is a tool to list the compiler and linker options necessary to
13 compile a Cernlib program that has the given library dependencies. It
14 is generally used within a command substitution, as in the following
15 example:
16
17 g77 -o myprogram myprogram.F `cernlib -G Motif pawlib`
18
19 This version of cernlib has been completely rewritten from the original
20 script provided by CERN. It now does recursive library dependency
21 checking and removes duplicate entries.
22
23 Note that by default, the cernlib script assumes that the CERN
24 libraries are to be linked against statically; if the environment vari‐
25 ables $CERN or $CERN_ROOT are specified, it looks for the libraries
26 only in the "lib" subdirectory of those locations, not any "shlib" sub‐
27 directory. Furthermore, the script brackets the CERN libraries with
28 linker instructions to link statically. This is done to preserve the
29 original upstream behavior, in which all Cernlib libraries exist only
30 in static form. For instance, "cernlib packlib" outputs:
31
32 -Wl,-static -lpacklib -lkernlib -Wl,-dy -lm -lnsl -lcrypt -ldl -lg2c
33
34 If you want to link against ALL libraries (including Cernlib) either
35 statically or dynamically, call the cernlib script with its -safe flag
36 to omit these bracketing linker flags. That is: if you want to link
37 against all libraries (not just Cernlib) statically, use the -static
38 compiler flag and call cernlib with its -safe flag:
39
40 g77 -o myprogram myprogram.F -static `cernlib -safe -G Motif pawlib`
41
42 and if you want to link against all libraries (including the CERN
43 libraries) dynamically, use the same command without the -static com‐
44 piler flag (the linker assumes dynamic linking by default):
45
46 g77 -o myprogram myprogram.F `cernlib -safe -G Motif pawlib`
47
49 -a arch
50 Specify a system architecture, e.g. Linux (default), AIX, HP-UX,
51 etc.
52
53 -dy Equivalent to -safe; for backwards compatibility.
54
55 -G driver
56 Specify a graphics driver. The available options on Linux are
57 X11 and Motif (the latter option will also work when the Lesstif
58 library is present).
59
60 -P, -s Ignored; for backwards compatibility.
61
62 -safe Do not make any assumptions about whether the CERN libraries
63 should be linked against dynamically or statically. (The
64 default behavior, if this flag is not used, is to link them
65 statically.)
66
67 -u Do not include architecture-specific libraries in the output.
68
69 -v version
70 Specify version of $CERN_LEVEL. This is meaningless unless you
71 have installed an upstream version of Cernlib (i.e. not packaged
72 by Debian); see the file /usr/share/doc/cern‐
73 lib-base/README.Debian.
74
75 -?, --help
76 Show a summary of options.
77
78 -- Tell cernlib that this marks the end of cernlib-specific flags,
79 and all following arguments are to be parsed as described in the
80 LIBRARIES section below. If -- is not given, the first word
81 parsed as a library name will be the first word not starting
82 with a hyphen "-" that is not an argument to a preceding cernlib
83 flag.
84
86 The following library names are recognized by this version of the cern‐
87 lib script. These names may be used exactly as shown here, or prefixed
88 by "-l".
89
90 Core CERN libraries
91 mathlib, packlib, kernlib
92
93 Graphics and PAW libraries
94 graflib, pawlib
95
96 Monte Carlo and GEANT libraries
97 cojets, eurodec, geant321, herwig59, isajet758, pdflib804, pho‐
98 tos202, phtools
99
100 Additional Monte Carlo libraries
101 (to obtain these, see /usr/share/doc/montecarlo-
102 base/README.Debian)
103 ariadne, ariadne-p5, fritiof, jetset, lepto, pythia5, pythia6
104
105 Aliases
106 The numerals at the end may be left off most of the library
107 names above.
108
109 Other library names
110 Various other names are recognized for backwards compatibility,
111 internal use, and non-Linux architectures. For the complete
112 list, please see the cernlib script.
113
114 Other Any names not recognized by cernlib that start with "-l" or with
115 any character other than a hyphen ("-") are output as
116 -l${name#-l} (i.e., are assumed to be a library). Names start‐
117 ing with a hyphen for which the second character is not "l" are
118 assumed to be compiler flags, and are output at the beginning of
119 the line before all other output.
120
122 /usr/share/doc/cernlib-base/README.Debian describes some of the changes
123 that have been made to the CERN libraries in order to comply with
124 Debian policy and the Filesystem Hierarchy Standard.
125
126 Cernlib documentation for all related libraries and programs is avail‐
127 able at the following URL: http://cern.ch/cernlib/
128
130 This manual page and the version of the cernlib script that it
131 describes were written by Kevin McCarty <kmccarty@debian.org> for the
132 Debian GNU/Linux system (but may be used by others). They are licensed
133 under the GNU General Public License, version 2 or later (at your
134 choice).
135
137 Copyright (C) Kevin B. McCarty, 2002, 2003, 2004, 2005, 2006.
138
139
140
141 Jan 6, 2005 CERNLIB(1)