@@ -357,7 +357,7 @@ What went wrong?
357357To understand where the failure is coming from, we first need to understand what actually happens when we try to run a
358358program on a computer. Our applications that we want to run take up space in memory, but many of them share parts of
359359their dependency tree. For example, every application built with the ` GCC ` compiler, require the ` GCC ` compiler runtime
360- libraries. Have every executable we run have a copy of that library built in is a waste of space in memory, since all
360+ libraries. Having every executable we run include a copy of that library internally in is a waste of space in memory, since all
361361programs need exactly the same library.
362362
363363To save space (and to allow us to upgrade the libraries), dynamically linked
@@ -370,21 +370,21 @@ of applications.
370370<p align =" center " ><img src =" img/runtime-loader.png " alt =" Runtime loader " width =" 600px " /></p >
371371
372372The runtime loader is perhaps the most critical part of any operating system, as it controls the behaviour of most
373- applications on any system
373+ applications on any system.
374374
375375### What affects the behaviour of the runtime loader?
376376
377377There are a few things that can impact the behaviour of the runtime loader:
378378
379379* Hints in the environment about where to look for our shared libraries. ` LD_LIBRARY_PATH ` in particular is typically
380380 used to influence the behaviour of the runtime loader.
381- * Information can be stoed directly in the library/application that you are trying to load. At compile time, we can
381+ * Information can be stored directly in the library/application that you are trying to load. At compile time, we can
382382 store information about the paths to search when looking for libraries. This can be done in such a way that it can
383383 be overridden by ` LD_LIBRARY_PATH ` (` RUNPATH ` linking), or in a way where ` LD_LIBRARY_PATH ` has no influence
384384 (` RPATH ` linking).
385385* The runtime loader also has default locations it searchs for libraries. These are used as a last resort.
386386
387- For a given application or library, we can inspect what the runtime loader will resolve the the shared libraries to
387+ For a given application or library, we can inspect what the runtime loader will resolve the shared libraries to
388388using the command ` ldd ` . For our failed build, we can do this on the binary ` hello_mpi_hdf5 ` , which was created by our
389389build (and mentioned in some of our errors):
390390``` { .bash .no-copy}
@@ -419,13 +419,14 @@ So there is some information in the RPATH header of our executable that tells it
419419(and it _ does_ find them as we saw in our ` ldd ` output), but there is nothing there to tell it where to find the
420420` HDF5 ` libraries.
421421
422- To inject this information we need to give hints to the compiler that this information is required _ inside_ the binary.
423- This is very tedious though if we are building lots of applications with lots of different dependencies, so instead we
424- use _ compiler wrappers_ to automatically inject this information based on the modules we have loaded at the time we
425- do the compilation.
422+ To inject this information _ inside the binary_ we need to give instruct the compiler that this information is
423+ required. This is very tedious though as it requires lot of compiler flags, and when we are building lots of
424+ applications with lots of different dependencies it gets very complex quickly. Instead, we
425+ use _ compiler wrappers_ to automatically inject the required flags into the compiler command based on the modules we
426+ have loaded at the time we do the compilation.
426427
427428This is done by default for everything that EESSI itself ships, but when building software manually with EESSI, we
428- need to activate these wrappers.
429+ need to somehow activate these wrappers. That is where the EESSI ` buildenv ` module comes in .
429430
430431## Using the ` buildenv ` module
431432
0 commit comments