mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.38k stars 1.55k forks source link

[dlang] [dub] Plain library references should try <name> and lib<name> #9901

Open Panke opened 2 years ago

Panke commented 2 years ago

Describe the bug Meson does not search correctly for dependencies introduced via dub

Expected behavior If you specify a (e.g. C) library foo via libs in a dub project file, dub will try to find the library by foo and on failure try to find it as libfoo. It will use pkg-config for this on posix system. In any case, if that fails and it cannot find the library, it will just pass -lfoo.

Meson should mirror that behaviour, at least the part concerning the lib-prefix.

system parameters

denizzzka commented 2 years ago

it will just pass -lfoo.

But then linker still tries to find libfoo in this case?

Panke commented 2 years ago

This is passed to the linker verbatim and the behaviour depends on the linker used. But this is only done if the library is not found via pkg-config.