altdesktop / i3ipc-glib

A C interface library to i3wm
GNU General Public License v3.0
104 stars 18 forks source link

autogen finding library issue #40

Closed ryan-s-wilson closed 1 year ago

ryan-s-wilson commented 1 year ago

I am running Ubuntu and when I run ./autogen.sh I get the following.

checking for json... no
configure: error: Package requirements (json-glib-1.0) were not met:

No package 'json-glib-1.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables json_CFLAGS
and json_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I have tried a few things but I don't really know what exactly I am supposed to do to fix the issue/can't find any good resources.

when I run locate json-glib | grep -v snap I get

/usr/lib/x86_64-linux-gnu/libjson-glib-1.0.so.0
/usr/lib/x86_64-linux-gnu/libjson-glib-1.0.so.0.400.4
/usr/share/doc/libjson-glib-1.0-0
/usr/share/doc/libjson-glib-1.0-common
/usr/share/doc/libjson-glib-1.0-0/NEWS.gz
/usr/share/doc/libjson-glib-1.0-0/changelog.Debian.gz
/usr/share/doc/libjson-glib-1.0-0/copyright
/usr/share/doc/libjson-glib-1.0-common/changelog.Debian.gz
/usr/share/doc/libjson-glib-1.0-common/copyright
/usr/share/locale-langpack/en_AU/LC_MESSAGES/json-glib-1.0.mo
/usr/share/locale-langpack/en_GB/LC_MESSAGES/json-glib-1.0.mo
/var/lib/dpkg/info/libjson-glib-1.0-0:amd64.list
/var/lib/dpkg/info/libjson-glib-1.0-0:amd64.md5sums
/var/lib/dpkg/info/libjson-glib-1.0-0:amd64.shlibs
/var/lib/dpkg/info/libjson-glib-1.0-0:amd64.symbols
/var/lib/dpkg/info/libjson-glib-1.0-0:amd64.triggers
/var/lib/dpkg/info/libjson-glib-1.0-common.list
/var/lib/dpkg/info/libjson-glib-1.0-common.md5sums

So I thought that maybe changing line 22 in configure.ac to PKG_CHECK_MODULES([json], [libjson-glib-1.0]) in order reflect my distros name of json-glib might help. I also tried running ./configure LDFLAGS='-L/usr/lib/x86_64-linux-gnu/ -Wl,-rpath,/usr/lib/x86_64-linux-gnu/' with and without the change to line 22 based an email chain that I found. None of it works.

ryan-s-wilson commented 1 year ago

totally didn't see that there is a libjson-glib-dev package in ubuntu. It works now.