LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-08-2006, 02:35 AM   #1
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 213

Rep: Reputation: 25
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.
 
Old 08-08-2006, 03:22 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
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
 
Old 08-09-2006, 03:03 AM   #3
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 213

Original Poster
Rep: Reputation: 25
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.
 
Old 08-09-2006, 03:20 AM   #4
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,156

Rep: Reputation: 234Reputation: 234Reputation: 234
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.
 
Old 08-09-2006, 12:18 PM   #5
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
Try this instead:

Code:
./configure --prefix=$(kde-config --prefix)
 
Old 08-09-2006, 12:35 PM   #6
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
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.
 
Old 08-09-2006, 02:08 PM   #7
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
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
 
Old 08-09-2006, 06:28 PM   #8
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 32
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:
Code:
`code`
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
Code:
$(code)
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
Code:
expr(expression)
can also be written as
Code:
$((expression))
Which makes sense because anything inside a $() represents a value to be determined.
 
Old 08-10-2006, 12:29 AM   #9
totoro_dth
LQ Newbie
 
Registered: Apr 2006
Location: Camphor tree
Distribution: Slackware 10.2, Zenwalk Core 2.8
Posts: 13

Rep: Reputation: 0
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:

Code:
echo $PATH
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)
 
Old 08-10-2006, 04:10 AM   #10
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 213

Original Poster
Rep: Reputation: 25
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.
 
Old 08-10-2006, 08:25 AM   #11
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
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)
 
Old 08-10-2006, 01:02 PM   #12
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

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


Reply

Tags
prefix


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
./configure --prefix= plan9 Slackware 5 01-03-2013 04:44 AM
./configure --prefix ?? itzig Linux - Software 10 02-03-2006 07:30 PM
./configure --prefix=/??? mykrob Linux - Newbie 7 06-24-2004 09:59 AM
MySQL setup stops at command "./configure --prefix=/usr/local/mysql" k41184 Linux - Software 1 05-20-2004 02:44 PM
prefix argument to ./configure luck___ Linux - Software 2 03-13-2004 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration