Page History
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||
We will take a step-by-step approach, taking the First thing we need to do is to decide where to install your personal CDO. A good choice would be using your PERM space, and we may use the same structure as the production installation. Because in the script we already have a variable called $VERSION containing the CDO version to install, we can also use that. This way we could have multiple versions of the same package installed alongside should we require it in the future:
Next comes the decision on what to use for the build itself. Since it is a relatively small build, for performance you might use
However, if you are going to submit it as a batch job, the directory will be wiped at the end. While you are putting the build script together, it may be more practical to have the build directory somewhere that is not deleted after a failed build so you can inspect output files and troubleshoot. As an example, we could pick the following directory in PERM:
Let's look at the environment for the build. All of dependencies listed above are already available, so we may leverage that by loading all the corresponding modules:
At this point, we need to refer to the installation instructions of this package in the official documentation. We can see it is a classic autotools package, which is typically built with the
Since we are just getting some short help, we can just run the script locally to get the configure output.
We should inspect the output of the configure help command, and identify what options are to be used:
Since all those dependencies are not installed on system paths, we will need to specify the installation directory for each one of them. We may then use the We will also define where to install the package with the --prefix option. Let's amend the configure line with:
Note that for PROJ, since the variable We are now ready to attempt our first build. Submit it the build script to the batch system with:
While it builds, we may keep an eye on the progress with:
At this point CDO build and installation should complete successfully, but the execution of the newly installed CDO at the end fails with:
If we inspect the resulting binary with ldd, we will notice there are a few libraries that cannot be found at runtime:
We are missing the PROJ and ecCodes libraries. We will need to explicitly set RPATHs when we build CDO to make sure the libraries are found. In Autotools packages, and as shown in the configure help we ran earlier, we may pass any extra link flags through the
If we submit the the build job again and wait for it to complete, we should see something like:
For reference, this is the complete and functional job script to build CDO:
|
...