LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-12-2005, 08:14 AM   #1
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Rep: Reputation: 15
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.
 
Old 05-12-2005, 08:26 AM   #2
Boby
Member
 
Registered: Feb 2004
Location: Sighisoara/Cluj-Napoca (Romania)
Distribution: CentOS 4, Fedora Core 6
Posts: 781

Rep: Reputation: 31
Hello!

Usually you unpack the arhive and switch to this one in the console/terminal, there:
Code:
./configure
make
su
Password:
make install
After unpacking the arhive there must be an INSTALL or README file where you get all installation steps.

Read: Compiling Programs from Source by Jeremy

Good luck!
Boby
 
Old 05-12-2005, 08:36 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 05-12-2005, 08:39 AM   #4
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Original Poster
Rep: Reputation: 15
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.
 
Old 05-12-2005, 11:05 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 05-12-2005, 03:24 PM   #6
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
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).
 
Old 05-12-2005, 08:28 PM   #7
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by __J
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).
The VLC Mandrake page says something about urpmi and I have no idea what the hell that is :/
 
Old 05-12-2005, 08:52 PM   #8
finklewicz
Member
 
Registered: Mar 2005
Posts: 41

Rep: Reputation: 15
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.
 
Old 05-14-2005, 07:17 AM   #9
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by finklewicz
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.
Ain't working. Not sure if I'm doing it right.
 
Old 05-15-2005, 09:55 PM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 06-03-2005, 04:55 AM   #11
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Original Poster
Rep: Reputation: 15
So far, I've had no success with compiling from source. I always get some kind of error.
 
Old 06-03-2005, 07:40 PM   #12
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 06-03-2005, 08:56 PM   #13
EliasAlucard
Member
 
Registered: Apr 2005
Distribution: Xubuntu 12.04 LTS amd64
Posts: 82

Original Poster
Rep: Reputation: 15
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:
[root@cxx-xxx-xx-xxx ~]$ tar -xvf xmms-1.2.10.tar.gz
xmms-1.2.10/
xmms-1.2.10/intl/
xmms-1.2.10/intl/ChangeLog
xmms-1.2.10/intl/Makefile.in

[root@cxx-xxx-xx-xxx ~]$ cd xmms-1.2.10
[root@cxx-xxx-xx-xxx xmms-1.2.10]$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes

checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for glib-config... no
checking for GLIB - version >= 1.2.2... no
*** The glib-config script installed by GLIB could not be found
*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GLIB_CONFIG environment variable to the
*** full path to glib-config.
configure: error: *** GLIB >= 1.2.2 not installed - please install first ***
[root@cxx-xxx-xx-xxx xmms-1.2.10]$ make
make: *** No targets specified and no makefile found. Stop.
[root@cxx-xxx-xx-xxx xmms-1.2.10]$ su
Password:
[root@cxx-xxx-xx-xxx xmms-1.2.10]# make install
make: *** No rule to make target `install'. Stop.
[root@cxx-xxx-xx-xxx xmms-1.2.10]#

Last edited by EliasAlucard; 06-04-2005 at 06:11 AM.
 
Old 06-04-2005, 01:15 AM   #14
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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
*** The glib-config script installed by GLIB could not be found
*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GLIB_CONFIG environment variable to the
*** full path to glib-config.
You need to make sure that glib-config is installed. Look for the file using your favorite search tool and note where it is.

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.

Last edited by Simon Bridge; 06-04-2005 at 01:33 AM.
 
  


Reply


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
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 05:22 PM
What does 'compile' mean? Iain1974 Linux - Newbie 15 08-25-2004 09:38 PM
c/c++ compile zdos Linux - Software 2 05-16-2004 04:22 PM
how to compile x for use on another pc??? markkreuzz Red Hat 1 03-03-2004 11:06 AM
compile jakublgz Programming 8 09-05-2002 06:30 AM


All times are GMT -5. The time now is 12:46 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration