find_library() with dirs kwarg falls back to system lib dir
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
In the documentation of `compiler.find_library()`, it states that the `dirs` kwarg should override the system lib dir. But given a `dirs` argument that refers to a non-existent directory, the function goes to the system lib dir and finds a library with the corresponding name.
For our build we need it to fail instead. If we think the library was found according to the `dirs` argument, then we will `include_directories` using a special relative path inside that `dirs` area. This of course does not work where the library was (unexpectedly) found in the system lib dir.
Contributor guide
Research direction
Start at the implementation and documentation for compiler.find_library(), then reproduce the case with a dirs argument pointing to a non-existent directory and a library available in the system lib dir. Done means the dirs argument no longer falls back to the system lib dir and the documented override behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100