LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   why I want to compile in my Linux? (https://www.linuxquestions.org/questions/linux-software-2/why-i-want-to-compile-in-my-linux-387739/)

hongxing 11-29-2005 07:54 PM

why I want to compile in my Linux?
 
when installing software in linux, mostly, it needs us to compile it, not like in
windows. why?

but sometimes we can install and use third party software directory without compiling, why?

can anyone explain in detail?

thanks in advance!

dogbird 11-29-2005 08:40 PM

Because it is open source.

1. sources are always provided.
2. it compiles on many different architectures. yours is different than mine.
3. If you compile it yourself you will know there are no viruses or trojans in the code.
So there are several reasons . So we all need to compile stuff.
josephus

Charred 11-29-2005 08:47 PM

Compiling builds a program optimized for your box. This CAN mean significant performance gains.

Besides, you can't be a true geek if you don't compile your own programs!

number9 11-29-2005 09:05 PM

Because, we're all doing it. :p
It's the coolest thing. :cool:

Read all about it here,
http://www.linuxquestions.org/questi...ticle&artid=15
:D

arrenlex 11-29-2005 11:08 PM

Because windows is very standardised. It comes with one specific set of libraries that Microsoft made for everyone. People making software for windows know exactly what's on your box already because it's the same as everyone else has, so they can give you a ready-made application.

On Linux, because it's open-source, many different versions of everything have sprung up. Someone might be using kde 3.4, which uses libraries that a program built for kde 3.5 won't work on. On windows, everyone is running the same thing.

Compiling allows you to build your application so that it works on your system. It makes sure you fulfil dependencies. It keeps applications small - people who make applications only need to make a 1 MB tarball of the program and tell you what dependencies it has, rather than putting together a 100MB file that includes everything necessary to make it run.

RedHat and Debian, two very major distributions, install some files in different directories. When you compile, the system reports to the compiler what should go where for the system to recognise it correctly. On windows, there is only one version of the operating system, one place to put the files.

Linux is inherently flexible. It comes from being open-source. Thus, the applications made for it have to be created in a manner that allows for flexibility. Compiling does this. But even in Linux, with proper package management, you could get away with having many applications pre-compiled, like on Debian. This is what RPMs are (although without apt-rpm, the whole system is hellish). This is also what Debian does. I run Debian and there's really no application that I regularly use that I've compiled; they've all come from debian packages. I compiled WINE because I don't like the frills Debian puts in and I want the control; I compiled k3b because there's no version in Etch right now; I compiled mplayer because I want to fine-tune the video out drivers to my system. In general, however, I could have gotten all these programs as packages and not have to compile a thing.

hongxing 11-30-2005 03:42 AM

thanks. still has question:
if i update my kernel from 2.4.20 to 2.6.12, can I ran programs that compiled on 2.6.20 on the new kernel?

T.Hsu 11-30-2005 03:47 AM

Yes, you can.

Are you using Redhat 9.0, if so, you need install module-init-tools first.

runlevel0 11-30-2005 04:28 AM

Quote:

Originally posted by hongxing
thanks. still has question:
if i update my kernel from 2.4.20 to 2.6.12, can I ran programs that compiled on 2.6.20 on the new kernel?

If you upgrade the kernel using Red Hat's software manager, you will get every necessary program updated and there will be no problems.

If you are going to compile it yourself you can get into trouble. Normally a faulty kernel would not affect the software you installed: It will simply not boot.

Compile stuff only when it's something very exotic which can't be found using your software manager. There is no sense in compiling most of the stuff as modern processors are optimized themselves to run code written for an i486. There is only a small bunch of programs which will take advantage of recompiling. So better stick with the good ol' RPM packages.

There are tens of thousands of RPM packaged applications, the only thing you need is to learn how to use the package manager in an advanced way so that you can insert new software repositories.

You can also install RPM packages straight form your web browser clicking on links to RPM packages.

Here is an URL where you will find almost any RPM package in the world: RPMSEEK.com.


To have the best experience with Linux, first get comfortable with the software manager and the rest of the software. Then learn to use the console... and then you can start trying to compile some minor packages and finally you will decide whether you want to compile an application or prefer to download it.


All times are GMT -5. The time now is 12:32 PM.