Please fill out the topic template below so we can help you faster.
Description of the Problem, or Question?
I tried building MyPaint from source as mentioned in the github page
I ran python setup.py demo before installing it and I found that I don’t have some dependencies.
libmypaint >= 1.5
pygobject-3.0
lcms2
mypaint-brushes-2.0
I then tried to install libmypaint from https://github.com/mypaint/libmypaint#build-and-install. I looked at it and found that I needed to install some dependencies as well. One of them is https://github.com/json-c/json-c
I have followed the steps there which is
./configure --prefix=/some/install/path
make
make check
make install
I tried to run it again but I got this
checking for JSON... no
configure: error: Package requirements (json) were not met:
No package 'json' 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.
So now I’m confused. The output of make install when installing jason was this
The basic rule of thumb when installing dependencies is:
If the dependency is available in my distribution’s repositories, and the version of that dependency is not too low, use that one instead of building from source.
Elementary OS is a debian derivative using apt/dpkg, so you should be able to install what you need by running: sudo apt-get install libjson-c-dev
You need the -dev variant, since it includes header files required for compilation.
As for why your own build doesn’t work: the build system has no way of knowing that it should look under $HOME/Downloads/json-c/lib/pkgconfig to find information about the location of the files it needs. You can tell it to look there, but in this case I would recommend just using apt-get (or just apt, if you have it).
Thanks for the replies! I didn’t know json-c is in the repos.
I’ve ran the command for installing libmypaint and it seems to works fine as intended.
./autogen.sh # Only needed when building from git.
./configure
sudo make install
sudo ldconfig
I then tried to run python setup.py demo to test it and it still outputs this
Package libmypaint was not found in the pkg-config search path.
Perhaps you should add the directory containing `libmypaint.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libmypaint' found
Package pygobject-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pygobject-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pygobject-3.0' found
Package lcms2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `lcms2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'lcms2' found
Package mypaint-brushes-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `mypaint-brushes-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'mypaint-brushes-2.0' found
The following required dependencies were not found:
libmypaint >= 1.5
pygobject-3.0
lcms2
mypaint-brushes-2.0
I’ve tried to run the check availability section of libmypaint readme and I got this output.
sudo sh -c "echo 'PKG_CONFIG_PATH=/usr/local/lib/pkgconfig' >>/etc/environment"
Now I think this is probably the same problem that you mentioned in your second paragraph. I looked around and found that the file in question in the output (libmypaint.pc) is in /usr/local/lib/pkgconfig. Do you know how to solve this?
Ok, the problem here is that you’re building the 2.0.x branch (or release tarball), which requires libmypaint >= 1.5.0, whereas you have built and installed libmypaint-2.0 (the master branch - and note the dash, it’s not libmypaint 2.0, it’s libmypaint-2.0, a separate package).
I would suggest building the master branch of MyPaint instead (which uses libmypaint-2.0), since that contains additional bug fixes, but if you don’t want to do that you can build/install libmypaint 1.5.0 instead (instructions below).
If you already have a clone of the libmypaint repo, run git checkout libmypaint-v1.5.x (if that branch isn’t there, run git fetch --all) and do the build/install steps again (including running autogen.sh, because some files need to be generated again). That should fix it.
Thanks! I didn’t realize that I was using the source from the tarball in the downloads page. I cloned the master branch from github and it’s fine now just needed to install the remaining dependencies.
I’ve installed the remaining dependencies and I got mypaint up and running now. Thanks a lot @jpll
If anyone wanted to use this thread to build their own mypaint here’s the guide I found on how to install the remaining dependencies (at least on Ubuntu)
lcms2 https://askubuntu.com/questions/1029077/installing-lcms2
pygobject-3.0 https://stackoverflow.com/questions/12861914/no-package-pygobject-3-0-found
mypaint-brushes-2.0 https://github.com/mypaint/mypaint-brushes