How do I compile?
I'm new to Linux, and I don't know how to compile software. I want to compile the latest VLC source code so that I can have a kick ass media player for Linux. I run Mandrake 2005 LE. Do I need certain software, or just commandlines? Thanks.
|
Hello!
Usually you unpack the arhive and switch to this one in the console/terminal, there: Code:
./configure Read: Compiling Programs from Source by Jeremy Good luck! Boby |
EliasAlucard:
Boby has a really good set of links you should really check out. When you download the source tarball (*.tar.gz) you can usually find a file inside it called "readme" or something. Provided you have a complete distribution, you should be able to just follow the instructions. You need the terminal (command line) and the make utility with an up to date version of gcc. So, update gcc and make as soon as you can. Then try compiling your first software. However, I'd suggest you practise on something quite simple first. Try downloading and installing the latest version of xmms or similar. |
All right, I'll try that when I have more time. One question though: what's gcc? And where can I find the source code for xmms? Thanks for all the help guys, really appreciate this.
|
Oh dear ... linux comes with a really neet thing called a "man" page. type "man gcc" at a terminal prompt and read away :)
It's the same with any of the linux commands. Another good one to know as a newbie is "apropos". If you want to know about something but don't know what to ask, try "apropos thingy" for eg. apropos kernel will produce a long list - all with the word "kernel" in each line. The first word is the command referred to. For eg. near the bottom I see "tux" starting a line. If I type man tux, I get a description of what the command does and how to use it. Another neet thing is the world wide web :) google "xmms source" and follow your nose. |
check out the vlc man page and see if you can get a package for it. as mentioned above, you probably don't want to start of with compiling vlc, it's not ./configure, make, make install and done. check out the vlc website, see how many of the dependencies you already have installed ( vlc has alot of dependencies).
|
Quote:
|
http://urpmi.notix.net/
Follow the very easy instructions, and it will give you easy access to tons of software programs packaged just for Mandriva, thru it's package installer. |
Quote:
|
EliasAlucard: http://www.urpmi.org/
That tells you about urpmi. Basically, it's the mandrake/ivia version of rpm for red hat. With this installed, you will minimise your need to compile things directly - yourself. In general, whenever you get stuck on something in a message from your computer/OS - try googling the confused thing first. The site above was second from the top in the google search, the top one was a site handling downloads. I thought that this came with the default installations - try: man urpmi for details. |
So far, I've had no success with compiling from source. I always get some kind of error.
|
OK - have you got urpmi yet? (What is the output of "man urpmi"?)
Give me an example of you compiling something from source. Show me: 1. gcc version, make version 2. tarball name 3. describe unpacking the tarball 4. summarise the readme and install notes from the tarball 5. ./configure results (if appropriate) 6. make results (only post errors or the last 5 lines if no errors) 7. make install results (only post errors or last five lines if no errors) (5-7 will vary according to the instructions in the readme and install notes) If you want to figure it out yourself - google the first error in the output, along with the name of the program you are trying to compile. In general, compiling from source is the most reliable way of getting programs working on your computer - binary rpms often have odd dependancies or rely on a small quirk of architecture. However, you must have all the libraries installed and have up to date versions of make and gcc. |
So I tried the latest xmms (xmms-1.2.10) as someone here suggested. I did exactly like Boby said. It's not always the same error message, but it's always something similar; if it's not this, then it's that, you know? I don't know, could it be that i've installed Linux in a poor way? Anyway, here goes:
Quote:
|
Ack Ack Ack ... pfft. Last five lines or the error please :)
<Simon climbs out from under a mountain of printout ...> Here's the error: Code:
checking for GLIB - version >= 1.2.2... no If it is not there, then you need to install glib before you can install xmms. Usually best to get libraries as rpm's or similar if you can. If it is there, but it is somewhere like /usr/glib instead of /sbin or similar then you need to check that the location is in your path (echo $GLIB_CONFIG). It probably isn't there. You have two options... 1. create a symbolic link called glib.conf somewhere in your path, and point it at the real glib.conf. 2. append the path to glib.conf to your path evironment variable like this: export GLIB_CONFIG=$GLIB_CONFIG:/usr/glib/bin (provided /usr/glib is is where glib.conf is found.) (I am assuming that GLIB_CONFIG is a global environment variable - it could be a variable in the config script ... in which case you'll have to use a text editor to edit the script itself!) In general: This kind of error means that you do not have all the required libraries installed. In order to install from source you must have all the libraries. To get the libraries, just google the library name. You are using Mandrake, if I remember right, mandrake can use rpm's ... so www.rpmfind.net is a good place to search. You distribution boards will also help you there. Dosn't mandrake also have apt-get? The first thing you upgrade is probably going to have to be gcc and its libraries. After that, other upgrades should be smooth sailing. As you encounter these errors and install the required components, these errors will be fewer, and farther between. BTW: you missed out steps 1,3 and 4 from my post. :( |
All times are GMT -5. The time now is 12:05 AM. |