Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-08-2006, 03:35 AM
|
#1
|
Member
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 231
Rep:
|
Howto use - - prefix in a ./configure command
I am trying to install amarok on Slackware from source, (tried the .tgz package with no luck). After compiling all the dependency. I am ready for configuring amarok. I just don,t know the proper way of using the --prefix in a ./configure command. Before i mess to much my installation i got to ask how to edit a --prefix line.
When an installation readme file says to (./configure --prefix=`kde-config --prefix`),what those it mean and how should i write that line.
I wrote this ./configure --prefix=/the_path_to_that_kde-config/ but with no luck...
I am sure that i am writing that --prefix line wrong.
|
|
|
08-08-2006, 04:22 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,220
|
You should run the ./configure script as it's given in the istallation readme, i.e.
Code:
/configure --prefix=`kde-config --prefix`
This way, assuming kde-config is in your PATH ( it should be), it will be executed with the "--prefix" which will give the path to your kde installation dir. It's the same as
Code:
/configure --prefix=/opt/kde
|
|
|
08-09-2006, 04:03 AM
|
#3
|
Member
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 231
Original Poster
Rep:
|
i had to do it like this ./configure --prefix=/opt/kde because the exemple in the readme file did not work. Thank you for your help. 
|
|
|
08-09-2006, 04:20 AM
|
#4
|
Senior Member
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,158
|
It should've worked. Maybe you used "su root" before that, then kde-config would be outside the $PATH variable. You can use "su - root" (or just "su -") to avoid such things.
|
|
|
08-09-2006, 01:18 PM
|
#5
|
Member
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Rep:
|
Try this instead:
Code:
./configure --prefix=$(kde-config --prefix)
|
|
|
08-09-2006, 01:35 PM
|
#6
|
Member
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606
Rep:
|
That won't make a difference. The reason why it didn't work is because he is running the kde-config command as root, and kde-config is not in his path by default when he is root, so he gets a command not found, so essentially he is using
./configure --prefix=
kde-config: command not found
as his prefix. The best option would be to type the prefix in ./configure as a standard user who has kde-config in his path, that way, when kde-config --prefix is run, you get the proper directory, in this case /opt/kde, and that /opt/kde goes in the place of the two "``".
But ultimately in this case
./configure --prefix=/opt/kde and
./configure --prefix=`kde-config --prefix` and
./configure --prefix=${kde-config --prefix)
All do the same thing, as long as the binary "kde-config" is in the path of the user that you are trying to execute the ./configure as.
|
|
|
08-09-2006, 03:08 PM
|
#7
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
Another possibility is that Davno did not see the backticks (the ``) around the command and used '' instead.
The expression `some_command` (i.e. using backticks) is an equivalent to running the command "some_command" and using it's return value in the surrounding commandline.
Eric
|
|
|
08-09-2006, 07:28 PM
|
#8
|
Member
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348
Rep:
|
Just a pointless tidbit of information:
My old networking professor is a unix/linux guru and we had this little thing in class one day.
The: syntax (backquote, backtick) is actually called a "grave" in unix language. It's pronounced graav.... with a long A, silent E.
He said the only reason why we were learning about it is so that we could recognize it when looking over older scripts. But that in current practice, we should use unless we're working on older machines that don't recognize the new syntax.
The main reason being that the grave (`) character itself is too hard to distinguish between the single quote (') and the mistaken syntax "could cause mass roits among confused people not knowing why a script isn't working." (A memorable line indeed...  )
He also said that it "just makes more sense" now that can also be written as Which makes sense because anything inside a $() represents a value to be determined.
|
|
|
08-10-2006, 01:29 AM
|
#9
|
LQ Newbie
Registered: Apr 2006
Location: Camphor tree
Distribution: Slackware 10.2, Zenwalk Core 2.8
Posts: 13
Rep:
|
The error is that bash can not find kde-config in your $PATH,
be sure that <kde_bin_path> is in you $PATH, check with:
if it's not there, so you should include it:
Code:
export PATH=<kde_bin_path>:$PATH
# export PATH=/opt/kde/bin:$PATH
after that you can run configure:
Code:
./configure --prefix=<kde_path>
#or
./configure --prefix=`kde-config --prefix`
#or
./configure --prefix=$(kde-config --prefix)
|
|
|
08-10-2006, 05:10 AM
|
#10
|
Member
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 231
Original Poster
Rep:
|
The reason it was not working is that i was configuring as root so it was not in the PATH. I always tought that you untar as user and did the rest as root. Another question is: if i would have configure as a user, will the program work for other user on that machine ? As for the backtick, i knew about it, i copy and pasted it because i dont have that key on my keyboard Or its very well hidden. 
|
|
|
08-10-2006, 09:25 AM
|
#11
|
Member
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606
Rep:
|
Quote:
Originally Posted by Davno
The reason it was not working is that i was configuring as root so it was not in the PATH. I always tought that you untar as user and did the rest as root. Another question is: if i would have configure as a user, will the program work for other user on that machine ? As for the backtick, i knew about it, i copy and pasted it because i dont have that key on my keyboard Or its very well hidden. 
|
I have a standard en_US keyboard, and my ` key is next to my 1, and if I hold shift + ` I get the ~.
Also, you should pretty much always untar the binary as user, then run ./configure and make as user, and then only run make install as root.
As long as you run make install as root, then it doesn't matter who configured it or built it, anybody can use it(unless it is a root only program that installs in /sbin)
|
|
|
08-10-2006, 02:02 PM
|
#12
|
Member
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Rep:
|
Many linux users would GLADLY ignore easier to recognize syntax like $(...) just so that they can use something that's relatively unknown and 1337. FACT.
|
|
|
All times are GMT -5. The time now is 02:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|