Compiling problems - pkg-config search path

Q I'm new to Linux and appreciate 'out of the box' solutions. For example, I use Slackware, and installed Filelight after reading the Install file and doing

./configure && make && su -c "make install"

because the Install file made sense. Now I have tried to compile a program called NoteCase. The readme.txt file is confusing. It says, "Just unpack the archive contents and start the program. Windows users require GTK toolkit installation." Does "Just unpack the archive contents and start the program" refer to the Windows install or the Linux install? If it refers to the Linux install then there are no executables in the extracted archive named notecase-1.7.4_src.tar.gz to run. Then there is a compiling option for Ubuntu only. Since the program is for Ubuntu running Gnome, would you consider when you're writing HotPicks letting users know if it's an application for Gnome or KDE only? I tried running make and got this error message:

/notecase-1.7.4# make ===> Compiling src/main.cpp Package gnome-vfs-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing 'gnome-vfs-2.0.pc' to the PKG_CONFIG_PATH environment variable

A The Readme file for this application is rather confusing. It would appear that the same Readme is used for the source and binary archives, and the one you tried to use is the source one. While the instructions for compilation are for Ubuntu, this is not an exclusively Ubuntu program. Nor does the mention of Ubuntu automatically make it a Gnome program, Ubuntu is quite capable of running KDE programs too, and KDE itself for that matter. In fact, this is a GTK application, although it does require gnome-vfs to be installed. There are two possible reasons for the error you mention: either you do not have gnome-vfs installed, or you do, but pkgconfig is not aware of it. In the latter case, setting PKG_CONFIG_PATH to include the correct directory before running make would fix the problem, like this:

locate gnome-vfs-2.0.pc
export PKG_CONFIG_PATH="directory from
above command"
make

Alternatively, there are binary packages available. The DVD contains RPM and Debian packages, and there is a plain binary tarball on the NoteCase website, which you could unpack to the root directory of your filesystem with

tar xf notecase-1.7.6.tar.gz -C /

An alternative to downloading the binary package, and one that is useful when a binary tarball is not available but an RPM is, is to use the rpm2targz command to convert an RPM to a tarball. Note that you will have to resolve any dependencies yourself when using this approach, so it is best reserved for those occasions when the source is not available.

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar