2

I am attempting to use make to compile purple-facebook, a plugin for pidgin.

It requires json-glib, which I have installed, but whenever I attempt to compile, it returns

fatal error: json-glib/json-glib.h: No such file or directory.

I've tried creating a symlink in /usr/include named json-glib linking to json-glib-1.0, but this results in it repeatedly outputting

gcc: warning: /var/cache/apt/archives/libjson-glib-1.0-0-dbg_1.0.2-1_armhf.deb: linker input file unused because linking not done.

I'm running Raspbian, a distro based on Debian. What can I do to get this thing to compile?

2

I'm not a Rasbian user, but I'm assuming that you've just installed the JSON GLib libraries. You also need the header files. These are available in the json-glib-dev package.

As a general piece of advice: If you find yourself moving things (libraries, binaries) around as root, or creating symlinks here and there, then it is highly likely that you're doing something wrong and that there's a better way of doing it.

  • I have those installed; still does not work. If it makes any difference, this is ARM. – Precipitato Jul 22 '16 at 3:26
  • @Precipitato The architecture makes no difference. It doesn't even make a difference that you're on Rasbian rather than OS X or Minix if you have all prerequisites installed, as far as I know. Update your question with relevant information about how you invoke make and if you ran a configure script or similar, what flags you passed to it. – Kusalananda Jul 22 '16 at 6:34
1

Install the package libjson-glib-dev. It and its dependencies contain the files you need.

json-glib/json-glib.h is under /usr/include/json-glib-1.0. so the symbolic link you created is not useful. Remove it (it may confuse configure scripts). To get the compiler to search for header files under /usr/include/json-glib-1.0, you need to pass the option -I /usr/include/json-glib-1.0. But don't do that manually: call pkg-config, which includes this and other necessary options. You need to ensure that the flags passed to the C compiler include `pkg-config --cflags json-glib-1.0`, and the link flags include `pkg-config --libs json-glib-1.0`.

Running ./autogen.sh should generate makefiles with the appropriate options. If you ran it before you had all the required libraries installed, run ./configure again; this will call pkg-config with the appropriate options and generate a new Makefile. Then type make to build.

To build the Debian package, installing the dependencies and then running dpkg-buildpackage should be enough (at least under jessie, I haven't checked if the requisite libraries exist in wheezy). If that doesn't work, copy-paste all the commands you ran and their full output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.