# Loading plugin fails with missing directory 'C' library

**URL:** <https://forum.hdfgroup.org/t/loading-plugin-fails-with-missing-directory-c-library/11324>\
**Category:** HDF5 Library\
**Created:** [July 16, 2023, 3:15am UTC](https://forum.hdfgroup.org/t/loading-plugin-fails-with-missing-directory-c-library/11324 "2023-07-16T03:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thall](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/t/bbce88/32.png) [@thall](https://forum.hdfgroup.org/u/thall)\
**Post date:** [July 16, 2023, 3:15am UTC](https://forum.hdfgroup.org/t/loading-plugin-fails-with-missing-directory-c-library/11324/1 "2023-07-16T03:15:51Z")

</div>

While attempting to load a plugin the HDF5 library will fail if one of the directories in the plugin paths does not exist even if there are more paths to check.

File is HSPLpath.c in function HSPL\_\_find\_plugin\_in\_path\_table. The guts of which are:

/\* Loop over the paths in the table, checking for an appropriate plugin \*/  
for (u = 0; u \< H5PL\_num\_paths\_g; u++) {

```
    /* Search for the plugin in this path */
    if (H5PL__find_plugin_in_path(search_params, found, H5PL_paths_g[u], plugin_info) < 0)
        HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in path %s encountered an error",
                    H5PL_paths_g[u])

    /* Break out if found */
    if (*found) {
        if (!plugin_info)
            HGOTO_ERROR(H5E_PLUGIN, H5E_BADVALUE, FAIL, "plugin info should not be NULL")
        break;
    }
}

```

The call to HSPL\_\_find\_plugin\_in\_path will return -1 if the path does not exist, which causes a goto to ‘done’, even if all of HSPL\_num\_paths\_g have yet to be checked.

Names change, directories move. If a path does not exist perhaps a warning could be generated but the rest of the paths still get checked.

---

<div class="post-metadata">

**Author:** ![byrn](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@byrn](https://forum.hdfgroup.org/u/byrn)\
**Post date:** [July 16, 2023, 3:14pm UTC](https://forum.hdfgroup.org/t/loading-plugin-fails-with-missing-directory-c-library/11324/2 "2023-07-16T15:14:03Z")

</div>

Please file a bug issue at our github repo;

> **[GitHub - HDFGroup/hdf5: Official HDF5® Library Repository](https://github.com/HDFGroup/hdf5)**
>
> Official HDF5® Library Repository. Contribute to HDFGroup/hdf5 development by creating an account on GitHub.
