Blame SOURCES/0213-meson.build-be-specific-for-library-path.patch

2eb93d
From 9a993ce24fdd5de45774b65211570dd514cdf61d Mon Sep 17 00:00:00 2001
2eb93d
From: Luis Chamberlain <mcgrof@kernel.org>
2eb93d
Date: Wed, 17 Aug 2022 18:23:04 -0700
2eb93d
Subject: [PATCH 213/217] meson.build: be specific for library path
2eb93d
2eb93d
If you run the typical configure script on a typical linux software
2eb93d
project say with ./configure --prefix=/usr/ then the libdir defaults
2eb93d
to /usr/lib/ however this is not true with meson.
2eb93d
2eb93d
With meson the current libdir path follows the one set by the prefix,
2eb93d
and so with the current setup with prefix forced by default to /usr/
2eb93d
we end up with libdir set to /usr/ as well and so libraries built
2eb93d
and installed also placed into /usr/ as well, not /usr/lib/ as we
2eb93d
would typically expect.
2eb93d
2eb93d
So you if you use today's defaults you end up with the libraries placed
2eb93d
into /usr/ and then a simple error such as:
2eb93d
2eb93d
cxl: error while loading shared libraries: libcxl.so.1: cannot open shared object file: No such file or directory
2eb93d
2eb93d
Folks may have overlooked this as their old library is still usable.
2eb93d
2eb93d
Fix this by forcing the default library path to /usr/lib, and so
2eb93d
requiring users to set both prefix and libdir if they want to
2eb93d
customize both.
2eb93d
2eb93d
Link: https://lore.kernel.org/r/Yv2UeCIcA00lJC5j@bombadil.infradead.org
2eb93d
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2eb93d
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2eb93d
---
2eb93d
 meson.build | 1 +
2eb93d
 1 file changed, 1 insertion(+)
2eb93d
2eb93d
diff --git a/meson.build b/meson.build
2eb93d
index aecf461..802b38c 100644
2eb93d
--- a/meson.build
2eb93d
+++ b/meson.build
2eb93d
@@ -9,6 +9,7 @@ project('ndctl', 'c',
2eb93d
   default_options : [
2eb93d
     'c_std=gnu99',
2eb93d
     'prefix=/usr',
2eb93d
+    'libdir=/usr/lib',
2eb93d
     'sysconfdir=/etc',
2eb93d
     'localstatedir=/var',
2eb93d
   ],
2eb93d
-- 
2eb93d
2.27.0
2eb93d