From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: nvdimm@lists.linux.dev, dan.j.williams@intel.com,
vishal.l.verma@intel.com
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: [PATCH] util/parse: Fix build error on ubuntu
Date: Tue, 15 Mar 2022 11:34:26 +0530 [thread overview]
Message-ID: <20220315060426.140201-1-aneesh.kumar@linux.ibm.com> (raw)
Fix the below build error on ubuntu:
../util/parse-configs.c:7:10: fatal error: iniparser.h: No such file or directory
7 | #include <iniparser.h>
| ^~~~~~~~~~~~~
The same error is not observed on other OS because they do create symlinks as
below
lrwxrwxrwx. 1 root root 21 Jul 22 2021 /usr/include/iniparser.h -> iniparser/iniparser.h
the error can be avoided by using the correct include path. Also, catch the error
during setup instead of the build by adding the check for meson.build
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
meson.build | 2 +-
util/parse-configs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 42e11aa25cba..a4c4c1cd3df3 100644
--- a/meson.build
+++ b/meson.build
@@ -160,7 +160,7 @@ cc = meson.get_compiler('c')
# keyutils and iniparser lack pkgconfig
keyutils = cc.find_library('keyutils', required : get_option('keyutils'))
-iniparser = cc.find_library('iniparser', required : true)
+iniparser = cc.find_library('iniparser', required : true, has_headers: 'iniparser/iniparser.h')
conf = configuration_data()
check_headers = [
diff --git a/util/parse-configs.c b/util/parse-configs.c
index c834a07011e5..1b7ffa69f05f 100644
--- a/util/parse-configs.c
+++ b/util/parse-configs.c
@@ -4,7 +4,7 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <iniparser.h>
+#include <iniparser/iniparser.h>
#include <sys/stat.h>
#include <util/parse-configs.h>
#include <util/strbuf.h>
--
2.35.1
next reply other threads:[~2022-03-15 6:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 6:04 Aneesh Kumar K.V [this message]
2022-03-15 8:55 ` [PATCH] util/parse: Fix build error on ubuntu Vaibhav Jain
2022-03-15 10:15 ` Aneesh Kumar K.V
2022-03-15 16:46 ` Vaibhav Jain
2022-03-15 17:03 ` Verma, Vishal L
2022-03-15 17:19 ` Dan Williams
2022-03-16 3:50 ` Aneesh Kumar K V
2022-03-16 5:33 ` Vaibhav Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220315060426.140201-1-aneesh.kumar@linux.ibm.com \
--to=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.