SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As you can see, ./configure from atk was not finding glib, because it was installed in /usr/local . So I needed to use ./configure --prefix=/usr not only on glib but in all the other packages . My question is: why? I am still a little nb in Linux and I don't understand why ./configure doesn't find glib in /usr/local, why it has to be in /usr and if there is any way to change that.
that's just the "slackware way" as far as locations are concerned... pretty much all of the packages you build for slack will need --prefix=/usr specified for ./configure, unless the default install prefix is already /usr, of course... sometimes you can get away with a /usr/local prefix, and sometimes you can't... my suggestion would be to use /usr whenever possible...
some programs need to be referenced in the pkgconfig path.
if a configure can't find the dep it's looking for it
will usually tell you this and how to manually specify
a different path. if libs are concerned, you would need
to make sure their path is defined in your ld.so.conf
According to the stadards, /usr/ contains the distro-provided packages. Add-on packages are supposed to go to /usr/local (or sometimes /opt).
Slackware-current already has up-to-date versions of gtk etc. If you install a custom compiled package to /usr/loal you can make configure use it by passing suitable arguments (usually like --with-gtk-dir). Probably you will also need to set PKG_CONFIG_PATH to /usr/local as the .pc files of your compiled packages will be in /usr/local/pkgconfig.
I usually do a './configure --help' before I begin to see what options I can pass to the configure. More often then not, there will be an option to specify the location of dependencies.
Hey! Thanks for the answers...so in another dists. there is already a PATH to /usr/local?
i think /usr/local/bin should already be in your $PATH for normal users and root, while /usr/local/sbin should be only in root's $PATH... also, /usr/local/lib should already be in your /etc/ld.so.conf...
if you need to modify the pkgconfig path...
you can just type it on the command line
before running configure.
eg `PKG_CONFIG_PATH=/dir1:/dir2:/dir3:etc`
Thanks guys! So, according to what Ilgar said, about the standards for /usr and for /usr/local, would be a wise idea to install programs which other programs don't depend in /usr/local and programs and libraries which other programs depend to compile/run into /usr?
Since /usr/ is supposed to contain the official installations provided by the distro, I wouldn't install there unless necessary. I install things like games, amsn, kile, wine, teamspeak, skype etc. under /usr/local/ or /opt/. If I were to install gtk I'd first remove the installed ones and then install mine to /usr, however. There could be programs expecting to find gtk there. Installing to /usr/local should also be fine (pkg-config will tell the applications where gtk is) but who knows what kind of oddities may come up...
If one day you replace your own gtk with official packages, make sure it's uninstalled properly (use checkinstall to make a tgz package for example). Otherwise two different gtks may appear as installed and you'll have some headache when compiling programs...
Thanks guys! So, according to what Ilgar said, about the standards for /usr and for /usr/local, would be a wise idea to install programs which other programs don't depend in /usr/local and programs and libraries which other programs depend to compile/run into /usr?
if they are both on the same partition
it really doesn't matter at all
in fact, putting just about everything
in /usr would be the easier route there
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.