error: '/usr/bin/ld: cannot find -lconfig.'
@mrahmanp internally reported this link issue:
I'm currently in the process of building the latest version of Cargo, and I've encountered an issue during the
make
phase with the following error:/usr/bin/ld: cannot find -lconfig.
The CMake configuration successfully locates thelibconfig
library, and I've also checked myLD_LIBRARY_PATH.
I've tried setting it manually, and I haven't faced a similar problem in the past. Can you help me understand what might be causing this issue, or do you have any suggestions on how to resolve it?
The problem is that we are linking against libconfig
but we are not actually using it as a dependency. As such, we are not actively looking for it in CMake. If the user's system happens to have libconfig
installed, Cargo
will happily build. Otherwise, the error above will occur.