[blfs-support] Using meson to build packages with libraries

Christopher Gregory christopher.gregory at mail.com
Wed Jun 27 02:43:22 PDT 2018



> Sent: Wednesday, June 27, 2018 at 9:24 PM
> From: "Christopher Gregory" <christopher.gregory at mail.com>
> To: blfs-support at lists.linuxfromscratch.org
> Subject: [blfs-support] Using meson to build packages with libraries
>
> Hello,
> 
> I am surprised that no one has bothered to report this.  I have noticed that when meson and ninja are used to build a package, if that package has libraries to be installed, they get installed to /usr/lib64 unless you specifically add --libdir=/usr/lib to the meson configure line.
> 
> This does affect packages already in the book.  All you need to do to confirm this is to do a dest-dir install and you will see the evidence for yourself.  I do not know if there is a global option somewhere in the main meson configuration that can be changed, but as a number of editors have fought to keep things out of /usr/lib64 then this spoils the work.  I only found this out by accident, when investigation why a package was not able to find the libraries of an installed package.  As soon as I added the --libdir=/usr/lib to the offending packages's meson configure line and recompiled and installed the error went away. 
> 
> Regards,
> 
> Christopher.
> -- 
> http://lists.linuxfromscratch.org/listinfo/blfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
> 

Hello,

Well it seems that this can be overridden in mesonlib.py.  There are a few /usr/lib64 directives there.  This is in the extracted meson tar ball directory.  I have *not* tried this yet, but it seems that by removing /usr/lib64 from that file, then this should prevent the need for having to add it to individual packages in the book.  One change is better than many.  I am not a programmer, but I am sure that if Bruce or Pierre or Ken were to look at that file, they could confirm if my deductions are correct.  The help file for meson also states that the default install directory for libraries is indeed /usr/lib64.  It would be nice to see this correction made in the lfs systemd book.

Regards,

Christopher.


More information about the blfs-support mailing list