Compiling MyPaint: documentation errors?

When compiling MyPaint from source, I ran into two problems with the documentation.

The first is easy enough to fix:

echo PKG_CONFIG_PATH=/usr/local/lib/pkgconfig >>/etc/environment

should read

echo PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ >> /etc/environment

since the trailing slash seems to be a requirement for actually finding libmypaint. Might also be a good idea to direct it into ~/.bashrc instead since that won’t require a restart and is more user-specific?

The only reason I didn’t just submit a pull request to fix that was because I’m not sure if a pull request should include the second problem I ran into: running sudo ldconfig wasn’t enough for me to get MyPaint to recognize that the library was installed.

The so files for me ended up being located under /usr/local/lib/mypaint, but the demo build wouldn’t launch until I symlinked them to /usr/local/mypaint, even though pkg-config --list-all | grep -i mypaint could find them no problem.

I’m on Manjaro Linux, and I’m installing the source alongside a packaged installation from the pacman repos. It’s possible I just messed something else up or that my distro setup is atypical and this isn’t a normally needed extra step?

Not 100% sure about Manjaro, but for Arch I had to manually enable the usr/local/lib directory:

echo '/usr/local/lib' > /etc/ld.so.conf.d/usrlocal.conf
ldconfig

See: /usr/local/ on Archlinux · GitHub

@danshumway can you see if toniw’s solution alone can fix your build issues? I can’t find anything on the Internet that would suggest PKG_CONFIG_PATH is sensitive to trailing /. I’m thinking maybe that was a red-herring?

Will do. Manjaro is based off of Arch, so there’s a good chance.

Sorry to take so long to respond to this.

I rebuilt with @toniw’s suggestion and looks like that solves the problem - surprisingly, not only does it also get rid of the extra slash requirement for PKG_CONFIG_PATH, leaving the ending slash off seem to be actually required once usr/local/lib is required.

It would still be kind of nice to have the extra command documented; if it effects Arch/Manjaro I suspect it might trickle down to Fedora as well. Unfortunately I don’t run Fedora anywhere that I could check quickly.

Thanks for testing. I did add a note for Arch and derivatives