Skip to content

Commit

Permalink
Merge pull request #6 from HiPhish/shared-not-dynamic
Browse files Browse the repository at this point in the history
Rename "dynamic" libraries to "shared" libraries
  • Loading branch information
meator authored May 10, 2024
2 parents e0b26d4 + 6900c0f commit fb19c8c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/packaging/bat.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ _This is described in [Packaging oniguruma](oniguruma.md) in detail._
To compile the `bat` package which depends on library `oniguruma`, `bat` must
have `oniguruma-devel` in its `hostmakedepends`. But `oniguruma` must be
installed alongside `bat` for `bat` to work because `oniguruma` provides
dynamic libraries `bat` needs.
shared libraries `bat` needs.

When a program is linked against a dynamic library, the program "remembers"
When a program is linked against a shared library, the program "remembers"
which library it has been linked to. It marks the SONAME of the library in the
executable. The details of this process are beyond the scope of this tutorial.

Expand Down
2 changes: 1 addition & 1 deletion src/packaging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for personal use.
a fork, know how to make a pull request)
- basics of CLI
- knowledge of the build system of the packaged program is preferable
- knowledge of libraries (what's a static/dynamic library, why are they
- knowledge of libraries (what's a static/shared library, why are they
important, what's a SONAME, etc.) is useful
- knowing what a patch is, how to make one, and how to apply it is preferable
(they are used in [packaging j4-dmenu-desktop](/packaging/j4-dmenu-desktop.md)
Expand Down
4 changes: 2 additions & 2 deletions src/packaging/j4-dmenu-desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ there.

If you are a more knowledgeable Linux user, you could set up a separate destdir
for `j4-dmenu-desktop`. You will have to add it to `$PATH` and potentially handle
dynamic libraries. This is cumbersome.
shared libraries. This is cumbersome.

Let's say that you were so amazed by `j4-dmenu-desktop` that you rushed to tell
your friends and colleagues about it. They naturally want to try it out too. But
the program could be big, it could take hours to build and its build system
could be complicated and involved. All these problems are avoidable because
your friends only need the executables (and dynamic libraries + possibly some
your friends only need the executables (and shared libraries + possibly some
supplementary data files like `/etc/` config). You already have all of this, you
just need to send it to them. They don't need the code.

Expand Down
6 changes: 3 additions & 3 deletions src/packaging/oniguruma.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ This is useful to for example separate large documentation from a program.
But this feature is used the most for `-devel` packages. All libraries usually
provide (at least) two packages: the main package and a `-devel` package.

The main package contains the core (dynamic) library. It is needed for programs
The main package contains the core (shared) library. It is needed for programs
which depend on this library.

The `-devel` package contains development files needed to **compile** projects
that depend on the library. It includes extra symbolic links to the dynamic
that depend on the library. It includes extra symbolic links to the shared
library, static libraries, pkg-config files, CMake files, header files and more.

The `-devel` package should always depend on the main package. Installing the
Expand Down Expand Up @@ -269,7 +269,7 @@ oniguruma>=6.8.1_1
It depends on `oniguruma>=6.8.1_1` even though the template doesn't even have a
`depends` field. How is that possible?

Each program remembers what dynamic libraries has it been linked with. It
Each program remembers what shared libraries has it been linked with. It
remembers the SONAME of the linked library.

You can query the SONAMEs a library provides with `objdump`
Expand Down

0 comments on commit fb19c8c

Please sign in to comment.