LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2011, 05:21 AM   #1
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Rep: Reputation: 45
How to compile source code files?


I have download loaded squid 2.6 source code file squid-2.6.STABLE22.tar.gz
I extract the file with the command
Code:
[root@localhost home]#tar xvfz squid-2.6.STABLE22.tar.gz
Now I can see a folder quid-2.6.STABLE22.

The issue is I want to compile the it.I can see files Makefile.am , Makefile.in , configure,configure.in and INSTALL.

There are more files and folders but I think that these are the files which I have to deal with.

I does't have any idea how can I compile the files or what ever steps should take after extracting the tar file..Please guide me.
Thanks many times in advance.
garden
 
Old 02-03-2011, 05:31 AM   #2
goossen
Member
 
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
Look for the README or INSTALL files, they will instruct you.

You might run ./configure to check everything is on place and change default values; then something like make, make install. Every package has its custom values, check the documentation.
 
Old 02-03-2011, 05:34 AM   #3
alar
Member
 
Registered: Sep 2003
Location: Canada
Distribution: Fedora 30
Posts: 341

Rep: Reputation: 37
./configure
./make
./make install

Assuming you have the C development files already installed...
 
Old 02-03-2011, 05:41 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
From the INSTALL FILE
Quote:
To build and install the Squid Cache, type:
% ./configure --prefix=/usr/local/squid
% make all
% make install
However, why don't you use the package manager from your distro to install squid?

Kind regards
 
Old 02-03-2011, 10:44 PM   #5
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
Thanks "repo" for the valuable suggestions. I read in the INSTALL also and it say

To build and install the squid Cache,type:

Code:
[root@localhost squid-2.6.STABLE22]# % ./configure --prefix=/urs/local/squid
bash: fg:  %.configure: no such job
[root@localhost squid-2.6.STABLE22]#
Please guide me.
 
Old 02-03-2011, 10:48 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
Quote:
Originally Posted by gardenair View Post
# % ./configure --prefix=/urs/local/squid
That should almost certainly be /usr/local/squid.

Learn more about the linux directory structure:

http://tldp.org/LDP/intro-linux/html/sect_03_01.html
 
Old 02-04-2011, 12:02 AM   #7
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
I know linux directory structure. I even move the folder inside /usr/localand try to execute the command as

[CODE][root@localhost local]# ./configure --prefix=/urs/local/squid
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build enviroment is same... yes
checking for gawk... gawk
checking whether make sets $ (MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles...no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
see 'config.log' for more details.
[root@localhost local]

Yes there is No C compiler in my Linux box.I shall fix it.

Last edited by gardenair; 02-04-2011 at 01:10 AM.
 
Old 02-04-2011, 02:00 AM   #8
gardenair
Member
 
Registered: Oct 2004
Location: LH
Posts: 648

Original Poster
Rep: Reputation: 45
well I have install c compiler in my linux box. After that I apply the commands

./configure --prefix=/usr/local/squid
make all
make install

all these work successfully.I can see squid folder in /usr/local folder.all these work successfully.I can see squid folder in /usr/local folder. The new thing for me is that there is no squid.conf file in it but it is in /usr/local/squid/etc folder ?
kindly guide me.

Last edited by gardenair; 02-04-2011 at 02:23 AM.
 
Old 02-04-2011, 04:47 AM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
but it is in /usr/local/squid/etc folder
Since you used
Quote:
prefix=/usr/local/squid
Everything is placed in
Quote:
/usr/local/squid
Kind regards
 
  


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
How to compile a source code elishac Linux - Newbie 19 01-15-2010 02:18 AM
compile jarred source code kpachopoulos Programming 1 06-02-2007 07:09 AM
Why can't FreeBSD compile anything from source code? mortal *BSD 5 03-21-2005 07:49 PM
how i compile a source code? nazib Linux - General 5 02-27-2005 09:13 AM
How to compile source code... Grim Reaper Linux - Newbie 3 04-26-2002 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 PM.

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