Discussion:
[blfs-support] Using meson to build packages with libraries
Christopher Gregory
2018-06-27 09:24:28 UTC
Permalink
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
Christopher Gregory
2018-06-27 09:43:22 UTC
Permalink
Sent: Wednesday, June 27, 2018 at 9:24 PM
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.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above infor
Thanos Baloukas
2018-06-27 11:40:12 UTC
Permalink
Post by Christopher Gregory
Sent: Wednesday, June 27, 2018 at 9:24 PM
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.
I can't confirm this. I install everything in destdir initially, create
binary packages and then I install them on /.
/usr/lib64 does not exist on my system. Example packages that are built
with meson without --libdir=/usr/lib and install their libraries in
/usr/lib are libinput libdrm and pango.
--
Thanos
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubs
Christopher Gregory
2018-06-27 12:09:27 UTC
Permalink
Sent: Wednesday, June 27, 2018 at 11:40 PM
Subject: Re: [blfs-support] Using meson to build packages with libraries
Post by Christopher Gregory
Sent: Wednesday, June 27, 2018 at 9:24 PM
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.
I can't confirm this. I install everything in destdir initially, create
binary packages and then I install them on /.
/usr/lib64 does not exist on my system. Example packages that are built
with meson without --libdir=/usr/lib and install their libraries in
/usr/lib are libinput libdrm and pango.
--
Thanos
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Well Sorry Thanos, I am calling you a liar. Anyone other than YOU who actually runs meson --help can SEE that it states quite clearly that the default --libdir IS /usr/lib64. With a full log file of 640 built blfs packages with very detailed notes I do NOT believe you. Just go into the extracted meson directory and actually take a look at mesonlib.py and you will see the references to /usr/lib64.

Please do NOT respond to any more of my threads.

Christopher.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/fa
Bruce Dubbs
2018-06-27 12:31:35 UTC
Permalink
On 06/27/2018 07:09 AM, Christopher Gregory wrote:

Unacceptable comments. Now on moderation.

-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscri
Armin K.
2018-06-27 15:22:27 UTC
Permalink
Post by Thanos Baloukas
Post by Christopher Gregory
Sent: Wednesday, June 27, 2018 at 9:24 PM
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.
I can't confirm this. I install everything in destdir initially, create
binary packages and then I install them on /.
/usr/lib64 does not exist on my system. Example packages that are built
with meson without --libdir=/usr/lib and install their libraries in
/usr/lib are libinput libdrm and pango.
It seems to detect if /usr/lib64 exists first (and LFS does create this
as a symlink) before installing there. I do not have /usr/lib64 either,
not as a symlink or a dierctory, and meson never tried to install
anything there.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/bl
Thanos Baloukas
2018-06-27 15:54:22 UTC
Permalink
Post by Armin K.
Post by Thanos Baloukas
I can't confirm this. I install everything in destdir initially, create
binary packages and then I install them on /.
/usr/lib64 does not exist on my system. Example packages that are built
with meson without --libdir=/usr/lib and install their libraries in
/usr/lib are libinput libdrm and pango.
It seems to detect if /usr/lib64 exists first (and LFS does create this
as a symlink) before installing there. I do not have /usr/lib64 either,
not as a symlink or a dierctory, and meson never tried to install
anything there.
Hi Armin

LFS doesn't create the /usr/lib64 symlink anymore, unless I'm missing that.
--
Thanos
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.htm
William Harrington
2018-06-27 18:10:55 UTC
Permalink
Post by Thanos Baloukas
Post by Armin K.
Post by Thanos Baloukas
I can't confirm this. I install everything in destdir initially, create
binary packages and then I install them on /.
/usr/lib64 does not exist on my system. Example packages that are built
with meson without --libdir=/usr/lib and install their libraries in
/usr/lib are libinput libdrm and pango.
It seems to detect if /usr/lib64 exists first (and LFS does create
this as a symlink) before installing there. I do not have /usr/lib64
either, not as a symlink or a dierctory, and meson never tried to
install anything there.
Hi Armin
LFS doesn't create the /usr/lib64 symlink anymore, unless I'm missing that.
--
Thanos
Greetings,

Yes if /usr/lib64 exists then output of meson --help will list default
as /usr/lib64. Even if a system has /lib64 it won't matter. This is a
meson matter, not LFS. Meson, as far as I'm concerned, did it right.
Even if on a 64bit system and multilib enabled, if it's pure64 bit with
just /usr/lib that'd be right. Just my 42342354352423 cents.


Sincerely,

William Harrington
--
You feel a whole lot more like you do now than you did when you used
to.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubsc
Christopher Gregory
2018-06-28 09:13:18 UTC
Permalink
Sent: Wednesday, June 27, 2018 at 9:24 PM
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
Well I have finally tracked down the exact trigger for this. There are optional packages listed on ffmpeg page I believe that install libraries to /usr/lib64 unless forced to install to /usr/lib. The first package in question is Jack audio. Once this package was installed, unknown to me it created the /usr/lib64 directory. What that then does is trigger an if statement in mesonbuild/mesonlib.py, namely, I believe:

if os.path.isdir('/usr/lib64') and not os.path.islink('/usr/lib64'):
return 'lib64'

that will then cause subsequent packages that meson builds to put their libraries into /usr/lib64 instead of the desired /usr/lib.

The fix is two fold:

1) Put a comment in brackets next to the optional package to advise those installing that they need to change the location of the installed library to --libdir=/usr/lib.

2) Remove the lib64 directive from mesonlib.py by sed statements.

There are at least three other optional packages that this would also need to be done for. What this then achieves is consistency in the book with regards to warnings, and more importantly if someone does install a package that is not listed as optional in the book, and they did not notice that it created a /usr/lib64 directory that it would at least minimize the fall out from having a /usr/lib64 directory, whilst not actually fixing the wrong location itself. Having the alert and fix for book optional packages gives people the heads up that there is still old but usable code out there that still does this practice.

Christopher.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsu
Loading...