Open yurivict opened 4 years ago
I also had the problem of a library not being found automatically on FreeBSD and looked a little closer at this. From what I understand, the problem is that /usr/local/lib
is not in the compiler's search path by default (see e.g. cc --print-search-dirs
). Apparently, this has long been a subject of discussion (see e.g. here). But apparently that's still the way it is, so the question is whether or not it makes sense to work around this in meson.
@yurivict I'd be curious what you mean by "When meson is called it is passed prefix through the --prefix {prefix-dir} argument." At what point does parameter get added? When meson is called from where?
Also, since your profile says FreeBSD committer, maybe the above discussion could be brought back to life? :slightly_smiling_face:
This looks like a duplicate of gh-4468.
On FreeBSD meson's find_library() doesn't find libraries in
/usr/local/lib
.It seems to only search in the /usr/lib directory. On FreeBSD all package-installed libraries are in
/usr/local/lib
, or in${prefix}/lib
to be precise.I suggest that Meson should add the
${prefix}/lib
directory to the list of directories where it searches for libraries by default. When meson is called it is passed prefix through the--prefix {prefix-dir}
argument.Implementing this would match expectations of developers: when they use
find_library()
they mean to search in all common locations, not just in the base system.Specific motivation:
find_library()
in theZrythm
project fails to find libraries installed by thefft3
package: https://github.com/zrythm/zrythm/blob/master/meson.build#L602Thank you, Yuri