動的リンク - CI/CD用語集の定義
動的リンクはプログラムのロード時にライブラリ依存を解決し、バイナリを小さく保ちますが、実行時にライブラリが必要になります。
動的リンク は、ライブラリ参照を build 時ではなくロード時に解決するため、実行ファイルは小さいままで、各ライブラリの 1 つのコピーを他のプログラムと共有します。ライブラリはターゲットマシン上に存在している必要があります。
動的リンクは、ライブラリ参照を build 時ではなくロード時に解決するため、実行ファイルは小さいままで、各ライブラリの 1 つのコピーを他のプログラムと共有します。ライブラリはターゲットマシン上に存在している必要があります。
CI において
動的リンクされたテストバイナリは、期待される共有ライブラリを持たない runner やベースイメージ上で失敗します ("cannot open shared object file" というローダーエラー)。workflow で依存関係をインストールするか、移植性のために静的リンクしてください。
関連ガイド
Static Linking - CI/CD Glossary DefinitionStatic Linking: Static linking copies the machine code of every library a program uses into the final executa…
Shared Library - CI/CD Glossary DefinitionShared Library: A shared library (.so on Linux, .dll on Windows, .dylib on macOS) is a compiled library loade…
Library Path - CI/CD Glossary DefinitionLibrary Path: A library path is the list of directories the linker (build time) or loader (run time) searches…