Skip to content

Defaults to /usr/lib* might be harmful #534

@bfloch

Description

@bfloch

Here is the case:
If you provide custom library paths but some of the libraries are not given /usr/lib is being added as default.
However this default might mess up the linking for all other libraries if the system happens to have the same libraries.

The concrete use-case was where alembic would fail to link against hdf5 in the tests because our alembic was linked against a newer hdf.
However since a different path was not specified it defaulted to /usr/lib. The order of these variable is random and in our case the system library was being linked (and failed) before our provided hdf5 path.

This was 8.4 but I still see /usr/lib as defaults in dev.
I would suggest not to default to /usr/lib* but instead leave the path empty.
ld always picks up /usr/lib as last resort so no action is necessary.

Cheers,
Blazej

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions