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 gfortran -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 gfortran -o myprogram myprogram.F -static `cernlib -safe -G Motif
41 pawlib`
42
43 and if you want to link against all libraries (including the CERN
44 libraries) dynamically, use the same command without the -static com‐
45 piler flag (the linker assumes dynamic linking by default):
46
47 gfortran -o myprogram myprogram.F `cernlib -safe -G Motif pawlib`
48
50 -a arch
51 Specify a system architecture, e.g. Linux (default), AIX, HP-UX,
52 etc.
53
54 -dy Equivalent to -safe; for backwards compatibility.
55
56 -G driver
57 Specify a graphics driver. The available options on Linux are
58 X11 and Motif (the latter option will also work when the Lesstif
59 library is present).
60
61 -P, -s Ignored; for backwards compatibility.
62
63 -safe Do not make any assumptions about whether the CERN libraries
64 should be linked against dynamically or statically. (The
65 default behavior, if this flag is not used, is to link them
66 statically.)
67
68 -u Do not include architecture-specific libraries in the output.
69
70 -v version
71 Specify version of $CERN_LEVEL. This is meaningless unless you
72 have installed an upstream version of CERNLIB (i.e. not packaged
73 by Debian); see the file /usr/share/doc/cern‐
74 lib-base/README.Debian.
75
76 -?, --help
77 Show a summary of options.
78
79 -- Tell cernlib that this marks the end of cernlib-specific flags,
80 and all following arguments are to be parsed as described in the
81 LIBRARIES section below. If -- is not given, the first word
82 parsed as a library name will be the first word not starting
83 with a hyphen "-" that is not an argument to a preceding cernlib
84 flag.
85
87 The following library names are recognized by this version of the cern‐
88 lib script. These names may be used exactly as shown here, or prefixed
89 by "-l".
90
91 Core CERN libraries
92 mathlib, packlib, kernlib
93
94 Graphics and PAW libraries
95 graflib, pawlib
96
97 Monte Carlo and GEANT libraries
98 cojets, eurodec, geant321, herwig59, isajet758, pdflib804, pho‐
99 tos202, phtools
100
101 Additional Monte Carlo libraries
102 (to obtain these, see /usr/share/doc/monte‐
103 carlo-base/README.Debian)
104 ariadne, ariadne-p5, fritiof, jetset, lepto, pythia5, pythia6
105
106 Aliases
107 The numerals at the end may be left off most of the library
108 names above.
109
110 Other library names
111 Various other names are recognized for backwards compatibility,
112 internal use, and non-Linux architectures. For the complete
113 list, please see the cernlib script.
114
115 Other Any names not recognized by cernlib that start with "-l" or with
116 any character other than a hyphen ("-") are output as
117 -l${name#-l} (i.e., are assumed to be a library). Names start‐
118 ing with a hyphen for which the second character is not "l" are
119 assumed to be compiler flags, and are output at the beginning of
120 the line before all other output.
121
123 /usr/share/doc/cernlib-base/README.Debian describes some of the changes
124 that have been made to the CERN libraries in order to comply with
125 Debian policy and the Filesystem Hierarchy Standard.
126
127 CERNLIB documentation for all related libraries and programs is avail‐
128 able at the following URL: http://cern.ch/cernlib/
129
131 This manual page and the version of the cernlib script that it
132 describes were written by Kevin McCarty <kmccarty@debian.org> for the
133 Debian GNU/Linux system (but may be used by others). They are licensed
134 under the GNU General Public License, version 2 or later (at your
135 choice).
136
138 Copyright (C) Kevin B. McCarty, 2002, 2003, 2004, 2005, 2006.
139
140
141
142CERNLIB(1) General Commands Manual CERNLIB(1)
143
144
145
147 cernlib - print CERN library dependencies
148
150 cernlib [options] libraries
151
153 cernlib is a tool to list the compiler and linker options necessary to
154 compile a CERNLIB program that has the given library dependencies. It
155 is generally used within a command substitution, as in the following
156 example:
157
158 gfortran -o myprogram myprogram.F `cernlib -G Motif pawlib`
159
160 This version of cernlib has been completely rewritten from the original
161 script provided by CERN. It now does recursive library dependency
162 checking and removes duplicate entries.
163
164 Note that by default, the cernlib script assumes that the CERN
165 libraries are to be linked against statically; if the environment vari‐
166 ables $CERN or $CERN_ROOT are specified, it looks for the libraries
167 only in the "lib" subdirectory of those locations, not any "shlib" sub‐
168 directory. Furthermore, the script brackets the CERN libraries with
169 linker instructions to link statically. This is done to preserve the
170 original upstream behavior, in which all CERNLIB libraries exist only
171 in static form. For instance, "cernlib packlib" outputs:
172
173 -Wl,-static -lpacklib -lkernlib -Wl,-dy -lm -lnsl -lcrypt -ldl -lg2c
174
175 If you want to link against ALL libraries (including CERNLIB) either
176 statically or dynamically, call the cernlib script with its -safe flag
177 to omit these bracketing linker flags. That is: if you want to link
178 against all libraries (not just CERNLIB) statically, use the -static
179 compiler flag and call cernlib with its -safe flag:
180
181 gfortran -o myprogram myprogram.F -static `cernlib -safe -G Motif
182 pawlib`
183
184 and if you want to link against all libraries (including the CERN
185 libraries) dynamically, use the same command without the -static com‐
186 piler flag (the linker assumes dynamic linking by default):
187
188 gfortran -o myprogram myprogram.F `cernlib -safe -G Motif pawlib`
189
191 -a arch
192 Specify a system architecture, e.g. Linux (default), AIX, HP-UX,
193 etc.
194
195 -dy Equivalent to -safe; for backwards compatibility.
196
197 -G driver
198 Specify a graphics driver. The available options on Linux are
199 X11 and Motif (the latter option will also work when the Lesstif
200 library is present).
201
202 -P, -s Ignored; for backwards compatibility.
203
204 -safe Do not make any assumptions about whether the CERN libraries
205 should be linked against dynamically or statically. (The
206 default behavior, if this flag is not used, is to link them
207 statically.)
208
209 -u Do not include architecture-specific libraries in the output.
210
211 -v version
212 Specify version of $CERN_LEVEL. This is meaningless unless you
213 have installed an upstream version of CERNLIB (i.e. not packaged
214 by Debian); see the file /usr/share/doc/cern‐
215 lib-base/README.Debian.
216
217 -?, --help
218 Show a summary of options.
219
220 -- Tell cernlib that this marks the end of cernlib-specific flags,
221 and all following arguments are to be parsed as described in the
222 LIBRARIES section below. If -- is not given, the first word
223 parsed as a library name will be the first word not starting
224 with a hyphen "-" that is not an argument to a preceding cernlib
225 flag.
226
228 The following library names are recognized by this version of the cern‐
229 lib script. These names may be used exactly as shown here, or prefixed
230 by "-l".
231
232 Core CERN libraries
233 mathlib, packlib, kernlib
234
235 Graphics and PAW libraries
236 graflib, pawlib
237
238 Monte Carlo and GEANT libraries
239 cojets, eurodec, geant321, herwig59, isajet758, pdflib804, pho‐
240 tos202, phtools
241
242 Additional Monte Carlo libraries
243 (to obtain these, see /usr/share/doc/monte‐
244 carlo-base/README.Debian)
245 ariadne, ariadne-p5, fritiof, jetset, lepto, pythia5, pythia6
246
247 Aliases
248 The numerals at the end may be left off most of the library
249 names above.
250
251 Other library names
252 Various other names are recognized for backwards compatibility,
253 internal use, and non-Linux architectures. For the complete
254 list, please see the cernlib script.
255
256 Other Any names not recognized by cernlib that start with "-l" or with
257 any character other than a hyphen ("-") are output as
258 -l${name#-l} (i.e., are assumed to be a library). Names start‐
259 ing with a hyphen for which the second character is not "l" are
260 assumed to be compiler flags, and are output at the beginning of
261 the line before all other output.
262
264 /usr/share/doc/cernlib-base/README.Debian describes some of the changes
265 that have been made to the CERN libraries in order to comply with
266 Debian policy and the Filesystem Hierarchy Standard.
267
268 CERNLIB documentation for all related libraries and programs is avail‐
269 able at the following URL: http://cern.ch/cernlib/
270
272 This manual page and the version of the cernlib script that it
273 describes were written by Kevin McCarty <kmccarty@debian.org> for the
274 Debian GNU/Linux system (but may be used by others). They are licensed
275 under the GNU General Public License, version 2 or later (at your
276 choice).
277
279 Copyright (C) Kevin B. McCarty, 2002, 2003, 2004, 2005, 2006.
280
281
282
283 Jan 6, 2005 CERNLIB(1)