LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-02-2005, 09:19 PM   #1
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Rep: Reputation: 190Reputation: 190
Where to compile?


Hey all--

I've been using Linux for about 4 years but I'm new to Slackware. I just want to say that I LOVE Slack -- I love how straightforward it is.

Anyway, I am used to RPM's and .debs to install apps. I really never compiled source very often.

So, my question is a "best practices" kind of question:

How do you compile apps? Not the ./configure, make, make install -- I mean, where? Do you download into /usr/src and compile there? Is that reserved for the kernel? If so, do you download and install into /usr/local? Where should the binaries be installed /usr/bin or /usr/local/bin or /usr/sbin? I know about checkinstall and to use that instead of "make install" so that's cool but I'm still trying to figure out where I should do my compiling.

I also see folks use a parameter when compiling like ./configure --prefix=/usr or something like that. What is that and why should I use that?

I guess I'm looking for advice from you Slack veterans on what is the best way to maintain my slack box in terms of compiling and managing packages.

Thanks for your comments.
 
Old 05-02-2005, 09:33 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
I usually download them to my home directory, then I configure & compile and finally use checkinstall to create a package but I switch to root to do that. It's just a matter of taste where you put the sources.
When you compile programs they are installed under /usr/local/ by default, that's why some guys use the --prefix=/usr switch, to install them under /usr instead. I personally prefer to install them in /usr/local. Again it's just a matter of taste.
 
Old 05-02-2005, 09:38 PM   #3
datadriven
Member
 
Registered: Jun 2003
Location: Holly Hill, Florida
Distribution: Slackware 10.1
Posts: 317

Rep: Reputation: 30
Welcome to Slackware.

If you intend to use checkinstall it doesn't really matter where you build your packages. I usually just extract them in my home directory. I usually grab some text off the project's home page to make a decent slack-desc file, rather than just typing in the project name when checkinstall asks for it.

Prefix just tells make where to put the binaries. Depending on who you ask you'll probably get several different answers. Some people will tell you to use --prefix=/usr and some will tell you to use --prefix=/usr/local There are valid reasons for both.
 
Old 05-03-2005, 06:34 AM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
as said, your home dir. is the place to work and by using checkinstall you can keep track of all files.

also, when you compile from source, first thing to do after extracting
is running " ./configure --help ".
this will give a list of options, some standard and some specific to that program.
the options you want to use are then added to the configure-command
like " ./configure --enable-opt1 --enable-opt2 --etc ".

btw.: compiling a kernel can also be done in your home dir.
it's even advised by the kernel team.

egag
 
Old 05-03-2005, 06:37 AM   #5
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
You might be interested in this article I wrote:
http://yves.gablin.club.fr/pc/linux....ftware/install

Yves.
 
Old 05-03-2005, 06:51 AM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
Quote:
Originally posted by theYinYeti
You might be interested in this article I wrote:
http://yves.gablin.club.fr/pc/linux....ftware/install

Yves.
-------------
$ cd /usr/local/src
$ tar xjf /path/to/file.tar.bz2
-------------

how do you do that ?
that dir. is not writable by a user.

egag
 
Old 05-03-2005, 07:18 AM   #7
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
I have created a special user (build), who is only in his own group (build). This way, when I do a make install DESTDIR=<something>, I'm sure nothing ends up in /etc, /bin or /usr.
 
Old 05-03-2005, 07:26 AM   #8
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
I should have written that, you're right! I simply decided, there was no reason to keep users from compiling things in /usr/local/src (only installation is restricted). So I ran (as root):
Code:
chmod 770 /usr/local/src
and all users that are allowed to compile things there (that's only me, actually) are part of /usr/local/src's group.

Yves.
 
Old 05-03-2005, 09:51 AM   #9
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware and OpenBSD
Posts: 740

Original Poster
Rep: Reputation: 190Reputation: 190
Thanks for all the great responses, guys. I appreciate it!
 
Old 05-09-2005, 02:55 AM   #10
drakethegreat
Member
 
Registered: Sep 2004
Location: Seattle, WA
Distribution: None (Linux doesn't support my basic hardware)
Posts: 61

Rep: Reputation: 15
Can the default prefix be changed to /usr instead of /usr/local for example?
 
Old 05-09-2005, 04:28 AM   #11
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Yes.
Code:
./configure --prefix=/usr
 
Old 05-09-2005, 11:41 AM   #12
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,845

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
Also, after the package is extracted, view the Readme's and Install .txt files. There is a lot of useful info in there. It will tell you the default install routes and sometimes includes the various options. Usually, I let it build to defaults as the developer intended. Its rare that I change many options, except for architecture stuff.
 
Old 05-09-2005, 01:07 PM   #13
drakethegreat
Member
 
Registered: Sep 2004
Location: Seattle, WA
Distribution: None (Linux doesn't support my basic hardware)
Posts: 61

Rep: Reputation: 15
No you miss understood. Not a one time sort of thing. I want to set the default for everything.
 
Old 05-09-2005, 02:03 PM   #14
-0-
Member
 
Registered: Nov 2004
Location: London uk
Distribution: Slack 10
Posts: 67

Rep: Reputation: 15
you could set an alias in your .bashrc /.zshrc (if you use zsh) for configure to be ./configure --prefix=/usr


I can't remember the bash syntax for aliases of the top of my head, but that could work (don't use it myself, i include it in the build script instead).


Hope that's of some use

-0-
 
Old 05-09-2005, 02:50 PM   #15
drakethegreat
Member
 
Registered: Sep 2004
Location: Seattle, WA
Distribution: None (Linux doesn't support my basic hardware)
Posts: 61

Rep: Reputation: 15
Ya that seems to be the best option at the moment. It brings up other problems because of restrictions later if you want something besides what the alias is but this isn't for me. I'm actually seeking help for a buddy of mine which I have no idea what he is actually trying to do.
 
  


Reply



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
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM
What does 'compile' mean? Iain1974 Linux - Newbie 15 08-25-2004 08:38 PM
c/c++ compile zdos Linux - Software 2 05-16-2004 03:22 PM
how to compile x for use on another pc??? markkreuzz Red Hat 1 03-03-2004 10:06 AM
compile jakublgz Programming 8 09-05-2002 05:30 AM

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

All times are GMT -5. The time now is 04:46 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