{"record":{"id":"d4e20c2f094c6a34","repo":"NationalSecurityAgency/ghidra","slug":"z3-libs-not-found","errorCode":null,"errorMessage":"Z3 libs not found: ","messagePattern":"Z3 libs not found: ","errorType":"exception","errorClass":"UnsatisfiedLinkError","httpStatus":null,"severity":"critical","filePath":"Ghidra/Extensions/SymbolicSummaryZ3/src/main/java/ghidra/pcode/emu/symz3/SymZ3.java","lineNumber":29,"sourceCode":" * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage ghidra.pcode.emu.symz3;\n\nimport ghidra.framework.*;\n\npublic class SymZ3 {\n\tpublic static void loadZ3Libs() {\n\t\t// Load the libraries using a custom search path before the system tries\n\t\tString ext = Platform.CURRENT_PLATFORM.getLibraryExtension();\n\t\ttry {\n\t\t\tSystem.load(Application.getOSFile(\"libz3\" + ext).getPath());\n\t\t\tSystem.load(Application.getOSFile(\"libz3java\" + ext).getPath());\n\t\t}\n\t\tcatch (OSFileNotFoundException e) {\n\t\t\tthrow new UnsatisfiedLinkError(\"Z3 libs not found: \" + e);\n\t\t}\n\t\tSystem.setProperty(\"z3.skipLibraryLoad\", Boolean.toString(true));\n\t}\n}\n","sourceCodeStart":11,"sourceCodeEnd":34,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Extensions/SymbolicSummaryZ3/src/main/java/ghidra/pcode/emu/symz3/SymZ3.java#L11-L34","documentation":"SymZ3.loadZ3Libs() attempts System.load() on libz3 and libz3java native libraries fetched via Application.getOSFile(). If the files are not present in the expected OS-specific directory, an OSFileNotFoundException is caught and re-thrown as UnsatisfiedLinkError. This is the bootstrap step before any Z3 symbolic execution can occur — without these libraries the SymbolicSummaryZ3 extension cannot function.","triggerScenarios":"Calling SymZ3.loadZ3Libs() when Application.getOSFile(\"libz3\" + ext) or Application.getOSFile(\"libz3java\" + ext) throws OSFileNotFoundException — i.e., the Z3 native libraries for the current platform are not installed in the Ghidra OS directory.","commonSituations":"The SymbolicSummaryZ3 extension was installed but the Z3 native binaries for the running platform were not bundled or downloaded; running on an OS/architecture (e.g., ARM Linux) for which prebuilt Z3 libs aren't shipped; the extension's OS directory structure is incomplete after a manual install; a Ghidra upgrade reset the extension directory without re-adding the native libs.","solutions":["Download or build Z3 native libraries (libz3.so/libz3.dylib/libz3.dll and libz3java.*) for your platform and place them in the Ghidra OS directory returned by Application.getOSDir().","Verify Platform.CURRENT_PLATFORM and the expected library extension match the files you placed (use .so on Linux, .dylib on macOS, .dll on Windows).","Reinstall the SymbolicSummaryZ3 extension from a complete distribution that includes native libs for your OS.","If building Z3 from source, ensure the Java bindings (libz3java) are built alongside the core library."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check for Z3 libs before attempting to load\nString ext = Platform.CURRENT_PLATFORM.getLibraryExtension();\ntry {\n    File libz3 = Application.getOSFile(\"libz3\" + ext);\n    File libz3java = Application.getOSFile(\"libz3java\" + ext);\n    if (!libz3.exists() || !libz3java.exists()) {\n        // Inform user to install Z3 native libs for this platform\n    }\n} catch (OSFileNotFoundException e) {\n    // libs missing — guide user to install before using SymZ3 features\n}","typeGuard":null,"tryCatchPattern":"try {\n    SymZ3.loadZ3Libs();\n} catch (UnsatisfiedLinkError e) {\n    if (e.getMessage().startsWith(\"Z3 libs not found\")) {\n        // Notify: install Z3 native libs for platform X\n    } else {\n        throw e;\n    }\n}","preventionTips":["Bundle Z3 native libs for all target platforms in the extension distribution.","Verify libz3 and libz3java are present in Application.getOSDir() after extension install.","Document the platform-specific Z3 install step in the extension README.","Gate Z3-dependent features behind a capability check so the UI doesn't offer them without libs."],"tags":["z3","native-library","symbolic-execution","unsatisfiedlinkerror","platform"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}