LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-02-2006, 06:14 PM   #1
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Rep: Reputation: 30
./configure --prefix=/usr [default: /usr/local] why???


Hey people! I was having a problem about installing a new version of gtk, atk, glib, cairo and pango as described in this thread:

http://www.linuxquestions.org/questi...d.php?t=457899

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.

Thanks!

Last edited by stevesk; 07-02-2006 at 06:18 PM.
 
Old 07-02-2006, 07:21 PM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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...

Last edited by win32sux; 07-02-2006 at 07:23 PM.
 
Old 07-02-2006, 07:50 PM   #3
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
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
 
Old 07-02-2006, 07:52 PM   #4
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 917

Rep: Reputation: 87
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.

Last edited by Ilgar; 07-02-2006 at 07:53 PM.
 
Old 07-02-2006, 08:18 PM   #5
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
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.

regards,
...aaron
 
Old 07-02-2006, 09:00 PM   #6
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
Hey! Thanks for the answers...so in another dists. there is already a PATH to /usr/local?
 
Old 07-02-2006, 09:08 PM   #7
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by stevesk
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...

Last edited by win32sux; 07-02-2006 at 09:09 PM.
 
Old 07-02-2006, 10:56 PM   #8
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
Thanks! But where do I edit the PATHs?
 
Old 07-02-2006, 11:08 PM   #9
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by stevesk
Thanks! But where do I edit the PATHs?
you can edit the /etc/profile file...

to *see* what's in your current $PATH do a:
Code:
echo $PATH
 
Old 07-02-2006, 11:20 PM   #10
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
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`
 
Old 07-02-2006, 11:35 PM   #11
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
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?
 
Old 07-03-2006, 12:43 AM   #12
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 917

Rep: Reputation: 87
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...
 
Old 07-03-2006, 12:56 AM   #13
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
Quote:
Originally Posted by stevesk
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
 
Old 07-03-2006, 12:57 AM   #14
stevesk
Member
 
Registered: Dec 2004
Distribution: Slackware-current
Posts: 207

Original Poster
Rep: Reputation: 30
Ilgar, thanks again!

I always remove the packages using pkgtool before installing new ones...

I think I am making a "tunned Slackware" here :P . Uninstalling many of the original packages and installing newer versions from the source heheheh...
 
Old 07-03-2006, 06:28 AM   #15
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware 14.1, Slackware64 14.1
Posts: 917

Rep: Reputation: 87
But slackware-current's gtk is already up-to-date. Of course if you're trying the unstable 2.9 branch, then yes, you need to compile yours.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
/usr vs /usr/local on linuxpackages.net merchtemeagle Slackware 4 10-18-2005 03:09 PM
cannot configure: permission denial in '/usr/local/lib/' sophiatang Red Hat 1 09-01-2005 08:29 PM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM
MySQL setup stops at command "./configure --prefix=/usr/local/mysql" k41184 Linux - Software 1 05-20-2004 02:44 PM


All times are GMT -5. The time now is 01:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration