Can't build from git source because of ini_parse
janemba opened this issue · comments
Hello,
I'm trying to build xdg-desktop-portal-wlr
but at ninja -C build
step I got the following error:
$ ninja -C build
ninja: Entering directory `build'
[1/3] Compiling C object xdg-desktop-portal-wlr.p/src_core_config.c.o
FAILED: xdg-desktop-portal-wlr.p/src_core_config.c.o
ccache cc -Ixdg-desktop-portal-wlr.p -I. -I.. -I../include -Iprotocols -I/usr/include/elogind -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -D_POSIX_C_SOURCE=200809L '-DSYSCONFDIR="/usr/local/etc"' -DHAVE_LIBELOGIND=1 -D_REENTRANT -MD -MQ xdg-desktop-portal-wlr.p/src_core_config.c.o -MF xdg-desktop-portal-wlr.p/src_core_config.c.o.d -o xdg-desktop-portal-wlr.p/src_core_config.c.o -c ../src/core/config.c
../src/core/config.c: In function ‘init_config’:
../src/core/config.c:191:13: error: implicit declaration of function ‘ini_parse’; did you mean ‘ini_close’? [-Werror=implicit-function-declaration]
191 | if (ini_parse(*configfile, handle_ini_config, config) < 0) {
| ^~~~~~~~~
| ini_close
cc1: all warnings being treated as errors
[2/3] Compiling C object xdg-desktop-portal-wlr.p/src_screencast_wlr_screencast.c.o
ninja: build stopped: subcommand failed.
I grepped the function ini_parse
in the source and I got this:
$ grep -rnH ini_parse .
./src/core/config.c:191: if (ini_parse(*configfile, handle_ini_config, config) < 0) {
So, where this function come from ?
Thanks
Apparently it come from iniparser
library. I installed it but I have still the same issue.
However, I noticed this during the build:
Run-time dependency wayland-protocols found: YES 1.25
Run-time dependency inih found: YES undefined
Run-time dependency gbm found: YES 21.3.5
And in meson.build:
iniparser = dependency('inih')
EDIT: inih
not iniparser
it seems -linih
is missing while compiling.
How can I add -linih
in meson build system ?
libini
include file (ini.h
) was loaded by the build system instead of ini.h
from inih
library.