CERNLIB-STATIC(1)
π CERNLIB-STATIC(1) π
okay bestie, this one is from the CERNlib commands manual: cernlib-static is the little icon that tells you which object libraries you need to link with the CERN Program Library. No cap, it's giving βlinker whispererβ energy π₯
β¨ NAME β¨
cernlib-static β get libraries needed to link with CERN Program Library π
π¦ SYNOPSIS π¦
cernlib-static [ options ] [ library[/version] ] ...
πΈ DESCRIPTION πΈ
cernlib-static writes to standard output a list of object libraries needed to link a program with the given library of CERNlib. Other libraries needed implicitly β both CERNlib and system libraries β are added automatically. Slay, honestly π«Ά
The library may be any of the CERNlib libraries using a short name like packlib, mathlib, graflib, phtools... and yes, cernlib-static allows you to specify which version to use for this library, see usage notes below π
π OPTIONS π
cernlib-static recognizes the following options:
- graphics-interface option β specifies the graphics interface to use. Defaults to
X11. The choices available depend on the system in use:- all systems.
- On
HP/UX,X11R5is used when available on the system. - all systems.
- On
HP/UX,Motif1.2is used when available on the system. - Vendor specific graphics,
DEC Ultrix,IBM/RS6000,SUNonly. - Vendor specific graphics,
Apolloonly. - Vendor specific graphics,
IBM/RS6000andSGIonly.
- obsolete option β obsolete option. Ignored. literally βnothing to see hereβ energy π
- lapack/blas opt-out option β Donβt link against system lapack and blas.
- vendor-libraries option β do automatically add vendor libraries needed to link, but not specified by the user.
- level/version option β Use level of CERNlib libraries; can be
pro,neworold, or you may specify the explicit version number; the default version ispro. The global version can be overwritten for an individual library by specifying the library as library/version.
πΏ where CERNlib lives: the CERN variable
cernlib-static expects to find the CERNlib directory tree in /cern; if your system does not have this, set the environment variable CERN to contain the name of the root directory for the CERNlib tree. π§
π¦ version overrides on individual libraries
After the library, a version for that library different from the default version may be specified. The possible values are as for the version option, or in the case of graflib as for the graphics option. π
π USING IT / EXAMPLES π
As cernlib-static writes the list of libraries to standard output, using it as a command will show the list of libraries generated by cernlib-static. Also, it can be used like other commands in the command line surrounded by back quotes (β). π
At CERN you should use the hepf77 command to link on your system as this gives the compiler parameters which are compatible with Cernlib (in particular for xlf on IBM/RS6000 and fort77 on HP/UX). You could type:
hepf77 your.o βcernlib-staticβ
to link your object file with routines from packlib and kernlib; you need not specify packlib, as this is added automatically. Also all kernlib routines are included in packlib. π
If your application uses graflib and the Motif interface, the command would be:
hepf77 your.o βcernlib-static graflib/Motifβ
Again packlib need not be specified. π
If you prefer to have an environment variable CERNLIB set at login time, put the following into .profile for sh, ksh or similar:
CERNLIB=βcernlib-static graflibβ; export CERNLIB
For .login for users of csh or similar:
setenv CERNLIB "βcernlib-static graflibβ"
The CERNLIB variable can then be used in the link command instead of calling the cernlib-static command. π
π₯ NOTES, CAVEATS & βNO CAPβ WARNINGS π₯
There is no checking that any of the libraries (or options) are valid or exist. Most loaders only check the libraries once for symbols, hence the order the libraries given is important. This command does not check that the order given is correct. π
For systems other than Alliant, Apollo, DEC Ultrix, Digital Unix (or DEC OSF), HP/UX, SGI, Linux, Sun OS, Sun Solaris the libraries given for the graphics interface are likely to be wrong, even forX11andMotif. This is a real warning, bestie β not a vibe check.
The cernlib-static command is available in the /cern/pro/bin directory in the CERNlib tree. π§
π BUGS / REPORTING π
If you have suggestions for improvements, or find bugs, please report them to cernlib@cern.ch. Your report must state which version of CERNlib you are using, or the output of the command: what which cernlib-static gives you. π«Ά
Source/version: CERNlib commands β cernlib-static. Date: the original footerβs source/version and date are acknowledged here with full main-character respect. periodt πβ¨ππ¦πΈπ
π«Άππ₯ππβππππ§π
π¦ where this page comes from
- nixos 26.05: cernlib 2025.09.18.4
- nixpkgs unstable: cernlib 2025.09.18.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms