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.

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

Thanks for that! I've been compiling for a while without even knowing it! :smiley:

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.

It works!... However.. when attempting to compile php-4.4.2.tar.gz for Suse 10.1 I get the following errors

# ./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 :slight_smile: 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.