On Jun 22 2017, Jussi Pakkanen <
jpak...@gmail.com> wrote:
> On Thu, Jun 22, 2017 at 2:20 AM, Nikolaus Rath <
Niko...@rath.org> wrote:
>
>> On my Debian jessie system, this means Meson puts the files into
>> /usr/local/lib/x86_64-linux-gnu/:
>>
>> Unfortunately that's not a location that pkg-config considers.
>>
>> What's the best way to fix this?
>
> FWICT /usr/local/lib[whatever] is not in the default directories for
> looking up shared libraries
Well, that depends on your definition of "default". It is the default on
Debian, and I believe pretty much the only way to make multi-arch work.
> so it is not surprising that it is also
> not used to look up pkg-config files either. Probably the only
> reliable way to make this work is to set LD_LIBRARY_PATH and
> PKG_CONFIG_PATH to point to their respective directories and then it
> should work.
No, there is no special LD_LIBRARY_PATH required. As far as I can tell,
PKG_CONFIG_PATH is used by pkg-config at runtime to determine where to
look at files, but not at build-time by Meson to determine where to put
files. Am I missing something?
> Some distros might have /usr/local/lib and /usr/loca/lib/pkgconfig in
> the system search path, in which case just setting libdir to "lib"
> should make it work. However that is not guaranteed to work on all
> distros.
No, this will unfortunately put the .so files in the wrong
directory. Note that I am not explicitly setting libdir to anything, the
default (including arch triplet) has been determined by Meson.
For reference:
$ mesonconf
Core properties:
Source dir /home/nikratio/in-progress/libfuse
Build dir /home/nikratio/in-progress/libfuse/build
[...]
Directories:
Option Description Current Value
------ ----------- -------------
prefix Installation prefix. /usr/local
libdir Library directory. lib/x86_64-linux-gnu
libexecdir Library executable directory. libexec
bindir Executable directory. bin
sbindir System executable directory. sbin
includedir Header file directory. include
datadir Data file directory. share
mandir Manual page directory. share/man
infodir Info page directory. share/info
localedir Locale data directory. share/locale
sysconfdir Sysconf data directory. etc
localstatedir Localstate data directory. var
sharedstatedir Architecture-independent data directory. com
[...]
Best,