Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iniparser.h include #186

Closed
wants to merge 1 commit into from
Closed

Conversation

felixonmars
Copy link
Contributor

In configure.ac iniparser.h was checked without a path too, this change makes it consistent and fixes building on Arch Linux which has the header installed in /usr/include directly.

In configure.ac `iniparser.h` was checked without a path too, this change makes it consistent and fixes building on Arch Linux which has the header installed in /usr/include directly.
@stellarhopper
Copy link
Member

@felixonmars Looks good, thanks. I'll merge this manually (so proper signoffs can be added). I'll also create a v72.1 release with this fix as it can affect many distros.

stellarhopper pushed a commit that referenced this pull request Jan 5, 2022
In configure.ac `iniparser.h` was checked without a path too,
this change makes it consistent and fixes building on Arch Linux
which has the header installed in /usr/include directly.

Reported-by: Joao Martins <[email protected]>
Signed-off-by: Felix Yan <[email protected]>
Signed-off-by: Vishal Verma <[email protected]>
Link: #186
@stellarhopper
Copy link
Member

Applied manually, and released v72.1

@suyashmahar
Copy link

@stellarhopper I had to revert this change and add the path to configure.ac. I couldn't build NDCTL without these changes on ubuntu 20.04.3.
Seems like iniparser.h is under /usr/include/iniparser/ for Debian.

diff --git a/configure.ac b/configure.ac
index 1b18ed7..85ba9ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,7 +212,7 @@ ndctl_keysreadme=keys.readme
 AC_SUBST([ndctl_keysdir])
 AC_SUBST([ndctl_keysreadme])

-AC_CHECK_HEADERS([iniparser.h],,[
+AC_CHECK_HEADERS([iniparser/iniparser.h],,[
                  AC_MSG_ERROR([iniparser.h not found, install iniparser-devel, libiniparser-dev, or so])
                 ])

diff --git a/util/parse-configs.c b/util/parse-configs.c
index c834a07..1b7ffa6 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>

rli9 pushed a commit to intel/lkp-tests that referenced this pull request May 27, 2022
The iniparser.h's path is different for different distributions.
For arch the path is /usr/include.
For ubuntu/debian the path is /usr/include/iniparser

Fix following issue:

```
../util/parse-configs.c:7:10: fatal error: iniparser.h: No such file or directory
    7 | #include <iniparser.h>
```

makepkg RT:

```
{
  "makepkg.pass": [
    1
  ]
}
```

Link: pmem/ndctl#186
Signed-off-by: Zou Yu <[email protected]>
Signed-off-by: Philip Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants