How do I compile source undfer Suse Linux?

 
Thread Tools Search this Thread
Operating Systems Linux SuSE How do I compile source undfer Suse Linux?
# 1  
Old 05-19-2006
How do I compile source undfer Suse Linux?

I've been usuing Suse 9.1 & 10 on 2 different machines for a while and have so far relied on ready compiled versions of programs in RPMs in order to install them.

I'm unclear what is envolved in compiling from the source code myself. I did a general google on the topic and found some unclear information that listed a mass of files I'd need to add to my systems and some vague intructions.

I've been considering a number of applications (including Zone-Minder) that I would like to run under Suse, but there are not compiled versions of the latest revisions available.

Could someone shed some light on the process "work-flow" of compiling for me please? Any link to a "How-To" would be appreciated. I'm sure I'll be able to do it, I just can't seem to work out what I should be doing.

Is there a rpm with all the necessary files I'll need to add to my systems?

Many thanks,

Mark.
# 2  
Old 05-20-2006
A lot of the time you'll find that a compilation sequence is generally as follows:

# tar xvzf somefile-version.tar.gz
# cd some_dir_created_by_extraction
# ./configure
# make
# make install

./configure should tell you if you're missing anything. This will differ from package to package, but (generally) a file named README and/or INSTALL will exist in the root of the tarball that should have clear compilation/installation instructions. The documentation should also indicate whether or not any prerequisite packages are required.

Cheers
ZB
# 3  
Old 05-25-2006
Thanks for that! I've been compiling for a while without even knowing it! Smilie

There was me thinking there was this "Dark Art" that someone may one day let me in on so long as I was sworn to secrecy.

Cheers!

Mark.
# 4  
Old 05-26-2006
It works!... However.. when attempting to compile php-4.4.2.tar.gz for Suse 10.1 I get the following errors

Code:
# ./configure

creating cache ./config.cache
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... exit 0;
checking whether ln -s works... yes
checking for gawk... gawk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP parsers.
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 2540: lex: command not found
configure: error: cannot find output from lex; giving up

#

Is this simply a case of searching for a "lex" aaand "bison" package in YAST and installing them?

[EDIT] Since I had a fresh backup I thought I'd give it a try and have succesfully compiled for Suse 10.1 Smilie Unfortunately the resulting files do not contain the packages I was looking for, but that's fine. I'll search a little more.

Now I have a folder of PHP-4.4.2 compiled for Suse10.1 how would I create an RPM to enable others to use it? Actually, how can I check to make sure it's valid? I didn't get any errors compiling.... Is that enough?

Thanks,

Mark.

Last edited by Mark Ward; 05-26-2006 at 02:40 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Solaris

Error when compile source code

Hello,I'm trying to compile source code for Nmap. My $PATH /usr/sbin:/usr/bin:/usr/openwin/bin:/usr/ucb:/usr/local/bin:/usr/css/bin I type ./configure and all goes great.When I type ./make or ./make it says make not found.Why?I need a correct path for make?Thanks in advance. (2 Replies)
Discussion started by: bgf0
2 Replies

2. UNIX and Linux Applications

How to compile from source code?

Hi all, I downloaded the source code for a pkg. But i dont know how to build from it? I have no prior experience in building from source,so could you pls help me? I tried ./configure(after entering into the dir containing the src codes) but it generated some errors!!!!! Some files... (1 Reply)
Discussion started by: wrapster
1 Replies

3. Programming

error trying to compile a c++ source file

i tried to compile a c++ file using the g++ command: g++ <filename>.cpp -out <output_file> and i received the following error message: ld.so.1: gcc: fatal: relocation error: file gcc: symbol bindtextdomain: referenced symbol not found Killed is it that i am using incorrectly the... (1 Reply)
Discussion started by: ldrojasm
1 Replies

4. Programming

compile rpm-4.0 source

Hello Unix experts, I downloaded rpm-4.0 source from ftp.redhat.com and tried to make it. There are something I could not understand. - Makefile.in and Makefile.am instead of Makefile - file INSTALL doesn't show clearly the steps of compiling What are these 2 files, Makefile.in and... (2 Replies)
Discussion started by: eddie
2 Replies
Login or Register to Ask a Question