Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-21-2007, 07:33 PM   #1
LQ Newbie
Registered: Mar 2005
Posts: 12

Rep: Reputation: 0
get, modify and compiling source code

Hi all,

I was wondering if somebody knows where to find a How-to, article or whatever related to what I'd like to do.
This is I'd like to get a source code from a particular package, I know this is possible by using apt-get source command and in fact there are some articles I've read in Debian web site but I'd like to go a little bit far I mean, once I have downloaded the code I'd be interested in modifying and compiling it.

Any comment related to this issue will be welcome.

Thanks in advance.
Old 03-21-2007, 07:43 PM   #2
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Well done? As long as you know how it was put together and can program you should be fine.
Old 03-21-2007, 07:53 PM   #3
LQ Newbie
Registered: Mar 2005
Posts: 12

Original Poster
Rep: Reputation: 0

yes, for sure when I'm talking of modifiying the code I know that's a thing I have to make it alone , my request is if someone knows about an example article that includes step by step, with an example, the way to proceed.

Sorry for the missunderstanding.

thanks in advance.
Old 03-22-2007, 02:44 AM   #4
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Well, you don't need an article... If you've done much programming, it should be straightforward.

The traditional way I do it is:
  1. go to Freshmeat
  2. search for the package name
  3. download the most recent tarball
  4. create a temporary workspace to work in
  5. un-tar the tarball into the workspace
  6. start modifying the code

When you're ready to compile, run the configure script (if one was provided - and you only need to run it once), and then issue "make" as usual. Then after it finishes compiling, try out your new version by running it from within the workspace before copying/installing it into the system.

Which step are you having trouble with?
Old 03-22-2007, 05:00 AM   #5
LQ Newbie
Registered: Mar 2005
Posts: 12

Original Poster
Rep: Reputation: 0

first of all thanks for your comments.

That's not a particular point that I'm having troubles with. I have just begun to work with Linux and I didnīt have a clear idea how the programming environment works, in terms of where the header and libraries are for example, and in case I'd like to modify and compiling a source code if I had to change or referencing those headers or libraries in a particular way so I read that Debian had an application which was able to download the code sources for whatever package you want, I'm talking about apt. I have just know, by your commments, that I can go to Freshmeat web site in order to download sources from there, I suppose Debian also can manage getting sources from this website through apt, am I right? how can we do this?

again, thanks for your feedback.

Old 03-22-2007, 06:27 AM   #6
Harmaa Kettu
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
This seems to be exactly what you were asking for.
Old 03-22-2007, 08:16 AM   #7
LQ Newbie
Registered: Mar 2005
Posts: 12

Original Poster
Rep: Reputation: 0

thanks Harmaa, yes it's an approach, although after reading the post comments, if you check the last one you could see that there is a guy who is asking the same as me, the post is:


I'm trying to modify apache source.

That's what i did

apt-get update
apt-get source apache

to get the source, but...

I actually can't find any c.file !

Clearly i've got lots to learn.

I googled massively on the subject, but i didn't find a practical example of:

- getting debian package (source, of course)
- unpacking it
- modify sources
- repackage it

What am i missing ?




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
compiling source code BoredStudent Linux - Desktop 1 10-26-2006 09:09 AM
Compiling hplip source code. hscast Linux - Software 4 06-16-2006 08:36 PM
compiling source code bishalpoudyal Linux - Software 1 04-08-2006 04:40 AM
which file to edit to modify source code in red hat 9.0 vinaymudgil007 Linux - Software 1 11-17-2005 07:38 AM
compiling quake 2 source code hylke Programming 2 11-28-2004 12:02 PM > Forums > Linux Forums > Linux - Newbie

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

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