LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   minimum needed to compile sources (https://www.linuxquestions.org/questions/linux-newbie-8/minimum-needed-to-compile-sources-863996/)

Adol 02-21-2011 04:28 AM

minimum needed to compile sources
 
Hello,

I'm pretty new to the linux terminal and trying to do everything with it lately.

I want to practice compiling programs and such. It's working for me now with no problems on OpenSuse 11.3 but I have so many compilers and dev packs installed that I dont really know whats being used. Eventualy I want to keep and use only whats really needed.

My question is:

1. Is there a list of programs that need to be installed in order to compile anything or do I need different things for different programs.

For example do I need different things installed to compile mplayer vs atidrivers.

2. What are the minimum programs needed to compile?

I know there are many RPMs available and its safer to use them but this is my test machine I want to use to learn the insides and processes of linux so if I really mess it up its no problem.

NitinkumarYemul 02-21-2011 04:55 AM

I don't think there is list of programs that you install and it will compile everything. Different programs uses different libraries and depending on that you can install required packages. For example mplayer uses different codec libraries and games uses different graphics libraries.

i92guboj 02-21-2011 05:09 AM

Quote:

Originally Posted by Adol (Post 4265681)
Hello,

I'm pretty new to the linux terminal and trying to do everything with it lately.

I want to practice compiling programs and such. It's working for me now with no problems on OpenSuse 11.3 but I have so many compilers and dev packs installed that I dont really know whats being used. Eventualy I want to keep and use only whats really needed.

Experience will tell you.

Quote:

My question is:

1. Is there a list of programs that need to be installed in order to compile anything or do I need different things for different programs.

For example do I need different things installed to compile mplayer vs atidrivers.
Different programs will have (probably) different requirements. For a starter, there are thousands of programming languages. You will need a different compiler for each language (well, for most of them). For example, if you program is written in C++ you you need g++ to compile it (or another C++ compiler). If your program is written in C then your compiler is gcc. If your program is written using Gambas you will need such environment to compile it. Java programs will need the java compiler and probably the java run time environment. The list continues: perl, lisp, python, etc. You get the idea.

Then there are libs. A qt-based program will need qt installed on your system AND the development stuff for QT. Some programs will need the kernel sources or at least the headers (ati-drivers, and most drivers, definitely do need this). Some program could use SDL to do the drawing or sound output, some others could use allegro, libao or alsa directly, or maybe phonon, gstreamer, xine, or whatever else.


Quote:

2. What are the minimum programs needed to compile?
A good starting point is the gnu toolchain, which includes binutils, the gnu C compiler and some common tools like "make".

Quote:

I know there are many RPMs available and its safer to use them but this is my test machine I want to use to learn the insides and processes of linux so if I really mess it up its no problem.
You might be interested in LFS (linux from scratch).

Adol 02-21-2011 06:21 AM

Quote:

Originally Posted by i92guboj (Post 4265706)

You might be interested in LFS (linux from scratch).

Thanks for the information.

Actually I'm planning to use LFS after I learn the fundamentals a little with OpenSuse.

So basically I should install many dev packs, compilers and libs? Are these usually listed in the source documentation?

i92guboj 02-21-2011 08:17 AM

Sources can come in a number of ways. Most commons are compressed packages of some kind (tar.*, 7z, zip...) or from some kind of rcs repository (via cvs, svn, bazaar, git...). In any case, once you download and/or uncompress the package, most likely you will find some kind of README or INSTALL file(s) which should list the dependencies and whatever special requirements you might need to meet to compile the package.

What packages you will need to install will often depend on your distro. On binary distros, source and header packages usually are named like something-dev or something-devel, in Gentoo you get this for free, because of its nature (being a source-based metadistro).

jschiwal 02-21-2011 08:33 AM

You can add an RPM source repository in YaST2. Often when a package needs a library, you will need the *-devel version of those same libraries. You will need to install of those libraries, but the more packages you build, the less you will need in the future.

Be sure to run "./configure --help" to see what build options are available.

Adol 02-21-2011 09:02 AM

Thank you very much everyone.


All times are GMT -5. The time now is 07:39 AM.